Changeset 9851 for trunk/src/user32
- Timestamp:
- Feb 24, 2003, 6:03:00 PM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/USER32.DEF
r9810 r9851 1 ; $Id: USER32.DEF,v 1.7 6 2003-02-16 15:31:08sandervl Exp $1 ; $Id: USER32.DEF,v 1.77 2003-02-24 17:02:42 sandervl Exp $ 2 2 3 3 LIBRARY USER32 INITINSTANCE TERMINSTANCE … … 718 718 _OSLibWinCreateObject@32 @2031 NONAME 719 719 _ConvertIconGroup@12 @2032 NONAME 720 _ConvertIconGroupIndirect@12 @2037 NONAME 720 721 721 722 _WinSetVisibleRgnNotifyProc@12 @2033 NONAME -
trunk/src/user32/icon.cpp
r7733 r9851 1 /* $Id: icon.cpp,v 1.1 4 2002-01-07 11:17:52sandervl Exp $ */1 /* $Id: icon.cpp,v 1.15 2003-02-24 17:02:43 sandervl Exp $ */ 2 2 3 3 /* … … 371 371 //****************************************************************************** 372 372 //****************************************************************************** 373 void *WIN32API ConvertIconGroupIndirect(void *lpIconData, DWORD iconsize, 374 DWORD *ressize) 375 { 376 ICONDIR *ihdr = (ICONDIR *)lpIconData; 377 ICONDIRENTRY *rdir = (ICONDIRENTRY *)(ihdr + 1); 378 int i, groupsize = 0, os2iconsize; 379 BITMAPARRAYFILEHEADER2 *bafh, *orgbafh; 380 WINBITMAPINFOHEADER *iconhdr; 381 void *os2icon; 382 int nricons = 0; 383 void *winicon; 384 385 dprintf(("Icon Group type :%d", ihdr->idType)); 386 dprintf(("Icon Group count:%d", ihdr->idCount)); 387 for(i=0;i<ihdr->idCount;i++) { 388 dprintf2(("Icon : %x", rdir->dwImageOffset)); 389 dprintf2(("Width : %d", (int)rdir->bWidth)); 390 dprintf2(("Height : %d", (int)rdir->bHeight)); 391 dprintf2(("Colors : %d", (int)rdir->bColorCount)); 392 dprintf2(("Bits : %d", rdir->wBitCount)); 393 dprintf2(("ResBytes: %d", rdir->dwBytesInRes)); 394 395 winicon = (char *)lpIconData + rdir->dwImageOffset; 396 groupsize += QueryConvertedIconSize((WINBITMAPINFOHEADER *)winicon, 397 rdir->dwBytesInRes); 398 //add centered icon if size is 32x32 399 if(rdir->bWidth == 32 && rdir->bHeight == 32 && rdir->wBitCount >= 4) 400 { 401 groupsize += QueryConvertedIconSize((WINBITMAPINFOHEADER *)winicon, 402 rdir->dwBytesInRes, TRUE); 403 //extra pixels 404 groupsize += (40*8 + 8*32)*rdir->wBitCount/8; 405 nricons++; 406 } 407 nricons++; 408 rdir++; 409 } 410 groupsize = groupsize+nricons*(sizeof(BITMAPARRAYFILEHEADER2) - sizeof(BITMAPFILEHEADER2)); 411 bafh = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize); 412 memset(bafh, 0, groupsize); 413 orgbafh = bafh; 414 415 rdir = (ICONDIRENTRY *)(ihdr + 1); 416 for(i=0;i<ihdr->idCount;i++) { 417 bafh->usType = BFT_BITMAPARRAY; 418 bafh->cbSize = sizeof(BITMAPARRAYFILEHEADER2); 419 bafh->cxDisplay = 0; 420 bafh->cyDisplay = 0; 421 422 winicon = (char *)lpIconData + rdir->dwImageOffset; 423 iconhdr = (WINBITMAPINFOHEADER *)winicon; 424 425 os2icon = ConvertIcon(iconhdr, rdir->dwBytesInRes, &os2iconsize, (ULONG)bafh - (ULONG)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER2)); 426 if(os2icon == NULL) { 427 dprintf(("Can't convert icon!")); 428 rdir++; 429 continue; 430 } 431 432 if(rdir->bWidth == 32 && rdir->bHeight == 32 && rdir->wBitCount >= 4) 433 { 434 //add 40x40 icon by centering 32x32 icon in 40x40 grid 435 //(resize is really ugly) 436 bafh->offNext = (ULONG)&bafh->bfh2 - (ULONG)orgbafh + os2iconsize; 437 memcpy((char *)&bafh->bfh2, os2icon, os2iconsize); 438 free(os2icon); 439 440 bafh = (BITMAPARRAYFILEHEADER2 *)((ULONG)&bafh->bfh2 + os2iconsize); 441 442 os2icon = ConvertIcon(iconhdr, rdir->dwBytesInRes, &os2iconsize, (ULONG)bafh - (ULONG)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER2), TRUE); 443 if(os2icon == NULL) { 444 dprintf(("Can't convert icon!")); 445 rdir++; 446 continue; 447 } 448 } 449 450 if(i != ihdr->idCount -1) { 451 bafh->offNext = (ULONG)&bafh->bfh2 - (ULONG)orgbafh + os2iconsize; 452 } 453 else bafh->offNext = 0; 454 455 memcpy((char *)&bafh->bfh2, os2icon, os2iconsize); 456 free(os2icon); 457 458 bafh = (BITMAPARRAYFILEHEADER2 *)((ULONG)&bafh->bfh2 + os2iconsize); 459 460 rdir++; 461 } 462 *ressize = groupsize; 463 return (void *)orgbafh; 464 } 465 //****************************************************************************** 466 //****************************************************************************** -
trunk/src/user32/oslibres.cpp
r9624 r9851 1 /* $Id: oslibres.cpp,v 1.3 4 2003-01-05 16:34:58sandervl Exp $ */1 /* $Id: oslibres.cpp,v 1.35 2003-02-24 17:02:43 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 749 749 char szWorkDir[256]; 750 750 char szPEGUILoaderPath[256]; 751 BOOL fWin32App; 751 752 752 753 if(pszName) { … … 784 785 ((pszWorkDir) ? strlen(pszWorkDir) : 0)); 785 786 786 sprintf(pszSetupString, "PROGTYPE=PM;OBJECTID=<%s>;EXENAME=%s;SET BEGINLIBPATH=%s;STARTUPDIR=%s;ICONFILE=%s;PARAMETERS=\"%s\"", pszName, szPEGUILoaderPath, szSystemDir, szWorkDir, pszIcoPath, pszPath); 787 fWin32App = ODIN_IsWin32App(pszPath); 788 if(!fWin32App) 789 {//don't use the PE loader; use the program path directly 790 sprintf(pszSetupString, "PROGTYPE=PM;OBJECTID=<%s%s>;EXENAME=%s;SET BEGINLIBPATH=%s;STARTUPDIR=%s;ICONFILE=%s;PARAMETERS=", (fDesktop) ? "DESKTOP_" : "", pszName, pszPath, szSystemDir, szWorkDir, pszIcoPath); 791 } 792 else sprintf(pszSetupString, "PROGTYPE=PM;OBJECTID=<%s%s>;EXENAME=%s;SET BEGINLIBPATH=%s;STARTUPDIR=%s;ICONFILE=%s;PARAMETERS=\"%s\"", (fDesktop) ? "DESKTOP_" : "", pszName, szPEGUILoaderPath, szSystemDir, szWorkDir, pszIcoPath, pszPath); 793 787 794 if(pszArgs && *pszArgs) { 788 795 strcat(pszSetupString, " "); … … 794 801 dprintf(("Name = %s", pszName)); 795 802 dprintf(("Setup string = %s", pszSetupString)); 803 804 //Use a different name for desktop objects 796 805 hObject = WinCreateObject("WPProgram", pszName, pszSetupString, 797 806 "<WP_DESKTOP>", CO_REPLACEIFEXISTS); … … 805 814 hObject = WinCreateObject("WPFolder", pszFolder, szWorkDir, 806 815 "<ODINFOLDER>", CO_UPDATEIFEXISTS); 807 hObject = WinCreateObject("WPProgram", pszName, pszSetupString, 808 temp, CO_REPLACEIFEXISTS); 816 if(hObject) { 817 hObject = WinCreateObject("WPProgram", pszName, pszSetupString, 818 temp, CO_REPLACEIFEXISTS); 819 } 820 else { 821 hObject = 1; //force silent failure 822 } 809 823 } 810 824 -
trunk/src/user32/user32dbg.def
r9810 r9851 1 ; $Id: user32dbg.def,v 1. 9 2003-02-16 15:31:11sandervl Exp $1 ; $Id: user32dbg.def,v 1.10 2003-02-24 17:02:43 sandervl Exp $ 2 2 3 3 LIBRARY USER32 INITINSTANCE TERMINSTANCE … … 717 717 _OSLibWinCreateObject@32 @2031 NONAME 718 718 _ConvertIconGroup@12 @2032 NONAME 719 _ConvertIconGroupIndirect@12 @2037 NONAME 719 720 720 721 _WinSetVisibleRgnNotifyProc@12 @2033 NONAME
Note:
See TracChangeset
for help on using the changeset viewer.