iCAx开思工具箱

标题: 关于MFC DLL的问题! [打印本页]

作者: kaka02    时间: 2004-6-17 18:06
标题: 关于MFC DLL的问题!
本人在MFC DLL工程中放了一个cell5.0控件,编译成功,但在UG上看不到这个控件。这是怎么回事呀?能指点我怎么解决吗?
作者: landgrave    时间: 2004-6-17 19:07
没有使用这个函数的原因。
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
  
Call this function to set the module state before initialization and/or to restore the previous module state after cleanup. The AFX_MODULE_STATE structure contains global data for the module, that is, the portion of the module state that is pushed or popped.  
  
By default, MFC uses the resource handle of the main application to load the resource template. If you have an exported function in a DLL, such as one that launches a dialog box in the DLL, this template is actually stored in the DLL module. You need to switch the module state for the correct handle to be used. You can do this by adding the following code to the beginning of the function:




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3