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

D3D, windows border

Started by Militia Apr 25, 2001 at 4:53 PM 0 replies 550+ views
Original Post
Militia
Militia
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()
Great Milenko
Great Milenko
ack god =)

AdjustWindowRect =)

RECT rect;

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

AdjustWindowRect(▭,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...
The Great Milenko"Don't stick a pretzel up your ass, it might get stuck in there.""Computer Programming is findding the right wrench to hammer in the correct screw."

Topic Locked

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

Sign in to reply to this topic.