Ignore:
Timestamp:
Jan 29, 2011, 6:17:56 PM (13 years ago)
Author:
イグトランス (egtra)
Message:

icon_resをLOAD_LIBRARY_AS_DATAFILE付きで読み込むよう変更。icon_resプロジェクトをab.slnへ組み込んだ。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/egtra/ab5.0/abdev/abdev/SubOperation.cpp

    r772 r784  
    692692    const std::string resDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\res.dll";
    693693    hResInst = LoadLibrary( resDllPath.c_str() );
     694    if(!hResInst){
     695        MessageBox(0,"res.dllの読み込みに失敗しました。",APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
     696        return 0;
     697    }
    694698
    695699    //アイコンリソースDLLをマッピング
    696700    const std::string iconResDllPath = ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\icon_res.dll";
    697     hIconResInst = LoadLibrary( iconResDllPath.c_str() );
     701    hIconResInst = LoadLibraryEx( iconResDllPath.c_str(), nullptr, LOAD_LIBRARY_AS_DATAFILE );
     702    if(!hIconResInst){
     703        MessageBox(0,"icon_res.dllの読み込みに失敗しました。",APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
     704        return 0;
     705    }
    698706
    699707    //LuxCtrl.dllをマッピング
     
    872880    }
    873881
    874 #define ICONSET(itemID,iconID) pobj_MainMenu->SetIcon(itemID,(HICON)LoadImage(hIconResInst,MAKEINTRESOURCE(iconID),IMAGE_ICON,16,16,0));
     882#define ICONSET(itemID, iconID) pobj_MainMenu->SetIcon((itemID), ActiveBasic::Resource::LoadIcon(hIconResInst, (iconID), 16, 16));
    875883    //メニューアイコンをセット
    876884
Note: See TracChangeset for help on using the changeset viewer.