Skip to content

Commit

Permalink
metapath support clear window position history.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Oct 3, 2018
1 parent 63cb420 commit 0ee3099
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions metapath/src/Dialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,15 @@ INT_PTR CALLBACK GeneralPageProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lPa

case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case NM_CLICK:
case NM_RETURN:
switch (((LPNMHDR)lParam)->idFrom) {
case IDC_CLEARWINPOS:
IniClearSection(INI_SECTION_NAME_WINDOW_POSITION);
break;
}
break;

case PSN_APPLY:
if (IsWindowEnabled(GetDlgItem(hwnd, IDC_SAVESETTINGS))) {
bSaveSettings = IsButtonChecked(hwnd, IDC_SAVESETTINGS);
Expand Down
5 changes: 3 additions & 2 deletions metapath/src/metapath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,10 @@ BEGIN
CONTROL "&Try to reuse existing window when metapath is started.",
IDC_REUSEWINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,
133,220,10
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,10,151,205,1
CONTROL "<a>Clear window position history</a>",IDC_CLEARWINPOS,"SysLink",WS_TABSTOP,20,145,103,12
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,10,161,205,1
CONTROL "&Save settings on exit.",IDC_SAVESETTINGS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,10,160,100,10
BS_AUTOCHECKBOX | WS_TABSTOP,10,170,100,10
END

IDPP_ADVANCED DIALOGEX 0, 0, 232, 185
Expand Down
1 change: 1 addition & 0 deletions metapath/src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
#define IDD_FINDTARGET 108
#define IDC_DDEMSG 108
#define IDI_CROSS2 108
#define IDC_CLEARWINPOS 108
#define IDC_ESCEXIT 109
#define IDD_FINDWIN 109
#define IDC_DDEAPP 109
Expand Down

0 comments on commit 0ee3099

Please sign in to comment.