Skip to main content
GameDev.net gamedev.net
🔒 Locked

Resizable windows with scaling content

Started by OutOfInspiration Mar 13, 2009 at 4:00 PM 2 replies 550+ views
Original Post
OutOfInspiration
OutOfInspiration
Hi, i'm pretty new on c++, is it possible to create a window that scales the content? Because now when i rescale the window the content stays the same. the only code i can show is the following... Isn't their like a WS_SCALECONTENT? lol Thanks! OutOfInspiration CreateWindow(m_TitlePtr->ToTChar(), m_TitlePtr->ToTChar(), WS_POPUPWINDOW | WS_CAPTION | WS_MAXIMIZEBOX | WS_SIZEBOX | WS_MINIMIZEBOX | WS_CLIPCHILDREN, iXWindowPos, iYWindowPos, iWindowWidth, iWindowHeight, NULL, NULL, m_hInstance, NULL);
Kimmi
Kimmi
Using the Windows-API you have to do this on your own. You just have to do this in your MsgProc. Just call in your MessageProg to WM_SIZE. Call there your rescale-function.

Kimmi
A complicate solution may indicate a not understood problem.


[twitter]KimKulling[/twitter]
hughiecoles
hughiecoles
yeah you have to do it yourself, you'd usually create a function to do it, as a function of of width and height of the window. Petzold's book has quite a bit of information of that sort of thing.
--------------------------------------Not All Martyrs See Divinity, But At Least You Tried
OutOfInspiration
OutOfInspiration
i see,

thanks a lot for the fast answers and i will check the book out.


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.