Sign in to follow this  
kekk0

CreateWindowEx and draw area

Recommended Posts

Hi, I'm trying to create a window with a custom specified draw area, but the function CreateWindowEx only allows to specify the width and height of the entire window, including title bar and borders. So this instuction:
	// create a window
	if (!(hwnd = CreateWindowEx(0,               // extended style
			     WIN_CLASS_NAME,                 // class identifier
				 "Learning Windows GDI",         // window title
				 WS_OVERLAPPEDWINDOW | WS_VISIBLE,
				                                 // parameters
				 CW_USEDEFAULT, CW_USEDEFAULT,   // initial position
				 nWidth, nHeight,                // initial size
				 NULL,                           // handle to parent (desktop)
				 NULL,                           // handle to menu (none)
				 hinstance,                      // app handle
				 NULL)))                         // extra parameters
		return(0);
gives me a window which is nWidthxnHeight including titlebar and borders. Does anyone know an easy and clean way to actually get a custom specified drawing area? Thanks in advance!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this