在CFormView上绘制网格 [英] Drawing Grid on CFormView

查看:72
本文介绍了在CFormView上绘制网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事MultiLang项目[VS2010],该项目具有一些dll和一个exe,事情是,当我在exe中使用的对话框中使用自定义控件时,它可以正常工作,但是如果从dll加载资源,则该对话框将无法打开,并且会显示一些断言.
但是如果我在dll中存在的对话框中用编辑框替换自定义控件,则会显示该对话框,但是外观并不好.
因此,请使用AfxGetInstanceHandle()为我加载语言DLL之后的任何人,可以帮助摆脱这个问题吗??????????

I''m Working on MultiLang project[VS2010],which is having some dll''s and one exe,the thing is that when i use the custom control in the dialog which is present in exe it works properly,but that same dialog will not get open in case of loading resource from dll and it shows some assertion.
But if i replace the custom control by edit box in the dialog which is there in dll then it shows the dialog,but the apperance is not good.
So please can anyone help to get out of this???????????

推荐答案

申请我
发现包含自定义控件的资源对话框开始失败
在CreateDialogIndirect中.

当注册一个窗口类时,该类名称对该应用程序而言是很好的
实例.加载语言DLL之后,对话框现在位于单独的
内 实例.

我发现的解决方案是将CS_GLOBALCLASS添加到类注册中.

wndcls.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
After using AfxGetInstanceHandle() to load a language DLL for my application I
found the resource dialogs which contained the custom controls began to fail
from within CreateDialogIndirect.

When a window class is registered that class name is good for that application''s
instance. After loading the language DLL the dialogs now reside within a separate
instance.

The solution I found was to add CS_GLOBALCLASS to the class registration.

wndcls.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;


这篇关于在CFormView上绘制网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆