Archived

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

Militia

D3D, windows border

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 - wrect.top) - 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;

rect.top=rect.left=0;
rect.bottom=640;
rect.right=480;

AdjustWindowRect(&rect,WS_TILEDWINDOW,FALSE);

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