Commits

Stefan Cosma committed e948f7e

Add icon and make dialog topmost

Comments (0)

Files changed (6)

Plugin/ConfigDialog.cpp

 
 BOOL ConfigDialog::OnInitDialog()
 {
+	SetIconLarge(IDI_HOTKEYS_ICON);
+	SetIconSmall(IDI_HOTKEYS_ICON);
+
 	if (g_KeyNames.size() == 0)
 	{
 		::InitKeyNames();

Plugin/Plugin.vcxproj

   <ItemGroup>
     <ResourceCompile Include="resource.rc" />
   </ItemGroup>
+  <ItemGroup>
+    <None Include="icon.ico" />
+  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>

Plugin/Plugin.vcxproj.filters

       <Filter>Resource Files</Filter>
     </ResourceCompile>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="icon.ico">
+      <Filter>Resource Files</Filter>
+    </None>
+  </ItemGroup>
 </Project>

Plugin/icon.ico

Added
New image

Plugin/resource.h

 #define IDS_COLUMN_KEYCOMB              103
 #define IDD_HOTKEY_DIALOG               103
 #define IDS_VK_SPACE                    104
+#define IDI_HOTKEYS_ICON                104
 #define IDS_VK_BACK                     105
 #define IDS_VK_TAB                      106
 #define IDS_VK_ESCAPE                   107
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        104
+#define _APS_NEXT_RESOURCE_VALUE        105
 #define _APS_NEXT_COMMAND_VALUE         40001
 #define _APS_NEXT_CONTROL_VALUE         1009
 #define _APS_NEXT_SYMED_VALUE           101

Plugin/resource.rc

 
 IDD_CONFIG_DIALOG DIALOGEX 0, 0, 258, 265
 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOPMOST
 CAPTION "iTunes Global HotKeys Plugin"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
 
 /////////////////////////////////////////////////////////////////////////////
 //
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_HOTKEYS_ICON        ICON                    "icon.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
 // String Table
 //