Changeset 2204 for trunk/src/user32/windlgmsg.cpp
- Timestamp:
- Dec 26, 1999, 6:30:20 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/windlgmsg.cpp
r1205 r2204 1 /* $Id: windlgmsg.cpp,v 1. 2 1999-10-08 21:30:52cbratschi Exp $ */1 /* $Id: windlgmsg.cpp,v 1.3 1999-12-26 17:30:20 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 dialog message APIs for OS/2 … … 16 16 #include <os2win.h> 17 17 #include <misc.h> 18 #include <string.h> 19 #include <ctype.h> 18 20 #include "win32wbase.h" 19 21 #include "win32dlg.h" … … 55 57 return 0; 56 58 } 57 //TODO58 #if 059 59 /*********************************************************************** 60 60 * DIALOG_IsAccelerator … … 64 64 HWND hwndControl = hwnd; 65 65 HWND hwndNext; 66 W ND *wndPtr;66 Win32BaseWindow *win32wnd; 67 67 BOOL RetVal = FALSE; 68 68 INT dlgCode; … … 82 82 do 83 83 { 84 w ndPtr = WIN_FindWndPtr( hwndControl);85 if ( (w ndPtr!= NULL) &&86 ((w ndPtr->dwStyle& (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE) )84 win32wnd = Win32BaseWindow::GetWindowFromHandle(hwndControl); 85 if ( (win32wnd != NULL) && 86 ((win32wnd->getStyle() & (WS_VISIBLE | WS_DISABLED)) == WS_VISIBLE) ) 87 87 { 88 dlgCode = SendMessageA( hwndControl, WM_GETDLGCODE, 0, 0 ); 89 if ( (dlgCode & (DLGC_BUTTON | DLGC_STATIC)) && 90 (wndPtr->text!=NULL)) 88 dlgCode = SendMessageA( hwndControl, WM_GETDLGCODE, 0, 0 ); 89 if (dlgCode & (DLGC_BUTTON | DLGC_STATIC)) 90 { 91 INT textLen = win32wnd->GetWindowTextLength(); 92 93 if (textLen > 0) 91 94 { 92 95 /* find the accelerator key */ 93 LPSTR p = wndPtr->text - 2; 96 char* text; 97 LPSTR p; 98 99 text = (char*)malloc(textLen+1); 100 win32wnd->GetWindowTextA(text,textLen); 101 p = text - 2; 94 102 do 95 103 { … … 102 110 { 103 111 if ((dlgCode & DLGC_STATIC) || 104 (w ndPtr->dwStyle& 0x0f) == BS_GROUPBOX )112 (win32wnd->getStyle() & 0x0f) == BS_GROUPBOX ) 105 113 { 106 114 /* set focus to the control */ … … 115 123 /* send command message as from the control */ 116 124 SendMessageA( hwndDlg, WM_COMMAND, 117 MAKEWPARAM( LOWORD(w ndPtr->wIDmenu),125 MAKEWPARAM( LOWORD(win32wnd->getWindowId()), 118 126 BN_CLICKED ), 119 127 (LPARAM)hwndControl ); … … 126 134 } 127 135 RetVal = TRUE; 128 WIN_ReleaseWndPtr(wndPtr);136 free(text); 129 137 break; 130 138 } 139 free(text); 131 140 } 141 } 132 142 hwndNext = GetWindow( hwndControl, GW_CHILD ); 133 143 } … … 136 146 hwndNext = 0; 137 147 } 138 WIN_ReleaseWndPtr(wndPtr);139 148 if (!hwndNext) 140 149 { … … 163 172 return RetVal; 164 173 } 165 #endif166 174 /*********************************************************************** 167 175 * DIALOG_IsDialogMessage … … 251 259 /* drop through */ 252 260 253 //TODO:254 #if 0255 261 case WM_SYSCHAR: 256 262 if (DIALOG_IsAccelerator( hwnd, hwndDlg, wParam )) … … 260 266 } 261 267 break; 262 #endif263 268 } 264 269
Note:
See TracChangeset
for help on using the changeset viewer.