Changeset 8968
- Timestamp:
- Aug 8, 2002, 2:34:37 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/user32/windlgmsg.cpp ¶
r8812 r8968 1 /* $Id: windlgmsg.cpp,v 1.1 5 2002-07-01 11:33:09sandervl Exp $ */1 /* $Id: windlgmsg.cpp,v 1.16 2002-08-08 12:34:37 sandervl Exp $ */ 2 2 /* 3 3 * Win32 dialog message APIs for OS/2 … … 276 276 if (HIWORD(dw) == DC_HASDEFID) 277 277 { 278 //@PF If DEFID button is disabled do not press it!279 278 if (IsWindowEnabled(GetDlgItem(hwndDlg, LOWORD(dw)))) 279 { 280 280 SendMessageA( hwndDlg, WM_COMMAND, 281 281 MAKEWPARAM( LOWORD(dw), BN_CLICKED ), 282 282 (LPARAM)GetDlgItem(hwndDlg, LOWORD(dw))); 283 } 283 284 } 284 285 else 285 286 { 286 SendMessageA( hwndDlg, WM_COMMAND, IDOK, 287 // @@PF Win2k here behaves this way: checks focus and then 288 // if it is button clicks it, I also added enabled check 289 HWND hwndCtrl = GetFocus(); 290 if (SendMessageA(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_UNDEFPUSHBUTTON) 291 { 292 if (IsWindowEnabled(hwndCtrl)) 293 SendMessageA( hwndDlg, WM_COMMAND, 294 MAKEWPARAM( GetDlgCtrlID(hwndCtrl), BN_CLICKED ), 295 (LPARAM)hwndCtrl); 296 } 297 else 298 SendMessageA( hwndDlg, WM_COMMAND, IDOK, 287 299 (LPARAM)GetDlgItem( hwndDlg, IDOK ) ); 288 289 300 } 290 301
Note:
See TracChangeset
for help on using the changeset viewer.