work save

This commit is contained in:
Roy Qu 2022-02-25 18:56:34 +08:00
parent bc44f54788
commit dcf2c4a8c9
2 changed files with 10 additions and 10 deletions

View File

@ -5,9 +5,9 @@
HINSTANCE hInst; HINSTANCE hInst;
LRESULT MainDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK MainDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
LRESULT TxtPasswordWndProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK TxtPasswordWndProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
WNDPROC lpfnTxtPasswordWndProc=NULL; WNDPROC lpfnTxtPasswordWndProc=NULL;
HWND hMainDlg = NULL; HWND hMainDlg = NULL;
@ -51,7 +51,7 @@ LRESULT CALLBACK TxtPasswordWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
return CallWindowProc(lpfnTxtPasswordWndProc, hwnd, msg, wParam, lParam); return CallWindowProc(lpfnTxtPasswordWndProc, hwnd, msg, wParam, lParam);
} }
LRESULT MainDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { LRESULT CALLBACK MainDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) { switch (message) {
case WM_INITDIALOG : case WM_INITDIALOG :
return TRUE ; return TRUE ;
@ -63,12 +63,6 @@ LRESULT MainDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
return TRUE ; return TRUE ;
} }
break ; break ;
case WM_KEYUP:
printf("%d\n",wParam);
if (wParam == VK_RETURN) {
DestroyWindow(hDlg);
}
break;
case WM_CLOSE: case WM_CLOSE:
DestroyWindow(hDlg); DestroyWindow(hDlg);
return TRUE; return TRUE;
@ -76,5 +70,5 @@ LRESULT MainDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
PostQuitMessage(0); PostQuitMessage(0);
return TRUE; return TRUE;
}; };
return FALSE;//返回FALSE给缺省对话框函数DefDlgProc(),表示没有处理本消息 return FALSE;
} }

View File

@ -20,3 +20,9 @@ win32: {
target.path = $${PREFIX} target.path = $${PREFIX}
} }
} }
# Default rules for deployment.
qnx: target.path = $${PREFIX}/libexec/$${APP_NAME}
else: unix:!android: target.path = $${PREFIX}/libexec/$${APP_NAME}
!isEmpty(target.path): INSTALLS += target