mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
86a8d0f942
Thu Jan 13 11:45:13 1994 John Richardson <jrichard@cs.uml.edu> * [window/win.c] Added functions EnableWindow, IsWindowEnabled, and helper WIN_SetSensitive. * [window/event.c] Added checks for WS_DISABLED windows in EVENT_key, EVENT_MotionNotify, EVENT_ButtonPress, EVENT_ButtonRelease, EVENT_ConfigureNotify, EVENT_FocusIn, EVENT_FocusOut, and EVENT_EnterNotify. Key and button presses beep for a disabled window. If anyone finds better places for these checks, please tell me. Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [misc/message.c] Cleanup on buttons answer value returned. * [control/combo.c] Now use OBM_COMBO bitmap dropdown button. Mon Jan 17 21:56:45 1994 Erik Bos (erik@trashcan.hacktic.nl) * [misc/comm/c] A few bugfixes. Tue Jan 18 06:36:48 1994 julliard@di.epfl.ch (Alexandre Julliard) * [loader/cursor.c] Added X cursor for IDC_SIZENS and IDC_SIZEWE. * [include/options.h] [misc/main.c] (New files) Rewrote main() function to get rid of Xt application context, and added command-line option parsing. * [objects/color.c] Use of a private map now configurable with command-line option. * [windows/defwnd.c] Added WM_SYSCOMMAND handling, and better WM_SETCURSOR handling. * [windows/event.c] Removed ConfigureNotify event handler (no longer needed). * [windows/message.c] Send WM_SETCURSOR message on mouse events. * [windows/nonclient.c] Use OEM bitmaps for the drawing of the non-client area. Added caption bar buttons handling, and moving and resizing of the window via the window frame (bypassing the window manager). * [windows/painting.c] Bug fix in BeginPaint(). * [windows/win.c] Set the override_redirect flag for windows (to bypass window manager). * [windows/winpos.c] Implemented WindowFromPoint(), ChildWindowFromPoint(), BringWindowToTop(), Get/SetInternalWindowPos(), Get/SetWindowPlacement(). Mon Jan 17 20:48:24 1994 Bob Amstadt (bob@pooh) * [memory/heap.c] Added support for multiple local heaps.
102 lines
2.4 KiB
C
102 lines
2.4 KiB
C
/*
|
|
* Windows Exec & Help
|
|
*
|
|
*/
|
|
|
|
#include "win.h"
|
|
|
|
#define HELP_CONTEXT 0x0001
|
|
#define HELP_QUIT 0x0002
|
|
#define HELP_INDEX 0x0003
|
|
#define HELP_CONTENTS 0x0003
|
|
#define HELP_HELPONHELP 0x0004
|
|
#define HELP_SETINDEX 0x0005
|
|
#define HELP_SETCONTENTS 0x0005
|
|
#define HELP_CONTEXTPOPUP 0x0008
|
|
#define HELP_FORCEFILE 0x0009
|
|
#define HELP_KEY 0x0101
|
|
#define HELP_COMMAND 0x0102
|
|
#define HELP_PARTIALKEY 0x0105
|
|
#define HELP_MULTIKEY 0x0201
|
|
#define HELP_SETWINPOS 0x0203
|
|
|
|
|
|
WORD WinExec(LPSTR lpCmdLine, WORD nCmdShow)
|
|
{
|
|
int X, X2, C;
|
|
char *ArgV[20];
|
|
printf("WinExec(%s, %u)\n", lpCmdLine, nCmdShow);
|
|
for (X = X2 = C = 0; X < strlen(lpCmdLine) + 1; X++) {
|
|
if ((lpCmdLine[X] == ' ') || (lpCmdLine[X] == '\0')) {
|
|
ArgV[C] = (char *)malloc(X - X2 + 1);
|
|
strncpy(ArgV[C], &lpCmdLine[X2], X - X2);
|
|
ArgV[C][X - X2] = '\0';
|
|
C++; X2 = X + 1;
|
|
}
|
|
}
|
|
ArgV[C] = NULL;
|
|
for (C = 0; ; C++) {
|
|
if (ArgV[C] == NULL) break;
|
|
printf("--> '%s' \n", ArgV[C]);
|
|
}
|
|
switch(fork()) {
|
|
case -1:
|
|
printf("Can't 'fork' process !\n");
|
|
break;
|
|
case 0:
|
|
printf("New process started !\n");
|
|
execvp(ArgV[0], ArgV);
|
|
printf("Child process died !\n");
|
|
exit(1);
|
|
break;
|
|
default:
|
|
printf("Main process stay alive !\n");
|
|
break;
|
|
}
|
|
for (C = 0; ; C++) {
|
|
if (ArgV[C] == NULL) break;
|
|
free(ArgV[C]);
|
|
}
|
|
return(TRUE);
|
|
}
|
|
|
|
|
|
BOOL WinHelp(HWND hWnd, LPSTR lpHelpFile, WORD wCommand, DWORD dwData)
|
|
{
|
|
char *ArgV[6];
|
|
char str[32];
|
|
printf("WinHelp(%s, %u, %lu)\n", lpHelpFile, wCommand, dwData);
|
|
switch(fork()) {
|
|
case -1:
|
|
printf("Can't 'fork' process !\n");
|
|
break;
|
|
case 0:
|
|
printf("New process started !\n");
|
|
ArgV[0] = "wine";
|
|
ArgV[1] = "winhelp.exe";
|
|
ArgV[2] = lpHelpFile;
|
|
switch (wCommand) {
|
|
case HELP_CONTEXT:
|
|
case HELP_KEY:
|
|
case HELP_SETINDEX:
|
|
sprintf(str, "%lu", dwData);
|
|
ArgV[3] = str;
|
|
default:
|
|
ArgV[3] = NULL;
|
|
}
|
|
ArgV[4] = NULL;
|
|
if (wCommand == HELP_HELPONHELP) ArgV[2] = NULL;
|
|
/*
|
|
_WinMain(ArgV, 2);
|
|
*/
|
|
execvp(ArgV[0], ArgV);
|
|
printf("Child process died !\n");
|
|
exit(1);
|
|
break;
|
|
default:
|
|
printf("Main process stay alive !\n");
|
|
break;
|
|
}
|
|
return(TRUE);
|
|
}
|