- 积分
- 223
- 明经币
- 个
- 注册时间
- 2004-7-11
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-8-16 14:04:00
|
显示全部楼层
K030.arx.plus.all\samples\ARXDBG
一个自带的sample
////////////////////////////////
CWnd* ArxDbgApp::startSplashScreen() { CString bmpFileName = appPath(); bmpFileName += _T("support\\ArxDbgSplash.bmp"); // TBD: make this better later!
// make sure file is there (either in a main directory, which is // where someone would install it, or for developers, go out of // "Debug" directory and up to the main directory. CFileStatus status; BOOL success = CFile::GetStatus(bmpFileName, status); if (success == FALSE) { bmpFileName = appPath(); bmpFileName += _T("..\\support\\ArxDbgSplash.bmp"); // TBD: make this better later!
success = CFile::GetStatus(bmpFileName, status); }
if (success) { ArxDbgUiDlgSplash* dbox = new ArxDbgUiDlgSplash(bmpFileName); dbox->setTextStrings(appName(), versionStr(), _T(""), _T(""));
// TBD: have to do this manually right now, although it should // have worked to pass up resource handle through the constructor! acDocManager->pushResourceHandle(dllInstance()); dbox->Create(acedGetAcadDwgView()); acDocManager->popResourceHandle();
dbox->ShowWindow(SW_SHOW); dbox->UpdateWindow();
return dbox; } else { // intended a splash screen but could not find it! acutPrintf(_T("\nCould not find splash box image: \"%s\""), bmpFileName); return NULL; } }
调用的时候:
在AcRx::AppRetCode ArxDbgApp::initApp()里面这么写:
CWnd* splashScreen = startSplashScreen(); |
|