Changeset 1281 for trunk/src/user32/win32dlg.cpp
- Timestamp:
- Oct 14, 1999, 11:22:43 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32dlg.cpp
r1265 r1281 1 /* $Id: win32dlg.cpp,v 1.1 3 1999-10-13 14:24:26sandervl Exp $ */1 /* $Id: win32dlg.cpp,v 1.14 1999-10-14 09:22:41 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 169 169 170 170 fIsDialog = TRUE; 171 CreateWindowExA(&cs, classAtom); 172 173 if(!isUnicode) { 174 if(cs.lpszName) FreeAsciiString((LPSTR)cs.lpszName); 175 if(HIWORD(cs.lpszClass)) { 176 FreeAsciiString((LPSTR)cs.lpszClass); 177 } 178 } 179 180 if (!getWindowHandle()) 171 Win32DlgProc = dlgProc; 172 173 this->tmpParam = param; 174 this->tmpDlgTemplate = (LPSTR)dlgTemplate; 175 176 if (CreateWindowExA(&cs, classAtom) == FALSE) 181 177 { 182 178 if (hUserFont) DeleteObject( hUserFont ); 183 179 if (hMenu) DestroyMenu( hMenu ); 180 SetLastError(ERROR_OUTOFMEMORY); //TODO: Wrong error 184 181 return; 182 } 183 SetLastError(0); 184 return; 185 } 186 //****************************************************************************** 187 //****************************************************************************** 188 Win32Dialog::~Win32Dialog() 189 { 190 if (hUserFont) DeleteObject( hUserFont ); 191 if (hMenu) DestroyMenu( hMenu ); 192 } 193 //****************************************************************************** 194 //****************************************************************************** 195 ULONG Win32Dialog::MsgCreate(HWND hwndFrame, HWND hwndClient) 196 { 197 CREATESTRUCTA *cs = tmpcs; //pointer to CREATESTRUCT used in CreateWindowExA method 198 LPARAM param = tmpParam; 199 LPSTR dlgTemplate = tmpDlgTemplate; 200 201 Win32BaseWindow::MsgCreate(hwndFrame, hwndClient); 202 203 if(!isUnicode) { 204 if(cs->lpszName) FreeAsciiString((LPSTR)cs->lpszName); 205 if(HIWORD(cs->lpszClass)) { 206 FreeAsciiString((LPSTR)cs->lpszClass); 207 } 185 208 } 186 209 187 210 //TODO: 188 211 // wndPtr->helpContext = helpId; 189 Win32DlgProc = dlgProc;190 212 191 213 if (hUserFont) … … 193 215 194 216 /* Create controls */ 195 if (createControls(dlgTemplate, hInst ))217 if (createControls(dlgTemplate, hInstance)) 196 218 { 197 219 dprintf(("********* DIALOG CONTROLS CREATED ************")); … … 199 221 hwndFocus = GetNextDlgTabItem( getWindowHandle(), 0, FALSE ); 200 222 201 if (SendMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param))223 if (SendMessageA(WM_INITDIALOG, (WPARAM)hwndFocus, param)) 202 224 SetFocus(hwndFocus); 203 225 … … 207 229 ::UpdateWindow( getWindowHandle() ); 208 230 } 209 SetLastError(0);231 SetLastError(0); 210 232 dprintf(("********* DIALOG CREATED ************")); 211 return ;233 return TRUE; 212 234 } 213 235 dprintf(("********* DIALOG CREATION FAILED! ************")); 214 DestroyWindow(); 215 } 216 //****************************************************************************** 217 //****************************************************************************** 218 Win32Dialog::~Win32Dialog() 219 { 220 if (hUserFont) DeleteObject( hUserFont ); 221 if (hMenu) DestroyMenu( hMenu ); 222 236 return FALSE; 223 237 } 224 238 /*********************************************************************** … … 1097 1111 //****************************************************************************** 1098 1112 //****************************************************************************** 1099 ULONG Win32Dialog::MsgOS2Create(HWND hwndOS2, ULONG initParam)1100 {1101 OS2Hwnd = hwndOS2;1102 return win32wndproc(Win32Hwnd, WM_CREATE, 0, initParam);1103 }1104 //******************************************************************************1105 //******************************************************************************1106 1113 LONG Win32Dialog::SetWindowLongA(int index, ULONG value) 1107 1114 {
Note:
See TracChangeset
for help on using the changeset viewer.