From: <kr_...@us...> - 2003-10-07 21:31:39
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv15252/src/cbits/Win32 Modified Files: Window.c Log Message: Make possible to hide/show a window at any time Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Window.c 4 Oct 2003 14:45:06 -0000 1.49 --- Window.c 7 Oct 2003 21:31:34 -0000 1.50 *************** *** 745,749 **** "HSDIWINDOW", NULL, ! WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL, 0,0,rect.right-rect.left,rect.bottom-rect.top, ghWndFrame, --- 745,749 ---- "HSDIWINDOW", NULL, ! WS_CHILD | WS_HSCROLL | WS_VSCROLL, 0,0,rect.right-rect.left,rect.bottom-rect.top, ghWndFrame, *************** *** 766,770 **** mdicreate.cx = 0; mdicreate.cy = 0; ! mdicreate.style = WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; mdicreate.lParam = 0; --- 766,770 ---- mdicreate.cx = 0; mdicreate.cy = 0; ! mdicreate.style = WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL; mdicreate.lParam = 0; *************** *** 784,787 **** --- 784,788 ---- WORD dlgtemplate[60]; DWORD lStyle; + HWND hDlg; // start to fill in the dlgtemplate information. Addressing by WORDs *************** *** 805,811 **** s = "MS Sans Serif"; do { *p++ = (WORD) *s; } while (*s++); ! if (!parent) parent = ghWndFrame; ! ! return CreateDialogIndirectParam (ghModule, (LPCDLGTEMPLATE) dlgtemplate, parent, (DLGPROC) NULL, (LPARAM) 0); }; --- 806,817 ---- s = "MS Sans Serif"; do { *p++ = (WORD) *s; } while (*s++); ! if (!parent) parent = ghWndFrame; ! ! hDlg = CreateDialogIndirectParam (ghModule, (LPCDLGTEMPLATE) dlgtemplate, parent, (DLGPROC) NULL, (LPARAM) 0); ! if (!hDlg) return NULL; ! ! ShowWindow(hDlg, SW_HIDE); ! ! return hDlg; }; *************** *** 980,986 **** } ! void osShowWindow(WindowHandle window) { ! ShowWindow(window, SW_SHOW); } --- 986,997 ---- } ! void osSetWindowVisible(WindowHandle window, BOOL visible) { ! ShowWindow(window, visible ? SW_SHOW : SW_HIDE); ! } ! ! BOOL osGetWindowVisible(WindowHandle window) ! { ! return (GetWindowLong(hCtrl, GWL_STYLE) & WS_VISIBLE) != 0; } *************** *** 988,996 **** { MSG msg; ! ! ShowWindow(window, SW_SHOW); SetActiveWindow(window); EnableWindow(GetWindow(window, GW_OWNER), FALSE); ! while (IsWindow(window) && GetMessage(&msg, NULL, 0, 0) != 0) { --- 999,1007 ---- { MSG msg; ! ! ShowWindow(window, SW_SHOW); SetActiveWindow(window); EnableWindow(GetWindow(window, GW_OWNER), FALSE); ! while (IsWindow(window) && GetMessage(&msg, NULL, 0, 0) != 0) { |