Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Neosmyle

WM_GETMINMAXINFO?

This topic is 5938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know what windows functions might send the message WM_GETMINMAXINFO? I am working on a win32 window wrapper roughly based on the article Oluseyi wrote a few months ago on the topic. It uses std::maps as message maps for windows and a static MsgRouter window procedure. The original article: http://www.gamedev.net/reference/articles/article1810.asp Anyway, what I do is I set a pointer to the CWindow instance that the window belongs to in the last param of CreateWindowEx. then I hardwired the message loop to process the WM_NCCREATE message and grab the value and set it to the window with SetWindowLong(GWL_USERDATA...) However, for some reason the message WM_GETMINMAXINFO is being called before WM_NCCREATE, and the GetWindowLong value isn''t stored yet, and it is causing a runtime error because I''m trying to use a null pointer...kinda hard to explain, if you wanna see exactly what I''m doing, I''ll dump some code but it shouldn''t be necessary.

Share this post


Link to post
Share on other sites
Advertisement
*bump* and some more info:

I have taken out anything in my code to do with minimizing or maximizing (I''m just working on the framework, so not hard), and still WM_GETMINMAXINFO is called before WM_NCCREATE. Shouldn''t WM_NCCREATE be called first? Also, I''m using winME.

Share this post


Link to post
Share on other sites
WM_GETMINMAXINFO is the first windows message that is ever sent to a window. if you want to store the pointer to the instance with SetWindowLong(), then you need to hard-wire it into your WndProc.

Just make sure you call the OnMinMaxInfo() function if it exists afterwards

Anyway, an explanation of what it does (from MSDN):

quote:

The WM_GETMINMAXINFO message is sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size.



[edited by - daerid on September 12, 2002 9:15:54 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!