1.设置当前默认路径为exe文件的未知
CPaintManagerUI::SetInstance(hInstance);
CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath());
2.DuiLib的全屏的设置
SetWindowLong(hWnd, GWL_STYLE, WS_VISIBLE | WS_CHILD | WS_POPUP); SetWindowPos(hWnd, NULL, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), SWP_SHOWWINDOW);
3.DuiLib中图标的可拖拽的类
//新建的文件
4.DuiLib的Drawimage函数使用
CImageAttribute image; image.SetAttributeString(L"file='skin/1-1.png'"); image.LoadImageW(m_pManager); CRenderEngine::DrawImage(hDC, m_pManager,rcUpdate, rcUpdate, image);
5.ESC键退出程序
在HandleMessage中添加如下程序
case WM_KEYDOWN: if (wParam == VK_ESCAPE ) { //退出DuiLib程序 ::PostQuitMessage(0L); }