@@ -9784,7 +9784,10 @@ LRESULT APIENTRY MainWndProc(
97849784 {
97859785 if (!RegisterHotKey (hWnd, ZOOM_HOTKEY, g_ToggleMod, g_ToggleKey & 0xFF ))
97869786 {
9787- MessageBox (hWnd, L" The specified zoom toggle hotkey is already in use.\n Select a different zoom toggle hotkey." , APPNAME, MB_ICONERROR);
9787+ if (!g_StartedByPowerToys)
9788+ {
9789+ MessageBox (hWnd, L" The specified zoom toggle hotkey is already in use.\n Select a different zoom toggle hotkey." , APPNAME, MB_ICONERROR);
9790+ }
97889791 showOptions = TRUE ;
97899792 }
97909793 }
@@ -9793,23 +9796,32 @@ LRESULT APIENTRY MainWndProc(
97939796 if (!RegisterHotKey (hWnd, LIVE_HOTKEY, g_LiveZoomToggleMod, g_LiveZoomToggleKey & 0xFF ) ||
97949797 !RegisterHotKey (hWnd, LIVE_DRAW_HOTKEY, g_LiveZoomToggleMod ^ MOD_SHIFT, g_LiveZoomToggleKey & 0xFF ))
97959798 {
9796- MessageBox (hWnd, L" The specified live-zoom toggle hotkey is already in use.\n Select a different zoom toggle hotkey." , APPNAME, MB_ICONERROR);
9799+ if (!g_StartedByPowerToys)
9800+ {
9801+ MessageBox (hWnd, L" The specified live-zoom toggle hotkey is already in use.\n Select a different zoom toggle hotkey." , APPNAME, MB_ICONERROR);
9802+ }
97979803 showOptions = TRUE ;
97989804 }
97999805 }
98009806 if (g_DrawToggleKey)
98019807 {
98029808 if (!RegisterHotKey (hWnd, DRAW_HOTKEY, g_DrawToggleMod, g_DrawToggleKey & 0xFF ))
98039809 {
9804- MessageBox (hWnd, L" The specified draw w/out zoom hotkey is already in use.\n Select a different draw w/out zoom hotkey." , APPNAME, MB_ICONERROR);
9810+ if (!g_StartedByPowerToys)
9811+ {
9812+ MessageBox (hWnd, L" The specified draw w/out zoom hotkey is already in use.\n Select a different draw w/out zoom hotkey." , APPNAME, MB_ICONERROR);
9813+ }
98059814 showOptions = TRUE ;
98069815 }
98079816 }
98089817 if (g_BreakToggleKey)
98099818 {
98109819 if (!RegisterHotKey (hWnd, BREAK_HOTKEY, g_BreakToggleMod, g_BreakToggleKey & 0xFF ))
98119820 {
9812- MessageBox (hWnd, L" The specified break timer hotkey is already in use.\n Select a different break timer hotkey." , APPNAME, MB_ICONERROR);
9821+ if (!g_StartedByPowerToys)
9822+ {
9823+ MessageBox (hWnd, L" The specified break timer hotkey is already in use.\n Select a different break timer hotkey." , APPNAME, MB_ICONERROR);
9824+ }
98139825 showOptions = TRUE ;
98149826 }
98159827 }
@@ -9818,7 +9830,10 @@ LRESULT APIENTRY MainWndProc(
98189830 if (!RegisterHotKey (hWnd, DEMOTYPE_HOTKEY, g_DemoTypeToggleMod, g_DemoTypeToggleKey & 0xFF ) ||
98199831 !RegisterHotKey (hWnd, DEMOTYPE_RESET_HOTKEY, (g_DemoTypeToggleMod ^ MOD_SHIFT), g_DemoTypeToggleKey & 0xFF ))
98209832 {
9821- MessageBox (hWnd, L" The specified live-type hotkey is already in use.\n Select a different live-type hotkey." , APPNAME, MB_ICONERROR);
9833+ if (!g_StartedByPowerToys)
9834+ {
9835+ MessageBox (hWnd, L" The specified live-type hotkey is already in use.\n Select a different live-type hotkey." , APPNAME, MB_ICONERROR);
9836+ }
98229837 showOptions = TRUE ;
98239838 }
98249839 }
@@ -9827,7 +9842,10 @@ LRESULT APIENTRY MainWndProc(
98279842 if (!RegisterHotKey (hWnd, SNIP_HOTKEY, g_SnipToggleMod, g_SnipToggleKey & 0xFF ) ||
98289843 !RegisterHotKey (hWnd, SNIP_SAVE_HOTKEY, (g_SnipToggleMod ^ MOD_SHIFT), g_SnipToggleKey & 0xFF ))
98299844 {
9830- MessageBox (hWnd, L" The specified snip hotkey is already in use.\n Select a different snip hotkey." , APPNAME, MB_ICONERROR);
9845+ if (!g_StartedByPowerToys)
9846+ {
9847+ MessageBox (hWnd, L" The specified snip hotkey is already in use.\n Select a different snip hotkey." , APPNAME, MB_ICONERROR);
9848+ }
98319849 showOptions = TRUE ;
98329850 }
98339851 }
@@ -9837,15 +9855,21 @@ LRESULT APIENTRY MainWndProc(
98379855 if (!RegisterHotKey (hWnd, SNIP_PANORAMA_HOTKEY, g_SnipPanoramaToggleMod | MOD_NOREPEAT, g_SnipPanoramaToggleKey & 0xFF ) ||
98389856 !RegisterHotKey (hWnd, SNIP_PANORAMA_SAVE_HOTKEY, ( g_SnipPanoramaToggleMod ^ MOD_SHIFT ) | MOD_NOREPEAT, g_SnipPanoramaToggleKey & 0xFF ))
98399857 {
9840- MessageBox (hWnd, L" The specified panorama snip hotkey is already in use.\n Select a different panorama snip hotkey." , APPNAME, MB_ICONERROR);
9858+ if (!g_StartedByPowerToys)
9859+ {
9860+ MessageBox (hWnd, L" The specified panorama snip hotkey is already in use.\n Select a different panorama snip hotkey." , APPNAME, MB_ICONERROR);
9861+ }
98419862 showOptions = TRUE ;
98429863 }
98439864 }
98449865 if (g_SnipOcrToggleKey)
98459866 {
98469867 if (!RegisterHotKey (hWnd, SNIP_OCR_HOTKEY, g_SnipOcrToggleMod, g_SnipOcrToggleKey & 0xFF ))
98479868 {
9848- MessageBox (hWnd, L" The specified snip OCR hotkey is already in use.\n Select a different snip OCR hotkey." , APPNAME, MB_ICONERROR);
9869+ if (!g_StartedByPowerToys)
9870+ {
9871+ MessageBox (hWnd, L" The specified snip OCR hotkey is already in use.\n Select a different snip OCR hotkey." , APPNAME, MB_ICONERROR);
9872+ }
98499873 showOptions = TRUE ;
98509874 }
98519875 }
@@ -9855,7 +9879,10 @@ LRESULT APIENTRY MainWndProc(
98559879 !RegisterHotKey (hWnd, RECORD_CROP_HOTKEY, (g_RecordToggleMod ^ MOD_SHIFT) | MOD_NOREPEAT, g_RecordToggleKey & 0xFF ) ||
98569880 !RegisterHotKey (hWnd, RECORD_WINDOW_HOTKEY, (g_RecordToggleMod ^ MOD_ALT) | MOD_NOREPEAT, g_RecordToggleKey & 0xFF ))
98579881 {
9858- MessageBox (hWnd, L" The specified record hotkey is already in use.\n Select a different record hotkey." , APPNAME, MB_ICONERROR);
9882+ if (!g_StartedByPowerToys)
9883+ {
9884+ MessageBox (hWnd, L" The specified record hotkey is already in use.\n Select a different record hotkey." , APPNAME, MB_ICONERROR);
9885+ }
98599886 showOptions = TRUE ;
98609887 }
98619888 }
0 commit comments