UIBase.cpp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. #include "StdAfx.h"
  2. #ifdef _DEBUG
  3. #include <shlwapi.h>
  4. #pragma comment(lib, "shlwapi.lib")
  5. #endif
  6. namespace DuiLib {
  7. /////////////////////////////////////////////////////////////////////////////////////
  8. //
  9. //
  10. LPCTSTR MsgDef(UINT uMsg)
  11. {
  12. #define MSGDEF(x) if(uMsg==x) return _T(#x)
  13. MSGDEF(WM_SETCURSOR);
  14. MSGDEF(WM_NCHITTEST);
  15. MSGDEF(WM_NCPAINT);
  16. MSGDEF(WM_PAINT);
  17. MSGDEF(WM_ERASEBKGND);
  18. MSGDEF(WM_NCMOUSEMOVE);
  19. MSGDEF(WM_MOUSEMOVE);
  20. MSGDEF(WM_MOUSELEAVE);
  21. MSGDEF(WM_MOUSEHOVER);
  22. MSGDEF(WM_NOTIFY);
  23. MSGDEF(WM_COMMAND);
  24. MSGDEF(WM_MEASUREITEM);
  25. MSGDEF(WM_DRAWITEM);
  26. MSGDEF(WM_LBUTTONDOWN);
  27. MSGDEF(WM_LBUTTONUP);
  28. MSGDEF(WM_LBUTTONDBLCLK);
  29. MSGDEF(WM_RBUTTONDOWN);
  30. MSGDEF(WM_RBUTTONUP);
  31. MSGDEF(WM_RBUTTONDBLCLK);
  32. MSGDEF(WM_SETFOCUS);
  33. MSGDEF(WM_KILLFOCUS);
  34. MSGDEF(WM_MOVE);
  35. MSGDEF(WM_SIZE);
  36. MSGDEF(WM_SIZING);
  37. MSGDEF(WM_MOVING);
  38. MSGDEF(WM_GETMINMAXINFO);
  39. MSGDEF(WM_CAPTURECHANGED);
  40. MSGDEF(WM_WINDOWPOSCHANGED);
  41. MSGDEF(WM_WINDOWPOSCHANGING);
  42. MSGDEF(WM_NCCALCSIZE);
  43. MSGDEF(WM_NCCREATE);
  44. MSGDEF(WM_NCDESTROY);
  45. MSGDEF(WM_TIMER);
  46. MSGDEF(WM_KEYDOWN);
  47. MSGDEF(WM_KEYUP);
  48. MSGDEF(WM_CHAR);
  49. MSGDEF(WM_SYSKEYDOWN);
  50. MSGDEF(WM_SYSKEYUP);
  51. MSGDEF(WM_SYSCOMMAND);
  52. MSGDEF(WM_SYSCHAR);
  53. MSGDEF(WM_VSCROLL);
  54. MSGDEF(WM_HSCROLL);
  55. MSGDEF(WM_CHAR);
  56. MSGDEF(WM_SHOWWINDOW);
  57. MSGDEF(WM_PARENTNOTIFY);
  58. MSGDEF(WM_CREATE);
  59. MSGDEF(WM_NCACTIVATE);
  60. MSGDEF(WM_ACTIVATE);
  61. MSGDEF(WM_ACTIVATEAPP);
  62. MSGDEF(WM_CLOSE);
  63. MSGDEF(WM_DESTROY);
  64. MSGDEF(WM_GETICON);
  65. MSGDEF(WM_GETTEXT);
  66. MSGDEF(WM_GETTEXTLENGTH);
  67. static TCHAR szMsg[10];
  68. ::wsprintf(szMsg, _T("0x%04X"), uMsg);
  69. return szMsg;
  70. }
  71. void UILIB_API DUI__Trace(LPCTSTR pstrFormat, ...)
  72. {
  73. #ifdef _DEBUG
  74. TCHAR szBuffer[300] = { 0 };
  75. va_list args;
  76. va_start(args, pstrFormat);
  77. ::wvnsprintf(szBuffer, lengthof(szBuffer) - 2, pstrFormat, args);
  78. _tcscat(szBuffer, _T("\n"));
  79. va_end(args);
  80. ::OutputDebugString(szBuffer);
  81. #endif
  82. }
  83. void UILIB_API DUI__TraceMsg( UINT uMsg )
  84. {
  85. DUI__Trace(MsgDef(uMsg));
  86. }
  87. /////////////////////////////////////////////////////////////////////////////////////
  88. //
  89. //
  90. //////////////////////////////////////////////////////////////////////////
  91. //
  92. DUI_BASE_BEGIN_MESSAGE_MAP(CNotifyPump)
  93. DUI_END_MESSAGE_MAP()
  94. static const DUI_MSGMAP_ENTRY* DuiFindMessageEntry(const DUI_MSGMAP_ENTRY* lpEntry,TNotifyUI& msg )
  95. {
  96. CDuiString sMsgType = msg.sType;
  97. CDuiString sCtrlName = msg.pSender->GetName();
  98. const DUI_MSGMAP_ENTRY* pMsgTypeEntry = NULL;
  99. while (lpEntry->nSig != DuiSig_end)
  100. {
  101. if(lpEntry->sMsgType==sMsgType)
  102. {
  103. if(!lpEntry->sCtrlName.IsEmpty())
  104. {
  105. if(lpEntry->sCtrlName==sCtrlName)
  106. {
  107. return lpEntry;
  108. }
  109. }
  110. else
  111. {
  112. pMsgTypeEntry = lpEntry;
  113. }
  114. }
  115. lpEntry++;
  116. }
  117. return pMsgTypeEntry;
  118. }
  119. bool CNotifyPump::AddVirtualWnd(CDuiString strName,CNotifyPump* pObject)
  120. {
  121. if( m_VirtualWndMap.Find(strName) == NULL )
  122. {
  123. m_VirtualWndMap.Insert(strName.GetData(),(LPVOID)pObject);
  124. return true;
  125. }
  126. return false;
  127. }
  128. bool CNotifyPump::RemoveVirtualWnd(CDuiString strName)
  129. {
  130. if( m_VirtualWndMap.Find(strName) != NULL )
  131. {
  132. m_VirtualWndMap.Remove(strName);
  133. return true;
  134. }
  135. return false;
  136. }
  137. bool CNotifyPump::LoopDispatch(TNotifyUI& msg)
  138. {
  139. const DUI_MSGMAP_ENTRY* lpEntry = NULL;
  140. const DUI_MSGMAP* pMessageMap = NULL;
  141. #ifndef UILIB_STATIC
  142. for(pMessageMap = GetMessageMap(); pMessageMap!=NULL; pMessageMap = (*pMessageMap->pfnGetBaseMap)())
  143. #else
  144. for(pMessageMap = GetMessageMap(); pMessageMap!=NULL; pMessageMap = pMessageMap->pBaseMap)
  145. #endif
  146. {
  147. #ifndef UILIB_STATIC
  148. ASSERT(pMessageMap != (*pMessageMap->pfnGetBaseMap)());
  149. #else
  150. ASSERT(pMessageMap != pMessageMap->pBaseMap);
  151. #endif
  152. if ((lpEntry = DuiFindMessageEntry(pMessageMap->lpEntries,msg)) != NULL)
  153. {
  154. goto LDispatch;
  155. }
  156. }
  157. return false;
  158. LDispatch:
  159. union DuiMessageMapFunctions mmf;
  160. mmf.pfn = lpEntry->pfn;
  161. bool bRet = false;
  162. int nSig;
  163. nSig = lpEntry->nSig;
  164. switch (nSig)
  165. {
  166. default:
  167. ASSERT(FALSE);
  168. break;
  169. case DuiSig_lwl:
  170. (this->*mmf.pfn_Notify_lwl)(msg.wParam,msg.lParam);
  171. bRet = true;
  172. break;
  173. case DuiSig_vn:
  174. (this->*mmf.pfn_Notify_vn)(msg);
  175. bRet = true;
  176. break;
  177. }
  178. return bRet;
  179. }
  180. void CNotifyPump::NotifyPump(TNotifyUI& msg)
  181. {
  182. ///遍历虚拟窗口
  183. if( !msg.sVirtualWnd.IsEmpty() ){
  184. for( int i = 0; i< m_VirtualWndMap.GetSize(); i++ ) {
  185. if( LPCTSTR key = m_VirtualWndMap.GetAt(i) ) {
  186. if( _tcsicmp(key, msg.sVirtualWnd.GetData()) == 0 ){
  187. CNotifyPump* pObject = static_cast<CNotifyPump*>(m_VirtualWndMap.Find(key, false));
  188. if( pObject && pObject->LoopDispatch(msg) )
  189. return;
  190. }
  191. }
  192. }
  193. }
  194. ///
  195. //遍历主窗口
  196. LoopDispatch( msg );
  197. }
  198. //////////////////////////////////////////////////////////////////////////
  199. ///
  200. CWindowWnd::CWindowWnd() : m_hWnd(NULL), m_OldWndProc(::DefWindowProc), m_bSubclassed(false)
  201. {
  202. }
  203. HWND CWindowWnd::GetHWND() const
  204. {
  205. return m_hWnd;
  206. }
  207. UINT CWindowWnd::GetClassStyle() const
  208. {
  209. return 0;
  210. }
  211. LPCTSTR CWindowWnd::GetSuperClassName() const
  212. {
  213. return NULL;
  214. }
  215. CWindowWnd::operator HWND() const
  216. {
  217. return m_hWnd;
  218. }
  219. HWND CWindowWnd::CreateDuiWindow( HWND hwndParent, LPCTSTR pstrWindowName,DWORD dwStyle /*=0*/, DWORD dwExStyle /*=0*/ )
  220. {
  221. return Create(hwndParent,pstrWindowName,dwStyle,dwExStyle,0,0,0,0,NULL);
  222. }
  223. HWND CWindowWnd::Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, const RECT rc, HMENU hMenu)
  224. {
  225. return Create(hwndParent, pstrName, dwStyle, dwExStyle, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hMenu);
  226. }
  227. HWND CWindowWnd::Create(HWND hwndParent, LPCTSTR pstrName, DWORD dwStyle, DWORD dwExStyle, int x, int y, int cx, int cy, HMENU hMenu)
  228. {
  229. if( GetSuperClassName() != NULL && !RegisterSuperclass() ) return NULL;
  230. if( GetSuperClassName() == NULL && !RegisterWindowClass() ) return NULL;
  231. m_hWnd = ::CreateWindowEx(dwExStyle, GetWindowClassName(), pstrName, dwStyle, x, y, cx, cy, hwndParent, hMenu, CPaintManagerUI::GetInstance(), this);
  232. ASSERT(m_hWnd!=NULL);
  233. return m_hWnd;
  234. }
  235. HWND CWindowWnd::Subclass(HWND hWnd)
  236. {
  237. ASSERT(::IsWindow(hWnd));
  238. ASSERT(m_hWnd==NULL);
  239. m_OldWndProc = SubclassWindow(hWnd, __WndProc);
  240. if( m_OldWndProc == NULL ) return NULL;
  241. m_bSubclassed = true;
  242. m_hWnd = hWnd;
  243. ::SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LPARAM>(this));
  244. return m_hWnd;
  245. }
  246. void CWindowWnd::Unsubclass()
  247. {
  248. ASSERT(::IsWindow(m_hWnd));
  249. if( !::IsWindow(m_hWnd) ) return;
  250. if( !m_bSubclassed ) return;
  251. SubclassWindow(m_hWnd, m_OldWndProc);
  252. m_OldWndProc = ::DefWindowProc;
  253. m_bSubclassed = false;
  254. }
  255. void CWindowWnd::ShowWindow(bool bShow /*= true*/, bool bTakeFocus /*= false*/)
  256. {
  257. ASSERT(::IsWindow(m_hWnd));
  258. if( !::IsWindow(m_hWnd) ) return;
  259. ::ShowWindow(m_hWnd, bShow ? (bTakeFocus ? SW_SHOWNORMAL : SW_SHOWNOACTIVATE) : SW_HIDE);
  260. }
  261. UINT CWindowWnd::ShowModal()
  262. {
  263. ASSERT(::IsWindow(m_hWnd));
  264. UINT nRet = 0;
  265. HWND hWndParent = GetWindowOwner(m_hWnd);
  266. ::ShowWindow(m_hWnd, SW_SHOWNORMAL);
  267. ::EnableWindow(hWndParent, FALSE);
  268. MSG msg = { 0 };
  269. while (::IsWindow(m_hWnd) && ::GetMessage(&msg, NULL, 0, 0)) {
  270. if (msg.message == WM_CLOSE && msg.hwnd == m_hWnd) {
  271. nRet = msg.wParam;
  272. ::EnableWindow(hWndParent, TRUE);
  273. ::SetFocus(hWndParent);
  274. }
  275. if (!CPaintManagerUI::TranslateMessage(&msg)) {
  276. ::TranslateMessage(&msg);
  277. ::DispatchMessage(&msg);
  278. }
  279. if (msg.message == WM_QUIT) break;
  280. }
  281. ::EnableWindow(hWndParent, TRUE);
  282. ::SetFocus(hWndParent);
  283. if (msg.message == WM_QUIT) ::PostQuitMessage(msg.wParam);
  284. return nRet;
  285. }
  286. void CWindowWnd::Close(UINT nRet)
  287. {
  288. ASSERT(::IsWindow(m_hWnd));
  289. if( !::IsWindow(m_hWnd) ) return;
  290. PostMessage(WM_CLOSE, (WPARAM)nRet, 0L);
  291. }
  292. void CWindowWnd::CenterWindow()
  293. {
  294. ASSERT(::IsWindow(m_hWnd));
  295. ASSERT((GetWindowStyle(m_hWnd)&WS_CHILD)==0);
  296. RECT rcDlg = { 0 };
  297. ::GetWindowRect(m_hWnd, &rcDlg);
  298. RECT rcArea = { 0 };
  299. RECT rcCenter = { 0 };
  300. HWND hWnd=*this;
  301. HWND hWndParent = ::GetParent(m_hWnd);
  302. HWND hWndCenter = ::GetWindowOwner(m_hWnd);
  303. if (hWndCenter!=NULL)
  304. hWnd=hWndCenter;
  305. // 处理多显示器模式下屏幕居中
  306. MONITORINFO oMonitor = {};
  307. oMonitor.cbSize = sizeof(oMonitor);
  308. ::GetMonitorInfo(::MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST), &oMonitor);
  309. rcArea = oMonitor.rcWork;
  310. if( hWndCenter == NULL || IsIconic(hWndCenter))
  311. rcCenter = rcArea;
  312. else
  313. ::GetWindowRect(hWndCenter, &rcCenter);
  314. int DlgWidth = rcDlg.right - rcDlg.left;
  315. int DlgHeight = rcDlg.bottom - rcDlg.top;
  316. // Find dialog's upper left based on rcCenter
  317. int xLeft = (rcCenter.left + rcCenter.right) / 2 - DlgWidth / 2;
  318. int yTop = (rcCenter.top + rcCenter.bottom) / 2 - DlgHeight / 2;
  319. // The dialog is outside the screen, move it inside
  320. if( xLeft < rcArea.left ) xLeft = rcArea.left;
  321. else if( xLeft + DlgWidth > rcArea.right ) xLeft = rcArea.right - DlgWidth;
  322. if( yTop < rcArea.top ) yTop = rcArea.top;
  323. else if( yTop + DlgHeight > rcArea.bottom ) yTop = rcArea.bottom - DlgHeight;
  324. ::SetWindowPos(m_hWnd, NULL, xLeft, yTop, -1, -1, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
  325. }
  326. void CWindowWnd::SetIcon(UINT nRes)
  327. {
  328. HICON hIcon = (HICON)::LoadImage(CPaintManagerUI::GetInstance(), MAKEINTRESOURCE(nRes), IMAGE_ICON, ::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR);
  329. ASSERT(hIcon);
  330. ::SendMessage(m_hWnd, WM_SETICON, (WPARAM) TRUE, (LPARAM) hIcon);
  331. hIcon = (HICON)::LoadImage(CPaintManagerUI::GetInstance(), MAKEINTRESOURCE(nRes), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
  332. ASSERT(hIcon);
  333. ::SendMessage(m_hWnd, WM_SETICON, (WPARAM) FALSE, (LPARAM) hIcon);
  334. }
  335. bool CWindowWnd::RegisterWindowClass()
  336. {
  337. WNDCLASS wc = { 0 };
  338. wc.style = GetClassStyle();
  339. wc.cbClsExtra = 0;
  340. wc.cbWndExtra = 0;
  341. wc.hIcon = NULL;
  342. wc.lpfnWndProc = CWindowWnd::__WndProc;
  343. wc.hInstance = CPaintManagerUI::GetInstance();
  344. wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
  345. wc.hbrBackground = NULL;
  346. wc.lpszMenuName = NULL;
  347. wc.lpszClassName = GetWindowClassName();
  348. ATOM ret = ::RegisterClass(&wc);
  349. ASSERT(ret!=NULL || ::GetLastError()==ERROR_CLASS_ALREADY_EXISTS);
  350. return ret != NULL || ::GetLastError() == ERROR_CLASS_ALREADY_EXISTS;
  351. }
  352. bool CWindowWnd::RegisterSuperclass()
  353. {
  354. // Get the class information from an existing
  355. // window so we can subclass it later on...
  356. WNDCLASSEX wc = { 0 };
  357. wc.cbSize = sizeof(WNDCLASSEX);
  358. if( !::GetClassInfoEx(NULL, GetSuperClassName(), &wc) ) {
  359. if( !::GetClassInfoEx(CPaintManagerUI::GetInstance(), GetSuperClassName(), &wc) ) {
  360. ASSERT(!"Unable to locate window class");
  361. return NULL;
  362. }
  363. }
  364. m_OldWndProc = wc.lpfnWndProc;
  365. wc.lpfnWndProc = CWindowWnd::__ControlProc;
  366. wc.hInstance = CPaintManagerUI::GetInstance();
  367. wc.lpszClassName = GetWindowClassName();
  368. ATOM ret = ::RegisterClassEx(&wc);
  369. ASSERT(ret!=NULL || ::GetLastError()==ERROR_CLASS_ALREADY_EXISTS);
  370. return ret != NULL || ::GetLastError() == ERROR_CLASS_ALREADY_EXISTS;
  371. }
  372. LRESULT CALLBACK CWindowWnd::__WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  373. {
  374. CWindowWnd* pThis = NULL;
  375. if( uMsg == WM_NCCREATE ) {
  376. LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
  377. pThis = static_cast<CWindowWnd*>(lpcs->lpCreateParams);
  378. pThis->m_hWnd = hWnd;
  379. ::SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LPARAM>(pThis));
  380. }
  381. else {
  382. pThis = reinterpret_cast<CWindowWnd*>(::GetWindowLongPtr(hWnd, GWLP_USERDATA));
  383. if( uMsg == WM_NCDESTROY && pThis != NULL ) {
  384. LRESULT lRes = ::CallWindowProc(pThis->m_OldWndProc, hWnd, uMsg, wParam, lParam);
  385. ::SetWindowLongPtr(pThis->m_hWnd, GWLP_USERDATA, 0L);
  386. if( pThis->m_bSubclassed ) pThis->Unsubclass();
  387. pThis->m_hWnd = NULL;
  388. pThis->OnFinalMessage(hWnd);
  389. return lRes;
  390. }
  391. }
  392. if( pThis != NULL ) {
  393. return pThis->HandleMessage(uMsg, wParam, lParam);
  394. }
  395. else {
  396. return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
  397. }
  398. }
  399. LRESULT CALLBACK CWindowWnd::__ControlProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  400. {
  401. CWindowWnd* pThis = NULL;
  402. if( uMsg == WM_NCCREATE ) {
  403. LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
  404. pThis = static_cast<CWindowWnd*>(lpcs->lpCreateParams);
  405. ::SetProp(hWnd, _T("WndX"), (HANDLE) pThis);
  406. pThis->m_hWnd = hWnd;
  407. }
  408. else {
  409. pThis = reinterpret_cast<CWindowWnd*>(::GetProp(hWnd, _T("WndX")));
  410. if( uMsg == WM_NCDESTROY && pThis != NULL ) {
  411. LRESULT lRes = ::CallWindowProc(pThis->m_OldWndProc, hWnd, uMsg, wParam, lParam);
  412. if( pThis->m_bSubclassed ) pThis->Unsubclass();
  413. ::SetProp(hWnd, _T("WndX"), NULL);
  414. pThis->m_hWnd = NULL;
  415. pThis->OnFinalMessage(hWnd);
  416. return lRes;
  417. }
  418. }
  419. if( pThis != NULL ) {
  420. return pThis->HandleMessage(uMsg, wParam, lParam);
  421. }
  422. else {
  423. return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
  424. }
  425. }
  426. LRESULT CWindowWnd::SendMessage(UINT uMsg, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)
  427. {
  428. ASSERT(::IsWindow(m_hWnd));
  429. return ::SendMessage(m_hWnd, uMsg, wParam, lParam);
  430. }
  431. LRESULT CWindowWnd::PostMessage(UINT uMsg, WPARAM wParam /*= 0*/, LPARAM lParam /*= 0*/)
  432. {
  433. ASSERT(::IsWindow(m_hWnd));
  434. return ::PostMessage(m_hWnd, uMsg, wParam, lParam);
  435. }
  436. void CWindowWnd::ResizeClient(int cx /*= -1*/, int cy /*= -1*/)
  437. {
  438. ASSERT(::IsWindow(m_hWnd));
  439. RECT rc = { 0 };
  440. if( !::GetClientRect(m_hWnd, &rc) ) return;
  441. if( cx != -1 ) rc.right = cx;
  442. if( cy != -1 ) rc.bottom = cy;
  443. if( !::AdjustWindowRectEx(&rc, GetWindowStyle(m_hWnd), (!(GetWindowStyle(m_hWnd) & WS_CHILD) && (::GetMenu(m_hWnd) != NULL)), GetWindowExStyle(m_hWnd)) ) return;
  444. ::SetWindowPos(m_hWnd, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
  445. }
  446. LRESULT CWindowWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
  447. {
  448. return ::CallWindowProc(m_OldWndProc, m_hWnd, uMsg, wParam, lParam);
  449. }
  450. void CWindowWnd::OnFinalMessage(HWND /*hWnd*/)
  451. {
  452. }
  453. } // namespace DuiLib