Changeset 784 in dev


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

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

Location:
branches/egtra/ab5.0/abdev
Files:
2 added
10 edited

Legend:

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

    r778 r784  
    3030    void* WINAPI EncodePointer_Helper(void* p)
    3131    {
    32         static bool first = false;
    33         if (!first)
    34         {
    35             ::MessageBox(nullptr, "test", "", 0);
    36             first = true;
    37         }
    3832        if (auto EncodePointer_Real = GET_PROC_ADDRESS(KERNEL32, EncodePointer))
    3933        {
  • branches/egtra/ab5.0/abdev/ab-common.props

    r781 r784  
    1111  <ItemDefinitionGroup>
    1212    <ClCompile>
    13       <AdditionalIncludeDirectories>..\..\cpplibs\boost;$(SolutionDir)abdev-impl;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     13      <AdditionalIncludeDirectories>..\..;..\..\cpplibs;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;$(SolutionDir)abdev-impl;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    1414    </ClCompile>
    1515  </ItemDefinitionGroup>
  • branches/egtra/ab5.0/abdev/ab-test/ab-test.vcxproj.filters

    r781 r784  
    2020    </ClInclude>
    2121    <ClInclude Include="targetver.h">
    22       <Filter>Resource Files</Filter>
     22      <Filter>Header Filers</Filter>
    2323    </ClInclude>
    2424  </ItemGroup>
  • branches/egtra/ab5.0/abdev/ab.sln

    r781 r784  
    11
    22Microsoft Visual Studio Solution File, Format Version 11.00
    3 # Visual C++ Express 2010
     3# Visual Studio 2010
    44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "compiler", "compiler.vcxproj", "{11F0E9AB-EAEC-4616-A9DD-838073342CBB}"
    55EndProject
    66Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abdev", "abdev\abdev.vcxproj", "{DC1B787E-510F-4F7D-8F9A-182600904D83}"
     7    ProjectSection(ProjectDependencies) = postProject
     8        {75D495CD-8AB8-8B2D-A938-2A076F4310FF} = {75D495CD-8AB8-8B2D-A938-2A076F4310FF}
     9    EndProjectSection
    710EndProject
    811Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ab_common", "ab_common\ab_common.vcxproj", "{87835C33-64C9-4BA5-9B39-608BA5394387}"
     
    1417Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abdev-impl", "abdev-impl\abdev-impl.vcxproj", "{58FF88A2-86BC-4480-95F4-71AF693FEF28}"
    1518EndProject
     19Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icon_res", "icon_res\icon_res.vcxproj", "{75D495CD-8AB8-8B2D-A938-2A076F4310FF}"
     20EndProject
    1621Global
    1722    GlobalSection(SolutionConfigurationPlatforms) = preSolution
     23        AB_Release|Win32 = AB_Release|Win32
     24        AB_Release|x64 = AB_Release|x64
    1825        Debug|Win32 = Debug|Win32
    1926        Debug|x64 = Debug|x64
     
    2229    EndGlobalSection
    2330    GlobalSection(ProjectConfigurationPlatforms) = postSolution
     31        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.AB_Release|Win32.ActiveCfg = Release|Win32
     32        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.AB_Release|Win32.Build.0 = Release|Win32
     33        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.AB_Release|x64.ActiveCfg = Release|x64
     34        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.AB_Release|x64.Build.0 = Release|x64
    2435        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Debug|Win32.ActiveCfg = Debug|Win32
    2536        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Debug|Win32.Build.0 = Debug|Win32
     
    3041        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Release|x64.ActiveCfg = Release|x64
    3142        {11F0E9AB-EAEC-4616-A9DD-838073342CBB}.Release|x64.Build.0 = Release|x64
     43        {DC1B787E-510F-4F7D-8F9A-182600904D83}.AB_Release|Win32.ActiveCfg = Release|Win32
     44        {DC1B787E-510F-4F7D-8F9A-182600904D83}.AB_Release|Win32.Build.0 = Release|Win32
     45        {DC1B787E-510F-4F7D-8F9A-182600904D83}.AB_Release|x64.ActiveCfg = Release|x64
     46        {DC1B787E-510F-4F7D-8F9A-182600904D83}.AB_Release|x64.Build.0 = Release|x64
    3247        {DC1B787E-510F-4F7D-8F9A-182600904D83}.Debug|Win32.ActiveCfg = Debug|Win32
    3348        {DC1B787E-510F-4F7D-8F9A-182600904D83}.Debug|Win32.Build.0 = Debug|Win32
     
    3651        {DC1B787E-510F-4F7D-8F9A-182600904D83}.Release|Win32.Build.0 = Release|Win32
    3752        {DC1B787E-510F-4F7D-8F9A-182600904D83}.Release|x64.ActiveCfg = Release|x64
     53        {87835C33-64C9-4BA5-9B39-608BA5394387}.AB_Release|Win32.ActiveCfg = Release|Win32
     54        {87835C33-64C9-4BA5-9B39-608BA5394387}.AB_Release|Win32.Build.0 = Release|Win32
     55        {87835C33-64C9-4BA5-9B39-608BA5394387}.AB_Release|x64.ActiveCfg = Release|x64
     56        {87835C33-64C9-4BA5-9B39-608BA5394387}.AB_Release|x64.Build.0 = Release|x64
    3857        {87835C33-64C9-4BA5-9B39-608BA5394387}.Debug|Win32.ActiveCfg = Debug|Win32
    3958        {87835C33-64C9-4BA5-9B39-608BA5394387}.Debug|Win32.Build.0 = Debug|Win32
     
    4463        {87835C33-64C9-4BA5-9B39-608BA5394387}.Release|x64.ActiveCfg = Release|x64
    4564        {87835C33-64C9-4BA5-9B39-608BA5394387}.Release|x64.Build.0 = Release|x64
     65        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.AB_Release|Win32.ActiveCfg = Release|Win32
     66        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.AB_Release|Win32.Build.0 = Release|Win32
     67        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.AB_Release|x64.ActiveCfg = Release|x64
     68        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.AB_Release|x64.Build.0 = Release|x64
    4669        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Debug|Win32.ActiveCfg = Debug|Win32
    4770        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Debug|Win32.Build.0 = Debug|Win32
     
    5275        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Release|x64.ActiveCfg = Release|x64
    5376        {F01805B6-65B4-4708-88F4-A5E07DEA9FBD}.Release|x64.Build.0 = Release|x64
     77        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.AB_Release|Win32.ActiveCfg = Release|Win32
     78        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.AB_Release|Win32.Build.0 = Release|Win32
     79        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.AB_Release|x64.ActiveCfg = Release|x64
     80        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.AB_Release|x64.Build.0 = Release|x64
    5481        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.Debug|Win32.ActiveCfg = Debug|Win32
    5582        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.Debug|Win32.Build.0 = Debug|Win32
     
    6087        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.Release|x64.ActiveCfg = Release|x64
    6188        {B91DE511-E024-4EB9-B5FD-B2043E79AE44}.Release|x64.Build.0 = Release|x64
     89        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.AB_Release|Win32.ActiveCfg = Release|Win32
     90        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.AB_Release|Win32.Build.0 = Release|Win32
     91        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.AB_Release|x64.ActiveCfg = Release|x64
     92        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.AB_Release|x64.Build.0 = Release|x64
    6293        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.Debug|Win32.ActiveCfg = Debug|Win32
    6394        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.Debug|Win32.Build.0 = Debug|Win32
     
    6899        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.Release|x64.ActiveCfg = Release|x64
    69100        {58FF88A2-86BC-4480-95F4-71AF693FEF28}.Release|x64.Build.0 = Release|x64
     101        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.AB_Release|Win32.ActiveCfg = AB_Release|Win32
     102        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.AB_Release|Win32.Build.0 = AB_Release|Win32
     103        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.AB_Release|x64.ActiveCfg = AB_Release|Win32
     104        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.Debug|Win32.ActiveCfg = AB_Release|Win32
     105        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.Debug|Win32.Build.0 = AB_Release|Win32
     106        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.Debug|x64.ActiveCfg = AB_Release|Win32
     107        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.Release|Win32.ActiveCfg = AB_Release|Win32
     108        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.Release|Win32.Build.0 = AB_Release|Win32
     109        {75D495CD-8AB8-8B2D-A938-2A076F4310FF}.Release|x64.ActiveCfg = AB_Release|Win32
    70110    EndGlobalSection
    71111    GlobalSection(SolutionProperties) = preSolution
  • branches/egtra/ab5.0/abdev/abdev-impl/Resource/Load.h

    r781 r784  
    11#pragma once
     2
     3#include <memory>
     4#include <windows.h>
    25
    36namespace ActiveBasic { namespace Resource {
    47
    5 HICON LoadIcon(HINSTANCE hinst, USHORT id, int cxDesired, int cyDesired, UINT load);
     8HICON LoadIcon(HINSTANCE hinst, USHORT id, int cxDesired, int cyDesired, UINT load = 0);
     9
     10struct IconDeleter
     11{
     12    typedef HICON pointer;
     13
     14    void operator ()(HICON hicon) const
     15    {
     16        ::DestroyIcon(hicon);
     17    }
     18};
     19
     20typedef std::unique_ptr<HICON, IconDeleter> UniqueHIcon;
    621
    722}}
  • branches/egtra/ab5.0/abdev/abdev/ChildWndOnRebar.cpp

    r629 r784  
    229229
    230230
    231 #define ADD_TOOLBAR_BUTTON(id,iconID,lpszToolTip) pobj_StandardToolbar->Add(id,(HICON)LoadImage(hIconResInst,MAKEINTRESOURCE(iconID),IMAGE_ICON,16,16,0),lpszToolTip)
     231#define ADD_TOOLBAR_BUTTON(id, iconID, lpszToolTip) pobj_StandardToolbar->Add((id), ActiveBasic::Resource::LoadIcon(hIconResInst, (iconID), 16, 16), (lpszToolTip))
    232232#define ADD_TOOLBAR_SEPARATOR pobj_StandardToolbar->Add(0,0,0)
    233233    //ボタン類を追加
     
    279279    pobj_DebuggerToolbar->Create(hDebuggerToolbarPager);
    280280
    281 #define ADD_TOOLBAR_BUTTON(id,iconID,lpszToolTip) pobj_DebuggerToolbar->Add(id,(HICON)LoadImage(hIconResInst,MAKEINTRESOURCE(iconID),IMAGE_ICON,16,16,0),lpszToolTip)
     281#define ADD_TOOLBAR_BUTTON(id, iconID, lpszToolTip) pobj_DebuggerToolbar->Add((id), ActiveBasic::Resource::LoadIcon(hIconResInst, (iconID), 16, 16), (lpszToolTip))
    282282#define ADD_TOOLBAR_SEPARATOR pobj_DebuggerToolbar->Add(0,0,0)
    283283    //ボタン類を追加
     
    327327    pobj_ReleaseToolbar->Create(hReleaseToolbarPager);
    328328
    329 #define ADD_TOOLBAR_BUTTON(id,iconID,lpszToolTip) pobj_ReleaseToolbar->Add(id,(HICON)LoadImage(hIconResInst,MAKEINTRESOURCE(iconID),IMAGE_ICON,16,16,0),lpszToolTip)
     329#define ADD_TOOLBAR_BUTTON(id, iconID, lpszToolTip) pobj_ReleaseToolbar->Add((id), ActiveBasic::Resource::LoadIcon(hIconResInst, (iconID), 16, 16), (lpszToolTip))
    330330#define ADD_TOOLBAR_SEPARATOR pobj_ReleaseToolbar->Add(0,0,0)
    331331    //ボタン類を追加
  • branches/egtra/ab5.0/abdev/abdev/Common.h

    r772 r784  
    3333#include "Debugger.h"
    3434
     35#include <Resource/Load.h>
    3536
    3637#pragma comment(lib, "wininet.lib")
  • branches/egtra/ab5.0/abdev/abdev/DrawBuffer.cpp

    r778 r784  
    222222
    223223                if(bBreakPoint){
    224                     DrawIconEx(memdc,3,i*font_height+(font_height-16)/2,
    225                         (HICON)LoadImage(hIconResInst,MAKEINTRESOURCE(IDI_BREAKPOINT_FLAG),IMAGE_ICON,16,16,LR_SHARED),
    226                         16,16,0,NULL,DI_NORMAL);
     224                    ActiveBasic::Resource::UniqueHIcon hicon(ActiveBasic::Resource::LoadIcon(hIconResInst, IDI_BREAKPOINT_FLAG, 16, 16));
     225                    DrawIconEx(memdc,3,i*font_height+(font_height-16)/2,hicon.get(),16,16,0,NULL,DI_NORMAL);
    227226                }
    228227                else{
  • 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
  • branches/egtra/ab5.0/abdev/abdev/abdev.vcxproj

    r781 r784  
    5454    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
    5555    <Import Project="..\ab-common-32.props" />
     56    <Import Project="..\ab-common.props" />
    5657  </ImportGroup>
    5758  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
     
    5960    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
    6061    <Import Project="..\ab-common-32.props" />
     62    <Import Project="..\ab-common.props" />
    6163  </ImportGroup>
    6264  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    6365    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    6466    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
     67    <Import Project="..\ab-common.props" />
    6568  </ImportGroup>
    6669  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
    6770    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    6871    <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
     72    <Import Project="..\ab-common.props" />
    6973  </ImportGroup>
    7074  <PropertyGroup Label="UserMacros" />
     
    97101      <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
    98102      <Optimization>Disabled</Optimization>
    99       <AdditionalIncludeDirectories>..\..\;..\..\cpplibs;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    100103      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;JPN;WINVER=0x040A;_WIN32_WINNT=0x0403;_WIN32_WINDOWS=0x0400;_WIN32_IE=0x0401;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    101104      <MinimalRebuild>false</MinimalRebuild>
     
    104107      <PrecompiledHeader>Use</PrecompiledHeader>
    105108      <WarningLevel>Level3</WarningLevel>
    106       <SuppressStartupBanner>true</SuppressStartupBanner>
    107       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     109      <AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    108110    </ClCompile>
    109111    <ResourceCompile>
     
    140142      <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
    141143      <Optimization>Disabled</Optimization>
    142       <AdditionalIncludeDirectories>..\..\;..\..\cpplibs;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    143144      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;JPN;WINVER=0x0501;_WIN32_WINNT=0x0501;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    144145      <MinimalRebuild>false</MinimalRebuild>
     
    147148      <PrecompiledHeader>Use</PrecompiledHeader>
    148149      <WarningLevel>Level3</WarningLevel>
    149       <SuppressStartupBanner>true</SuppressStartupBanner>
    150       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     150      <AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    151151    </ClCompile>
    152152    <ResourceCompile>
     
    182182      <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
    183183      <Optimization>MinSpace</Optimization>
    184       <AdditionalIncludeDirectories>..\..\;..\..\cpplibs;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    185184      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;JPN;WINVER=0x040A;_WIN32_WINNT=0x0403;_WIN32_WINDOWS=0x0400;_WIN32_IE=0x0401;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    186185      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    187186      <PrecompiledHeader>Use</PrecompiledHeader>
    188187      <WarningLevel>Level3</WarningLevel>
    189       <SuppressStartupBanner>true</SuppressStartupBanner>
    190       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     188      <AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    191189    </ClCompile>
    192190    <ResourceCompile>
     
    226224      <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
    227225      <Optimization>MinSpace</Optimization>
    228       <AdditionalIncludeDirectories>..\..\;..\..\cpplibs;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    229226      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;JPN;WINVER=0x0501;_WIN32_WINNT=0x0501;TIXML_USE_STL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    230227      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    231228      <PrecompiledHeader>Use</PrecompiledHeader>
    232229      <WarningLevel>Level3</WarningLevel>
    233       <SuppressStartupBanner>true</SuppressStartupBanner>
    234       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     230      <AdditionalIncludeDirectories>.\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    235231    </ClCompile>
    236232    <ResourceCompile>
Note: See TracChangeset for help on using the changeset viewer.