- UID
- 3650
- 积分
- 134
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-4-6
- 最后登录
- 1970-1-1
|
发表于 2003-2-14 17:46:24
|
显示全部楼层
// ObjectARX EntryPoint
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
switch (msg) {
case AcRx::kInitAppMsg:
//丁文捷按旧版本写的,SplashScreen才可用!
AfxSetResourceHandle (::GetModuleHandle ("arxcam.arx")) ;
CSplashScreen::EnableSplashScreen (TRUE) ;
CSplashScreen::ShowSplashScreen (acedGetAcadFrame ()) ;
AfxSetResourceHandle (acedGetAcadResourceInstance ()) ;
//SplashScreen写完了
// Comment out the following line if your
// application should be locked into memory
acrxDynamicLinker->unlockApplication(pkt);
acrxDynamicLinker->registerAppMDIAware(pkt);
InitApplication();
break;
case AcRx::kUnloadAppMsg:
UnloadApplication();
break;
}
return AcRx::kRetOK;
}
// Init this application. Register your,
// commands, reactors...
void InitApplication()
{
// NOTE: DO NOT edit the following lines.
//{{AFX_ARX_INIT
AddCommand("ARXHCHCAM", "SEARCHER", "SEARCHER", ACRX_CMD_TRANSPARENT | ACRX_CMD_USEPICKSET, arxhchcamsearcher);
AddCommand("ARXHCHCAM", "CAPTION", "CAPTION", ACRX_CMD_TRANSPARENT | ACRX_CMD_USEPICKSET, arxhchcamcaption);
//}}AFX_ARX_INIT
// TODO: add your initialization functions
arxhchcamcaption();//自建的命令在这里运行
}
// This is command 'CAPTION, by [十一月/26/2002], ,
void arxhchcamcaption()//一个自建的命令
{
#ifdef OARXWIZDEBUG
acutPrintf ("\nOARXWIZDEBUG - arxhchcamcaption() called.");
#endif // OARXWIZDEBUG
CMDIFrameWnd *pp;
pp=acedGetAcadFrame();
pp->SetWindowText ("GT裁床CAM");
pp->UpdateWindow ();
hicon = AfxGetApp()->LoadIcon(IDI_ICON1);//IDI_ICON1要事先导入
pp->SetIcon(hicon,1);
pp->SetIcon(hicon,0);
//free(pp);
// TODO: Implement the command
} |
|