1、控制两个模板,使用LoadPanel()得到想控制的模板,然后对相应的模板控制。显示用DisplayPanel (hscaledPanel),恋情DiscardPanel(panel)来释放模板。 2、如果只是显示,则可以用InstallPopup (panelHandle),来弹出模板。用RemovePopup (0);来删除模板。 3、从主模板到子模板,再从子模板的方法。而且要回来不出错: (1)先用LoadPanel();打开相应的子模块。 (2)用DisplayPanel()显示打开的模板; (3)从子模块回来,直接将模板释放。DiscardPanel(panel); 4、对TEXTBOX控键,可以用ResetTextBox();直接来更新里面的文字。再则更石板的方法就是先用InsertTextBoxLine()写空文字(必须写),再用ReplaceTextBoxLine()来替换里面的文字。 5、将数值转化为文字可以用sprintf()和Fmt() 6、Toolbar_Discard (toolbar); //释放工具栏 Toolbar_Display (toolbar); //显示工具栏 一、动态连接库 BOOL __stdcall DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { /* The DllMain function is called when ever the DLL is loaded and */ /* unloaded. Place Initialization code for the DLL in this function. */ if (fdwReason == DLL_PROCESS_ATTACH) { /* Place any initialization which needs to be done when the DLL */ /* is loaded here. */ if (InitCVIRTE (hinstDLL, 0, 0) == 0) /* needed if linking DLL in external compiler; harmless otherwise */ return 0; /* out of memory */ } else if (fdwReason == DLL_PROCESS_DETACH) { /* Place any clean-up which needs to be done when the DLL */ /* is unloaded here. */ CloseCVIRTE (); /* needed if linking DLL in external compiler; harmless otherwise */ } /* return FALSE to abort if initialization fails */ return TRUE; }
void DLLEXPORT RunDllUI (void) //这是自己编译的外部使用函数要以 //DLLEXPORT定义 { /* Call this function from the appropriate place in your code */ /* to load and display startup panels. */ biaoding.a = 0; biaoding.b = 0; panelHandle = LoadPanelEx (0, "sharcky.uir" , PANEL ,__CVIUserHInst);
文章评论(0条评论)
登录后参与讨论