积极答复者
嵌入到CDockablePane中的CFormView派生类,刷新不及时,如何解决?

问题
答案
全部回复
-
RadioButton是在资源文件中创建的。
父窗口应该是自己的派生自CFormView的类。
不过这个派生类又被封装在CDockablePane中,作为派生类的一个私有变量。
在CDockablePane的派生类CDirDock的构造函数通过CRuntimeClass.CreateObject创建CDirFormView的实例。
m_pManualForm = (xmManualForm*)(RUNTIME_CLASS(xmManualForm)->CreateObject());
然后在CDirDock的OnCreate函数里创建:
int xmPane::OnCreate(LPCREATESTRUCT lpCreateStruct){
RECT rect;
GetClientRect(&rect);
m_pManualTradeForm->Create(this, rect);
return 0;
}
-
Hi BruceLiu_sh,
感谢在MSDN论坛发帖。
>>但是程序启动时,这些RadioButton不能完全显示,也没有被遮挡就是不现实。需要鼠标到上面扫一下,就逐步有RadioButton显示出来了。
这个是什么原因,怎么解决?
对于这种情况,建议你将这些Radio Button整理成一个Group。并且在创建CFormView时,调用UpdateData函数。
希望对你有所帮助。
Best Regards,
Sera YuMSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. -
Hi BruceLiu_sh,
你可以尝试在DoDataExchange中这样设置。
CDialogEx::DoDataExchange(pDX); DDX_Radio(pDX, IDC_RADIO1, m_Radio1);
详细使用方法,请参考以下文档。
http://blog.csdn.net/jiangqin115/article/details/45176961
Best Regards,
Sera YuMSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. -