散分:简单问题

iror_001 2006-12-08 02:42:39
如何实现基于对话框的应用程序开始显示时去掉标题栏,还有如果我想在工程中加载动态连接库中的资源,那么我原来工程中的资源(*.rc等)怎么处理?先谢!
...全文
138 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yjgx007 2006-12-08
  • 打赏
  • 举报
回复
你看下这里面的函数,你可能是要动态取DLL资源,然后添加到主程序中?

Platform SDK: Windows User Interface
Resource Functions

BeginUpdateResource
UpdateResource
EndUpdateResource
gaopl_8278 2006-12-08
  • 打赏
  • 举报
回复
这和原来的没关系,你需要设置访问DLL中资源的接口(也就是函数),在加载后直接使用这些接口.我很忙,找东西时路过,具体就没时间说了.
dirdirdir3 2006-12-08
  • 打赏
  • 举报
回复
原来的rc不用理它,占一些空间而已,不影响
iror_001 2006-12-08
  • 打赏
  • 举报
回复
yjgx007(who's superior) ( ) 信誉:90 Blog
还在吗?
急啊解决了就结帖,大家都挺忙的都.
iror_001 2006-12-08
  • 打赏
  • 举报
回复
To:yjgx007(who's superior) ( ) 信誉:90 Blog
我知道怎么加载DLL中的关键是原来的RC怎么办?
「已注销」 2006-12-08
  • 打赏
  • 举报
回复
1,在对话框资源属性中去掉TITLE选项,启动就没有标题栏了
2,不用管,用LOADRESOURE加载DLL中的资源
yjgx007 2006-12-08
  • 打赏
  • 举报
回复
SetWindowLong(hwndDlg, GWL_STYLE, GetWindowLong(hwndDlg, GWL_STYLE) & ~WS_CAPTION);

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:

AFX_MANAGE_STATE(AfxGetStaticModuleState( ));

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧