1 //---------------------------------------------------------------------------
5 #include "PopupConfig.h"
8 #include "../DCHook/DCHook.h"
9 //---------------------------------------------------------------------------
10 #pragma package(smart_init)
11 #pragma resource "*.dfm"
12 TPopupConfigDlg *PopupConfigDlg;
13 //---------------------------------------------------------------------------
14 __fastcall TPopupConfigDlg::TPopupConfigDlg(TComponent* Owner)
19 //---------------------------------------------------------------------------
20 void __fastcall TPopupConfigDlg::cbGroupOpenClick(TObject *Sender)
22 bool f = cbGroupOpen->Checked;
23 edGroupName->Enabled = f;
24 lbGroupName->Enabled = f;
26 //---------------------------------------------------------------------------
27 void __fastcall TPopupConfigDlg::FormShow(TObject *Sender)
30 cbGroupOpenClick( this );
32 // Add groups to combo-box //
38 ini.ReadValues( PFS_GROUP, edGroupName->Items );
40 if (!cbGroupOpen->Checked ){
41 int sel = ini.ReadInteger( PFS_COMMON, PFS_GRPSEL, -1 );
42 edGroupName->ItemIndex = sel;
45 // WM_COPYDATA
\82Ì
\8fê
\8d\87\82Í
\81A
\8e«
\8f\91\83O
\83\8b\81[
\83v
\8ew
\92è
\82Í
\82Å
\82«
\82È
\82¢
46 cbGroupOpen->Enabled = false;
47 lbGroupName->Enabled = false;
48 edGroupName->Enabled = false;
53 cbUse64->Visible = true;
55 //---------------------------------------------------------------------------
56 void __fastcall TPopupConfigDlg::FormCloseQuery(TObject *Sender,
59 if (ModalResult!=mrOk) return;
61 if (cbToggleKey->ItemIndex != 0){
62 if (cbToggleKey->ItemIndex-1 == cbPopupKey->ItemIndex){
63 //
\93¯
\82¶
\83L
\81[
\82Í
\8a\84\82è
\93\96\82Ä
\82ç
\82ê
\82È
\82¢
64 Application->MessageBox("
\83|
\83b
\83v
\83A
\83b
\83v
\8c\9f\8dõ
\82Æ
\89E
\83N
\83\8a\83b
\83N
\8c\9f\8dõON/OFF
\82Í
\93¯
\82¶
\83L
\81[
\82ð
\8a\84\82è
\93\96\82Ä
\82ç
\82ê
\82Ü
\82¹
\82ñ",Caption.c_str(),MB_OK);
70 //---------------------------------------------------------------------------
71 void __fastcall TPopupConfigDlg::cbCaptureModeChange(TObject *Sender)
73 bool f = cbCaptureMode->ItemIndex != 2;
75 lbScaling->Enabled = f;
76 lbScaleNormal->Enabled = f;
77 tbScaling->Enabled = f;
78 lbScaleMax->Enabled = f;
80 lbAMODIPath->Enabled = f;
81 edAMODIPath->Enabled = f;
82 btnBrowse->Enabled = f;
84 //---------------------------------------------------------------------------
85 void __fastcall TPopupConfigDlg::btnHelpClick(TObject *Sender)
89 //---------------------------------------------------------------------------
90 void __fastcall TPopupConfigDlg::actHelpExecute(TObject *Sender)
94 //---------------------------------------------------------------------------
95 void __fastcall TPopupConfigDlg::lbDebugDblClick(TObject *Sender)
97 miShowAMODI->Visible = true;
99 //---------------------------------------------------------------------------
100 void __fastcall TPopupConfigDlg::miShowAMODIClick(TObject *Sender)
104 //---------------------------------------------------------------------------
105 void __fastcall TPopupConfigDlg::cbDPISettingClick(TObject *Sender)
107 bool setting = cbDPISetting->Checked;
108 lbScaling->Enabled = setting;
109 lbScaleNormal->Enabled = setting;
110 tbScaling->Enabled = setting;
112 //---------------------------------------------------------------------------
114 Ctrl+
\89E
\83N
\83\8a\83b
\83N
115 Shift+
\89E
\83N
\83\8a\83b
\83N
116 Alt+
\89E
\83N
\83\8a\83b
\83N
117 Ctrl+Shift+
\89E
\83N
\83\8a\83b
\83N
118 Ctrl+Alt+
\89E
\83N
\83\8a\83b
\83N
119 Shift+Alt+
\89E
\83N
\83\8a\83b
\83N
120 Ctrl+
\8d¶
\83N
\83\8a\83b
\83N
121 Shift+
\8d¶
\83N
\83\8a\83b
\83N
122 Alt+
\8d¶
\83N
\83\8a\83b
\83N
123 Ctrl+Shift+
\8d¶
\83N
\83\8a\83b
\83N
124 Ctrl+Alt+
\8d¶
\83N
\83\8a\83b
\83N
125 Shift+Alt+
\8d¶
\83N
\83\8a\83b
\83N
126 \8d¶
\83N
\83\8a\83b
\83N+
\89E
\83N
\83\8a\83b
\83N
\81¨
\8bp
\89º
128 int KeyCombTable[] = {
132 KF_CONTROL + KF_SHIFT,
133 KF_CONTROL + KF_MENU,
135 KF_CONTROL + KF_LEFTCLICK,
136 KF_SHIFT + KF_LEFTCLICK,
137 KF_MENU + KF_LEFTCLICK,
138 KF_CONTROL + KF_SHIFT + KF_LEFTCLICK,
139 KF_CONTROL + KF_MENU + KF_LEFTCLICK,
140 KF_SHIFT + KF_MENU + KF_LEFTCLICK,
142 KF_CONTROL + KF_MIDCLICK,
143 KF_SHIFT + KF_MIDCLICK,
144 KF_MENU + KF_MIDCLICK,
145 KF_CONTROL + KF_SHIFT + KF_MIDCLICK,
146 KF_CONTROL + KF_MENU + KF_MIDCLICK,
147 KF_SHIFT + KF_MENU + KF_MIDCLICK,
151 // key combination -> index
152 int KeyCombToIndex( int keycomb )
155 for (i=0;KeyCombTable[i];i++){
156 if (keycomb == KeyCombTable[i])
161 int IndexToKeyComb( int index )
165 return KeyCombTable[index];
167 void TPopupConfigDlg::SetPopupKey( int keycomb )
169 cbPopupKey->ItemIndex = KeyCombToIndex( keycomb );
171 int TPopupConfigDlg::GetPopupKey( )
173 return IndexToKeyComb( cbPopupKey->ItemIndex );
175 void TPopupConfigDlg::SetToggleKey( int keycomb )
177 cbToggleKey->ItemIndex = KeyCombToIndex( keycomb )+1;
179 int TPopupConfigDlg::GetToggleKey( )
181 return IndexToKeyComb( cbToggleKey->ItemIndex-1 );
184 void TPopupConfigDlg::SetDPIDetect(bool dpi_detect)
186 cbDPISetting->Checked = !dpi_detect;
188 bool TPopupConfigDlg::GetDPIDetect()
190 return !cbDPISetting->Checked;
192 void TPopupConfigDlg::SetScaler(int scale)
195 tbScaling->Position = 0;
198 tbScaling->Position = 1;
200 tbScaling->Position = 2;
203 int TPopupConfigDlg::GetScaler()
205 switch (tbScaling->Position){
212 void TPopupConfigDlg::SetCaptureMode(int mode)
215 case CM_TEXT | CM_IMAGE: cbCaptureMode->ItemIndex = 0; break;
216 case CM_IMAGE: cbCaptureMode->ItemIndex = 1; break;
217 case CM_TEXT: cbCaptureMode->ItemIndex = 2; break;
220 int TPopupConfigDlg::GetCaptureMode()
222 switch (cbCaptureMode->ItemIndex){
223 default: case 0: return CM_TEXT | CM_IMAGE;
224 case 1: return CM_IMAGE;
225 case 2: return CM_TEXT;