• ### Announcements

#### Archived

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

# Sizing the client area of a windowed app

## Recommended Posts

This is mainly due to the fact that I can''t find any documentation on the subject, but is it possible to size the client area of a Win32 application so that it is considered the entire application''s area, even if it is clipped by the surrounding border? I checked the WinProg.org FAQ, and they had something close, but it doesn''t perform the way I want it to. My reason for wanting this, is that my D3D8 windowed renderer is inaccurate because for some reason the client area is downsized when the app is created. Any ideas? Thanks a million in advance! MatrixCubed
http://MatrixCubed.org

##### Share on other sites
Not quite sure what you mean, but why not just create a windowed app without a title bar or border, so you don''t have to worry about it?

Or just take the size of the title bar, menu, and border, and just subtract it out of the windowed rect? (borders, title bars, menu''s, etc do have a defined value somewhere, but I can''t remember exactly what it''s called).

##### Share on other sites
Here's what I use :

  DWORD style; (m_FullScreen) ? style = WS_POPUP : style = WS_SYSMENU | WS_CAPTION | WS_MINIMIZEBOX; DebugOut("Creating %s application window.\n", m_FullScreen ? "Fullscreen" : "Windowed"); m_MainWindow = CreateWindowEx(0, "CWinApp", "CWinApp Application", style, 0, 0, m_ClientWidth, m_ClientHeight, NULL, NULL, m_Instance, &m_CallbackList); if(m_MainWindow == NULL) { AssertM( (FALSE, "CWinApp::Init : CreateWindowEx() failed") ); return 0; } if(!m_FullScreen) { RECT rc1; SetRect(&rc1, 0, 0, m_ClientWidth, m_ClientHeight); AdjustWindowRectEx( &rc1, GetWindowLong(m_MainWindow, GWL_STYLE), FALSE, GetWindowLong(m_MainWindow, GWL_EXSTYLE)); MoveWindow(m_MainWindow, 0, 0, rc1.right - rc1.left, rc1.bottom - rc1.top, FALSE); }

have fun,

Orbitalx

Edited by - Orbitalx on July 1, 2001 12:35:15 AM

##### Share on other sites
if ure asking what i think ure asking, use the WS_POPUP style flag, instead of whatever ure using (probably WS_OVERLAPPEDWINDOW which makes it look like a standard window).

here in castle camelot we eat ham and jam and spam alot!

Edited by - warm0ng3r on July 4, 2001 11:35:06 AM

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627667
• Total Posts
2978534

• 9
• 10
• 10
• 12
• 22