求一完整的程序
刚学ObjectARX,看见用向导生成的程序框架ObjectArx2002+VC6和ObjectArx2004+Vc.net2002有所不同,手头缺少arx2004的资料,谁有这方面的资料,能否共享一下<br>,另求一个用ObjectArx2004+Vc.net2002写的关闭冻结锁定所有图层的完整程序。^_^ <P>#include <stdio.h><BR>#include <math.h><BR>#include <string.h><BR>#include <windows.h><BR>#include <aced.h><BR>#include <rxregsvc.h><BR>#include <adslib.h><BR>#include <adsdlg.h><BR>#include <acutmem.h></P><P>/***************************************************************************/</P>
<P>void initApp();<BR>void unloadApp();</P>
<P>void helloWorld();<BR>/*************************************************************************/<BR>extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)<BR>{<BR> switch (msg) <BR> {<BR> case AcRx::kInitAppMsg:<BR> acrxDynamicLinker->unlockApplication(pkt);<BR> acrxRegisterAppMDIAware(pkt);<BR> initApp();<BR> break;<BR> case AcRx::kUnloadAppMsg:<BR> unloadApp();<BR> break;<BR> default:<BR> break;<BR> }<BR> return AcRx::kRetOK;<BR>}<BR>/********************************************************************************/<BR>void initApp()<BR>{<BR> acedRegCmds->addCommand("HELLOWORLD_COMMANDS","Hello","hello",<BR> ACRX_CMD_TRANSPARENT,helloWorld);<BR>}<BR>/**********************************************************************************/<BR>void unloadApp()<BR>{<BR> acedRegCmds->removeGroup("HELLOWORLD_COMMANDS");<BR>}<BR>/************************************************************************************/<BR>void helloWorld()<BR>{<BR> ads_point pt1,pt2;<BR> int i;<BR> struct resbuf rb1,rb2;<BR> ads_getvar("osmode",&rb1);<BR> rb2.restype=RTSHORT;rb2.resval.rint=(short)0;<BR> ads_setvar("osmode",&rb2);<BR> pt1=0;pt2=100;<BR> pt1=pt2=0;<BR> for (i=0;i<100;i++) <BR> {<BR> pt1=pt2=7*i;<BR> ads_command(RTSTR,"line",RTPOINT,pt1,RTPOINT,pt2,RTSTR,"",0);<BR> } <BR> ads_setvar("osnap",&rb1);<BR> ads_printf("\nHello World!");<BR>}</P>
页:
[1]