aboutsummaryrefslogtreecommitdiff
path: root/CPP/Windows/Control/Window2.cpp
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2023-06-21 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2023-12-17 14:59:19 +0500
commit5b39dc76f1bc82f941d5c800ab9f34407a06b53a (patch)
treefe5e17420300b715021a76328444088d32047963 /CPP/Windows/Control/Window2.cpp
parent93be7d4abfd4233228f58ee1fbbcd76d91be66a4 (diff)
download7zip-23.01.tar.gz
7zip-23.01.tar.bz2
7zip-23.01.zip
23.0123.01
Diffstat (limited to '')
-rw-r--r--CPP/Windows/Control/Window2.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/CPP/Windows/Control/Window2.cpp b/CPP/Windows/Control/Window2.cpp
index 994d96e..8fe908e 100644
--- a/CPP/Windows/Control/Window2.cpp
+++ b/CPP/Windows/Control/Window2.cpp
@@ -32,9 +32,9 @@ static LRESULT CALLBACK WindowProcedure(HWND aHWND, UINT message, WPARAM wParam,
32 if (message == MY_START_WM_CREATE) 32 if (message == MY_START_WM_CREATE)
33 tempWindow.SetUserDataLongPtr((LONG_PTR)(((LPCREATESTRUCT)lParam)->lpCreateParams)); 33 tempWindow.SetUserDataLongPtr((LONG_PTR)(((LPCREATESTRUCT)lParam)->lpCreateParams));
34 CWindow2 *window = (CWindow2 *)(tempWindow.GetUserDataLongPtr()); 34 CWindow2 *window = (CWindow2 *)(tempWindow.GetUserDataLongPtr());
35 if (window != NULL && message == MY_START_WM_CREATE) 35 if (window && message == MY_START_WM_CREATE)
36 window->Attach(aHWND); 36 window->Attach(aHWND);
37 if (window == 0) 37 if (!window)
38 { 38 {
39 #ifndef _UNICODE 39 #ifndef _UNICODE
40 if (g_IsNT) 40 if (g_IsNT)
@@ -140,7 +140,7 @@ LRESULT CWindow2::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
140 return -1; 140 return -1;
141 break; 141 break;
142 case WM_COMMAND: 142 case WM_COMMAND:
143 if (OnCommand(wParam, lParam, result)) 143 if (OnCommand(HIWORD(wParam), LOWORD(wParam), lParam, result))
144 return result; 144 return result;
145 break; 145 break;
146 case WM_NOTIFY: 146 case WM_NOTIFY:
@@ -160,12 +160,14 @@ LRESULT CWindow2::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
160 return DefProc(message, wParam, lParam); 160 return DefProc(message, wParam, lParam);
161} 161}
162 162
163bool CWindow2::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT &result) 163/*
164bool CWindow2::OnCommand2(WPARAM wParam, LPARAM lParam, LRESULT &result)
164{ 165{
165 return OnCommand(HIWORD(wParam), LOWORD(wParam), lParam, result); 166 return OnCommand(HIWORD(wParam), LOWORD(wParam), lParam, result);
166} 167}
168*/
167 169
168bool CWindow2::OnCommand(int /* code */, int /* itemID */, LPARAM /* lParam */, LRESULT & /* result */) 170bool CWindow2::OnCommand(unsigned /* code */, unsigned /* itemID */, LPARAM /* lParam */, LRESULT & /* result */)
169{ 171{
170 return false; 172 return false;
171 // return DefProc(message, wParam, lParam); 173 // return DefProc(message, wParam, lParam);
@@ -176,7 +178,7 @@ bool CWindow2::OnCommand(int /* code */, int /* itemID */, LPARAM /* lParam */,
176} 178}
177 179
178/* 180/*
179bool CDialog::OnButtonClicked(int buttonID, HWND buttonHWND) 181bool CDialog::OnButtonClicked(unsigned buttonID, HWND buttonHWND)
180{ 182{
181 switch (buttonID) 183 switch (buttonID)
182 { 184 {