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

D3D, windows border

This topic is 6078 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

The space I want to work with is 640x480, I set the window size to that, but if I make a 640x480 triangle and texture it, its covered up by title bar etc.. anyone have a good way of setting the window size + borders when I start the app? Right now im doing RECT wrect, crect; UINT wwidth, wheight; GetWindowRect(g_hWnd, &wrect); GetClientRect(g_hWnd, &crect); wwidth = ((wrect.right - wrect.left) - crect.right) + 640; wheight = ((wrect.bottom - - crect.bottom) + 480; SetWindowPos(g_hWnd, NULL, 0, 0, wwidth, wheight, SWP_NOZORDER | SWP_NOMOVE); That gives me a migrain to look at, but it works. Any thoughts? Wheres my java getInsets()

Share this post

Link to post
Share on other sites
ack god =)

AdjustWindowRect =)

RECT rect;;


now rect is the window size needed to get the client rect size that was passed to it... of course replace WS_TITLEDWINDOW with what ever styles your window uses... the FALSE in there needs to be changed to TRUE if your window has a menu....

AdjustWindowRectEx(LPRECT,DWORD,BOOL,DWORD) for windows with extended styles...

Share this post

Link to post
Share on other sites