/* * getMenuBitmaps - load restore/restored bitmaps, and * get a bitmap for the close gadget (ack pft) */ static void getMenuBitmaps( void ) { if( restoreBitmap == NULLHANDLE ) { #ifdef __OS2_PM__ restoreBitmap = WinGetSysBitmap( HWND_DESKTOP, SBMP_RESTOREBUTTON ); #else restoreBitmap = LoadBitmap( (HANDLE)NULL, MAKEINTRESOURCE( OBM_RESTORE ) ); #endif } if( restoredBitmap == NULLHANDLE ) { #ifdef __OS2_PM__ restoredBitmap = WinGetSysBitmap( HWND_DESKTOP, SBMP_RESTOREBUTTONDEP ); #else restoredBitmap = LoadBitmap( (HANDLE)NULL, MAKEINTRESOURCE( OBM_RESTORED ) ); #endif } if( closeBitmap == NULLHANDLE ) { #ifdef __OS2_PM__ closeBitmap = WinGetSysBitmap( HWND_DESKTOP, SBMP_SYSMENU ); #else closeBitmap = LoadBitmap( mdiInfo.hinstance, "CLOSEBMP" ); #endif } updatedMenu = TRUE; } /* getMenuBitmaps */
void InitSort( HWND hwnd) { HPS hps; // load the sort menu's custom checkmarks hps = WinGetPS( hwnd); if (hps) { hUpBmp = GpiLoadBitmap( hps, 0, IDB_UPBMP, 0, 0); hDownBmp = GpiLoadBitmap( hps, 0, IDB_DOWNBMP, 0, 0); WinReleasePS( hps); } // if that failed, use the standard checkmark if (hUpBmp == 0) hUpBmp = WinGetSysBitmap( HWND_DESKTOP, SBMP_MENUCHECK); if (hDownBmp == 0) hDownBmp = WinGetSysBitmap( HWND_DESKTOP, SBMP_MENUCHECK); RestoreSort(); InitSortMenu( hwnd); return; }