Changeset 345 for trunk/src/user32/new/win32wnd.cpp
- Timestamp:
- Jul 20, 1999, 5:46:54 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/win32wnd.cpp
r342 r345 1 /* $Id: win32wnd.cpp,v 1.1 7 1999-07-20 07:42:36sandervl Exp $ */1 /* $Id: win32wnd.cpp,v 1.18 1999-07-20 15:46:54 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 29 29 #include <oslibutil.h> 30 30 #include <oslibgdi.h> 31 #include <oslibres.h> 31 32 #include <winres.h> 32 33 … … 102 103 acceltableResource = NULL; 103 104 menuResource = NULL; 104 } 105 //****************************************************************************** 105 iconResource = NULL; 106 } 107 //****************************************************************************** 108 //todo get rid of resources (menu, accel, icon etc) 106 109 //****************************************************************************** 107 110 Win32Window::~Win32Window() … … 389 392 else windowId = (UINT)cs->hMenu; 390 393 394 //Set icon from class 395 if(windowClass->getIcon()) 396 SetIcon(windowClass->getIcon()); 397 391 398 /* Send the WM_CREATE message 392 399 * Perhaps we shouldn't allow width/height changes as well. … … 416 423 HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 ); 417 424 #endif 425 SetLastError(0); 418 426 return TRUE; 419 427 } … … 1056 1064 //****************************************************************************** 1057 1065 //****************************************************************************** 1058 BOOL Win32Window::SetMenu( ULONGhMenu)1066 BOOL Win32Window::SetMenu(HMENU hMenu) 1059 1067 { 1060 1068 PVOID menutemplate; … … 1082 1090 //****************************************************************************** 1083 1091 //****************************************************************************** 1084 BOOL Win32Window::SetAccelTable( ULONGhAccel)1092 BOOL Win32Window::SetAccelTable(HACCEL hAccel) 1085 1093 { 1086 1094 Win32Resource *winres = (Win32Resource *)hAccel; 1095 HANDLE accelhandle; 1087 1096 1088 1097 if(HIWORD(hAccel) == 0) { 1089 1098 dprintf(("SetAccelTable: hAccel %x invalid", hAccel)); 1090 1091 1099 SetLastError(ERROR_INVALID_PARAMETER); 1100 return FALSE; 1092 1101 } 1093 1102 acceltableResource = winres; 1094 return OSLibWinSetAccelTable(OS2HwndFrame, winres->lockOS2Resource()); 1103 accelhandle = OSLibWinSetAccelTable(OS2HwndFrame, winres->getOS2Handle(), winres->lockOS2Resource()); 1104 winres->setOS2Handle(accelhandle); 1105 return(accelhandle != 0); 1106 } 1107 //****************************************************************************** 1108 //****************************************************************************** 1109 BOOL Win32Window::SetIcon(HICON hIcon) 1110 { 1111 Win32Resource *winres = (Win32Resource *)hIcon; 1112 HANDLE iconhandle; 1113 1114 if(HIWORD(hIcon) == 0) { 1115 dprintf(("SetIcon: hIcon %x invalid", hIcon)); 1116 SetLastError(ERROR_INVALID_PARAMETER); 1117 return FALSE; 1118 } 1119 dprintf(("Win32Window::SetIcon %x", hIcon)); 1120 iconResource = winres; 1121 iconhandle = OSLibWinSetIcon(OS2HwndFrame, winres->getOS2Handle(), winres->lockOS2Resource()); 1122 winres->setOS2Handle(iconhandle); 1123 return(iconhandle != 0); 1095 1124 } 1096 1125 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.