Changeset 933 for trunk/src/kernel32/winres.cpp
- Timestamp:
- Sep 14, 1999, 6:56:08 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/winres.cpp
r932 r933 1 /* $Id: winres.cpp,v 1.1 7 1999-09-14 16:55:38 sandervl Exp $ */1 /* $Id: winres.cpp,v 1.18 1999-09-14 16:56:08 sandervl Exp $ */ 2 2 3 3 /* … … 28 28 #include <winres.h> 29 29 #include <misc.h> 30 #include < winexebase.h>31 #include <winexe pe2lx.h>30 #include <nameid.h> 31 #include <winexe.h> 32 32 #include "cvtresource.h" 33 33 #include <vmutex.h> … … 92 92 os2resdata(NULL), winresdata(NULL), resType(RSRC_CUSTOMNODATA) 93 93 { 94 resmutex.enter(); 95 next = module->winres; 96 module->winres = this; 97 resmutex.leave(); 98 94 99 module = NULL; 95 100 id = -1; … … 104 109 //****************************************************************************** 105 110 //****************************************************************************** 106 Win32Resource::Win32Resource(Win32Image Base*module, HRSRC hRes, ULONG id, ULONG type) :111 Win32Resource::Win32Resource(Win32Image *module, HRSRC hRes, ULONG id, ULONG type) : 107 112 os2resdata(NULL), winresdata(NULL), resType(RSRC_PE2LX) 108 113 { … … 163 168 //****************************************************************************** 164 169 //****************************************************************************** 165 Win32Resource::Win32Resource(Win32Image Base*module, ULONG id, ULONG type,170 Win32Resource::Win32Resource(Win32Image *module, ULONG id, ULONG type, 166 171 ULONG size, char *resdata) : hres(NULL), 167 172 os2resdata(NULL), winresdata(NULL), resType(RSRC_PELOADER) … … 241 246 case NTRT_MENU: 242 247 case NTRT_DIALOG: 243 newid = ((Win32Pe2LxImage *)module)->getWin32ResourceId(id);248 newid = module->getWin32ResourceId(id); 244 249 245 250 rc = DosGetResource((HMODULE)module->hinstance, RT_RCDATA, (int)newid, (PPVOID)&resdata); … … 324 329 } 325 330 return os2resdata; 326 }327 //******************************************************************************328 //return size of converted win32 resource329 //******************************************************************************330 ULONG Win32Resource::getOS2Size()331 {332 switch(type) {333 case NTRT_NEWBITMAP:334 case NTRT_BITMAP:335 return QueryConvertedBitmapSize((WINBITMAPINFOHEADER *)winresdata, ressize);336 337 case NTRT_CURSOR:338 return QueryConvertedCursorSize((CursorComponent *)winresdata, ressize);339 340 case NTRT_ICON:341 return QueryConvertedIconSize((WINBITMAPINFOHEADER *)winresdata, ressize);342 343 case NTRT_GROUP_ICON:344 case NTRT_GROUP_CURSOR:345 case NTRT_ACCELERATORS:346 case NTRT_NEWMENU:347 case NTRT_MENU:348 case NTRT_NEWDIALOG:349 case NTRT_DIALOG:350 case NTRT_FONTDIR:351 case NTRT_FONT:352 case NTRT_MESSAGETABLE:353 case NTRT_RCDATA:354 case NTRT_VERSION:355 case NTRT_STRING:356 default:357 dprintf(("Win32Resource::getOS2Size SHOULDN'T BE CALLED for this resource type (%d) (NOT IMPLEMENTED)!!", type));358 break;359 }360 return 0;361 331 } 362 332 //****************************************************************************** … … 465 435 //****************************************************************************** 466 436 //****************************************************************************** 467 void Win32Resource::destroyAll(Win32Image Base*module)437 void Win32Resource::destroyAll(Win32Image *module) 468 438 { 469 439 Win32Resource *res = module->winres, *next;
Note:
See TracChangeset
for help on using the changeset viewer.