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

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

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

prozax 发表于 2004-8-16 14:04:00

K030.arx.plus.all\samples\ARXDBG


一个自带的sample


////////////////////////////////


CWnd*<BR>ArxDbgApp::startSplashScreen()<BR>{<BR>                       CString bmpFileName = appPath();<BR>                       bmpFileName += _T("support\\ArxDbgSplash.bmp");                       // TBD: make this better later!


                                                       // make sure file is there (either in a main directory, which is<BR>                // where someone would install it, or for developers, go out of <BR>                // "Debug" directory and up to the main directory.<BR>                       CFileStatus status;<BR>                       BOOL success = CFile::GetStatus(bmpFileName, status);<BR>        if (success == FALSE) {<BR>                bmpFileName = appPath();<BR>                bmpFileName += _T("..\\support\\ArxDbgSplash.bmp");       // TBD: make this better later!


                success = CFile::GetStatus(bmpFileName, status);<BR>        }


        if (success) {<BR>                                                       ArxDbgUiDlgSplash* dbox = new ArxDbgUiDlgSplash(bmpFileName);<BR>                                                       dbox-&gt;setTextStrings(appName(), versionStr(), _T(""), _T(""));


                        // TBD: have to do this manually right now, although it should<BR>                        // have worked to pass up resource handle through the constructor!<BR>                acDocManager-&gt;pushResourceHandle(dllInstance());<BR>                                                       dbox-&gt;Create(acedGetAcadDwgView());<BR>                acDocManager-&gt;popResourceHandle();


                                                       dbox-&gt;ShowWindow(SW_SHOW);<BR>                                                       dbox-&gt;UpdateWindow();


                                                       return dbox;<BR>                       }<BR>                       else {                                                       // intended a splash screen but could not find it!<BR>                                                       acutPrintf(_T("\nCould not find splash box image: \"%s\""), bmpFileName);<BR>                                                       return NULL;<BR>                       }<BR>}


调用的时候:


在AcRx::AppRetCode ArxDbgApp::initApp()里面这么写:


        CWnd* splashScreen = startSplashScreen();

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

你的这段代码截的太高了!让我们干眼馋就是用不了,缺好多东西!!


有这段源吗的朋友给上传一个,多谢!!

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

回复

参考:


<A href="dispbbs.asp?boardid=14&amp;star=4&amp;replyid=67959&amp;id=22734&amp;skin=0&amp;page=1" target="_blank" >dispbbs.asp?boardid=14&amp;star=4&amp;replyid=67959&amp;id=22734&amp;skin=0&amp;page=1</A>


第35楼

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

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