資源簡介
自繪的鼠標(biāo)位置動(dòng)態(tài)移動(dòng)提示框。用到了gdi+以及雙緩沖繪圖。
效果詳見:http://blog.csdn.net/qing666888/article/details/53117402

代碼片段和文件信息
//?moveUI.cpp?:?定義應(yīng)用程序的類行為。
//
#include?“stdafx.h“
#include?“moveUI.h“
#include?“moveUIDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CmoveUIApp
BEGIN_MESSAGE_MAP(CmoveUIApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CmoveUIApp?構(gòu)造
CmoveUIApp::CmoveUIApp()
{
//?支持重新啟動(dòng)管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
//?TODO:?在此處添加構(gòu)造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個(gè)?CmoveUIApp?對象
CmoveUIApp?theApp;
//?CmoveUIApp?初始化
BOOL?CmoveUIApp::InitInstance()
{
//?如果一個(gè)運(yùn)行在?Windows?XP?上的應(yīng)用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。否則,將無法創(chuàng)建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設(shè)置為包括所有要在應(yīng)用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
//初始化時(shí)
GdiplusStartupInput?gdiplusStartupInput;
GdiplusStartup(&m_gdiplusToken?&gdiplusStartupInput?NULL);
AfxEnableControlContainer();
//?創(chuàng)建?shell?管理器,以防對話框包含
//?任何?shell?樹視圖控件或?shell?列表視圖控件。
CShellManager?*pShellManager?=?new?CShellManager;
//?標(biāo)準(zhǔn)初始化
//?如果未使用這些功能并希望減小
//?最終可執(zhí)行文件的大小,則應(yīng)移除下列
//?不需要的特定初始化例程
//?更改用于存儲(chǔ)設(shè)置的注冊表項(xiàng)
//?TODO:?應(yīng)適當(dāng)修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應(yīng)用程序向?qū)傻谋镜貞?yīng)用程序“));
CmoveUIDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?在此放置處理何時(shí)用
//??“確定”來關(guān)閉對話框的代碼
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?在此放置處理何時(shí)用
//??“取消”來關(guān)閉對話框的代碼
}
//?刪除上面創(chuàng)建的?shell?管理器。
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}
//?由于對話框已關(guān)閉,所以將返回?FALSE?以便退出應(yīng)用程序,
//??而不是啟動(dòng)應(yīng)用程序的消息泵。
return?FALSE;
}
int?CmoveUIApp::ExitInstance()
{
//?TODO:?Add?your?specialized?code?here?and/or?call?the?base?class
//程序結(jié)束時(shí)
GdiplusShutdown(m_gdiplusToken);
return?CWinApp::ExitInstance();
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2960??2015-11-04?15:58??moveUI\Debug\image\chartprompt_down.png
?????文件???????3708??2015-11-04?15:58??moveUI\Debug\image\chartprompt_mid.png
?????文件???????2974??2015-11-04?15:58??moveUI\Debug\image\chartprompt_up.png
?????文件?????178688??2016-11-10?16:58??moveUI\Debug\moveUI.exe
?????文件???????2311??2016-11-10?15:34??moveUI\moveUI\moveUI.cpp
?????文件????????509??2016-11-10?15:34??moveUI\moveUI\moveUI.h
?????文件??????10138??2016-11-10?16:47??moveUI\moveUI\moveUI.rc
?????文件???????5774??2016-11-10?16:13??moveUI\moveUI\moveUI.vcxproj
?????文件???????2019??2016-11-10?15:28??moveUI\moveUI\moveUI.vcxproj.filters
?????文件????????143??2016-11-10?15:28??moveUI\moveUI\moveUI.vcxproj.user
?????文件???????6715??2016-11-10?16:56??moveUI\moveUI\moveUIDlg.cpp
?????文件????????739??2016-11-10?16:10??moveUI\moveUI\moveUIDlg.h
?????文件???????3122??2016-11-10?15:28??moveUI\moveUI\ReadMe.txt
????.......?????67777??2009-08-31?02:31??moveUI\moveUI\res\moveUI.ico
?????文件????????668??2016-11-10?15:28??moveUI\moveUI\res\moveUI.rc2
?????文件???????1266??2016-11-10?15:29??moveUI\moveUI\resource.h
?????文件????????139??2016-11-10?15:28??moveUI\moveUI\stdafx.cpp
?????文件???????1755??2016-11-10?15:45??moveUI\moveUI\stdafx.h
?????文件????????234??2016-11-10?15:28??moveUI\moveUI\targetver.h
?????文件????????885??2016-11-10?15:28??moveUI\moveUI.sln
????..A..H.?????13824??2016-11-10?16:58??moveUI\moveUI.suo
?????文件???????2960??2015-11-04?15:58??moveUI\Release\image\chartprompt_down.png
?????文件???????3708??2015-11-04?15:58??moveUI\Release\image\chartprompt_mid.png
?????文件???????2974??2015-11-04?15:58??moveUI\Release\image\chartprompt_up.png
?????文件??????96768??2016-11-10?16:56??moveUI\Release\moveUI.exe
?????目錄??????????0??2016-11-10?15:46??moveUI\Debug\image
?????目錄??????????0??2016-11-10?15:28??moveUI\moveUI\res
?????目錄??????????0??2016-11-10?16:13??moveUI\Release\image
?????目錄??????????0??2016-11-10?16:58??moveUI\Debug
?????目錄??????????0??2016-11-10?16:59??moveUI\moveUI
............此處省略5個(gè)文件信息
評論
共有 條評論