From: <kr_...@us...> - 2003-03-30 23:13:23
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1:/tmp/cvs-serv30554/src/cbits/Win32 Modified Files: Window.c Log Message: Remove custom title format for the MDIFrame because the standard MDIClient has its own format. Index: Window.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Window.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Window.c 30 Mar 2003 22:54:54 -0000 1.20 --- Window.c 30 Mar 2003 23:13:19 -0000 1.21 *************** *** 774,858 **** switch (uMsg) { - case WM_SETTEXT: - { - char *s = (char *) lParam; - - if (pFrameData->lpszAppName && *pFrameData->lpszAppName) - { - if (s && *s) - { - char *title; - int nTextLen; - - nTextLen = strlen(s); - title = malloc(strlen(pFrameData->lpszAppName)+nTextLen+6); - - if (title) - { - strcpy(title, pFrameData->lpszAppName); - strcat(title, " - ["); - strcat(title, s); - strcat(title, "]"); - SetWindowText(ghWndFrame, title); - } - - free(title); - } - else - SetWindowText(ghWndFrame, pFrameData->lpszAppName); - } - else - SetWindowText(ghWndFrame, s ? s : ""); - } - break; - case WM_MDIACTIVATE: - { - char *title; - int nTextLen; - - nTextLen = GetWindowTextLength(hWnd); - if (pFrameData->lpszAppName && *pFrameData->lpszAppName) - { - if (nTextLen > 0) - { - title = malloc(strlen(pFrameData->lpszAppName)+nTextLen+6); - - if (title) - { - strcpy(title, pFrameData->lpszAppName); - strcat(title, " - ["); - GetWindowText(hWnd, title+strlen(title), nTextLen+1); - strcat(title, "]"); - SetWindowText(ghWndFrame, title); - } - - free(title); - } - else - SetWindowText(ghWndFrame, pFrameData->lpszAppName); - } - else - { - title = malloc(nTextLen+1); - if (title) - { - GetWindowText(hWnd, title, nTextLen+1); - SetWindowText(ghWndFrame, title); - } - free(title); - } - - if (hWnd == (HWND) lParam) - handleWindowActivate(hWnd); - else - if (hWnd == (HWND) wParam) - handleWindowDeactivate(hWnd); - } - break; - case WM_DESTROY: - SetWindowText(ghWndFrame, pFrameData->lpszAppName ? pFrameData->lpszAppName : ""); - SendMessage(pFrameData->hClientWnd, WM_MDIREFRESHMENU, 0, 0); - DrawMenuBar(ghWndFrame); - break; case WM_LBUTTONDOWN: SendMessage(pFrameData->hClientWnd,WM_MDIACTIVATE,(WPARAM) hWnd,0); --- 774,777 ---- *************** *** 1121,1125 **** void osDestroyWindow(WindowHandle window) { ! DestroyWindow(window); } --- 1040,1050 ---- void osDestroyWindow(WindowHandle window) { ! FrameData *pFrameData = (FrameData *) GetWindowLong(ghWndFrame,GWL_USERDATA); ! if (pFrameData->DocumentInterface == 1) ! { ! DestroyWindow(window); ! } ! else ! SendMessage(pFrameData->hClientWnd,WM_MDIDESTROY,window,0); } |