liuchengdi 发表于 2004-8-16 12:54:00

[求助]怎样制作程序的启动界面?

怎样制作程序的启动界面?
我用Splash screen控件做,但是不知道用什么方法得到的CWnd对象....

prozax 发表于 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();

lwh-1234 发表于 2004-11-15 11:42:00

你的这段代码截的太高了!让我们干眼馋就是用不了,缺好多东西!!
有这段源吗的朋友给上传一个,多谢!!

王咣生 发表于 2004-11-15 12:09:00

参考:
dispbbs.asp?boardid=14&star=4&replyid=67959&id=22734&skin=0&page=1
第35楼

lwh-1234 发表于 2004-11-15 14:38:00

多谢,那页我看过,好象和以上的不是一回事!
页: [1]
查看完整版本: [求助]怎样制作程序的启动界面?