Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi,guys

I modify the paramter of oncreate, it does not work???
Posted
Comments
[no name] 8-Sep-13 10:48am    
Uhm.... yes it does work. You did something wrong.
OriginalGriff 8-Sep-13 10:50am    
LOL!
As helpful as a flying breeze block, but amusing!
[no name] 8-Sep-13 10:56am    
Yeah well the OP needs to come up with something better than "I use the wrong parameter to a function call and it didn't work" to get anything more helpful.
OriginalGriff 8-Sep-13 11:33am    
I have to agree...But then, we are the Experts, we should be able to see what he means telepathically... :laugh:
[no name] 8-Sep-13 11:35am    
You are, of course, free to speak for yourself. I have always been pert and I do not intend to stop. Therefore, I do not think that it would be possible for me to be an ex-pert.... :-)

1 solution

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.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900