CDialog oncreate功能 [英] CDialog oncreate function

查看:130
本文介绍了CDialog oncreate功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们



我修改了oncreate的参数,它不起作用???

解决方案

您可能没有阅读MSDN文档:

OnCreate [ ^ ]

表示:

框架调用此成员函数以允许您的应用程序处理一个Windows消息。传递给你的函数的参数反映了框架在收到消息时收到的参数。如果你调用这个函数的基类实现,那个实现将使用最初传递给消息的参数,而不是参数你提供给函数。



因此,如果你改变CREATESTRUCT参数中的值,你的更改将被忽略 - 这个woul d在你看来,好像它不起作用我在想。



我怀疑无论你想做什么,你都试图这样做完全错误的方式。



我想改变窗户的大小





试试这个:一些方便的对话框技巧,提示和解决方法 [ ^ ] - 我还没有尝试过(因为我没有方便的C ++ MVC项目),但是SetWindowPos代码应该这样做。

hi,guys

I modify the paramter of oncreate, it does not work???

解决方案

The chances are that you didn't read the MSDN documentation:
OnCreate[^]
which states:
"This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function."

So if you change the values in the CREATESTRUCT parameter, your changes will be ignored - this would appear to you as if it "does not work" I am thinking.

I suspect that whatever the heck you are trying to do, you are trying to do it completely the wrong way.

"I want to change the size of window"


Try reading this: Some handy dialog box tricks, tips and workarounds[^] - I haven't tried it (because I don;t have a C++ MVC project handy), but the SetWindowPos code should do it.


这篇关于CDialog oncreate功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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