Changeset 4686 for trunk/src/user32/win32dlg.cpp
- Timestamp:
- Nov 24, 2000, 11:30:36 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32dlg.cpp
r4444 r4686 1 /* $Id: win32dlg.cpp,v 1.5 3 2000-10-06 15:15:00sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.54 2000-11-24 10:30:36 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 49 49 idResult = 0; 50 50 dialogFlags = 0; 51 fDialogInit = FALSE; 51 52 memset(&dlgInfo, 0, sizeof(dlgInfo)); 52 53 … … 76 77 if (dlgInfo.style & DS_SETFONT) 77 78 { 78 79 80 81 82 83 79 /* The font height must be negative as it is a point size */ 80 /* and must be converted to pixels first */ 81 /* (see CreateFont() documentation in the Windows SDK). */ 82 HDC dc = GetDC(0); 83 int pixels = dlgInfo.pointSize * GetDeviceCaps(dc , LOGPIXELSY)/72; 84 ReleaseDC(0, dc); 84 85 85 86 hUserFont = CreateFontW(-pixels, 0, 0, 0, … … 238 239 dprintf(("dlg ctor: GetNextDlgTabItem returned %x, capture hwnd = %x", hwndFocus, GetCapture())); 239 240 240 HWND hwndPreInitFocus = GetFocus(); 241 fDialogInit = TRUE; //WM_NCCALCSIZE can now be sent to dialog procedure 242 243 HWND hwndPreInitFocus = GetFocus(); 241 244 if(SendInternalMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param)) { 242 243 244 245 246 247 248 249 250 245 SetFocus(hwndFocus); 246 } 247 else 248 { 249 /* If the dlgproc has returned FALSE (indicating handling of keyboard focus) 250 but the focus has not changed, set the focus where we expect it. */ 251 if ( (getStyle() & WS_VISIBLE) && ( GetFocus() == hwndPreInitFocus ) ) 252 SetFocus( hwndFocus ); 253 } 251 254 252 255 if (dlgInfo.style & WS_VISIBLE && !(getStyle() & WS_VISIBLE)) … … 255 258 UpdateWindow( getWindowHandle() ); 256 259 } 257 SetLastError( 0);260 SetLastError(ERROR_SUCCESS); 258 261 dprintf(("********* DIALOG CREATED ************")); 259 262 return TRUE; … … 858 861 msgResult = 0; 859 862 863 //Dialogs never receive these messages 864 if (Msg == WM_CREATE || Msg == WM_NCCREATE) { 865 return (LRESULT)1; 866 } 867 //Never send a WM_NCCALCSIZE to a dialog before it has received it's WM_INITDIALOG message 868 //(causes problems for sysinf32.exe) 869 if(!fDialogInit && Msg == WM_NCCALCSIZE) { 870 return DefWindowProcA(Msg, wParam, lParam ); 871 } 872 860 873 if (Win32DlgProc) { /* Call dialog procedure */ 861 874 result = Win32DlgProc(getWindowHandle(), Msg, wParam, lParam); … … 902 915 msgResult = 0; 903 916 917 //Dialogs never receive these messages 918 if (Msg == WM_CREATE || Msg == WM_NCCREATE) { 919 return (LRESULT)1; 920 } 921 //Never send a WM_NCCALCSIZE to a dialog before it has received it's WM_INITDIALOG message 922 //(causes problems for sysinf32.exe) 923 if(!fDialogInit && Msg == WM_NCCALCSIZE) { 924 return DefWindowProcW(Msg, wParam, lParam ); 925 } 926 904 927 if (Win32DlgProc) { /* Call dialog procedure */ 905 928 result = Win32DlgProc(getWindowHandle(), Msg, wParam, lParam); … … 1069 1092 case DWL_DLGPROC: 1070 1093 { 1071 1094 //Note: Type of SetWindowLong determines new window proc type 1072 1095 // UNLESS the new window proc has already been registered 1073 1096 // (use the old type in that case) 1074 1097 // (VERIFIED in NT 4, SP6) 1075 1098 WINDOWPROCTYPE type = WINPROC_GetProcType((HWINDOWPROC)value); 1076 1077 1078 1099 if(type == WIN_PROC_INVALID) { 1100 type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A; 1101 } 1079 1102 oldval = (LONG)WINPROC_GetProc(Win32DlgProc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A); 1080 1103 WINPROC_SetProc((HWINDOWPROC *)&Win32DlgProc, (WNDPROC)value, type, WIN_PROC_WINDOW);
Note:
See TracChangeset
for help on using the changeset viewer.