Jump to content
  • Advertisement

Archived

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

Sailorstick

Create a window with no title bar?

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

Anyone know how I can create a window with no title bar? I haven''t really set any window property flags in the WNDCLASSEX structure except for:
Form::Form(HINSTANCE hIns, WNDPROC wp, int x, int y, int w, int h){
	this->wc.cbSize = sizeof(WNDCLASSEX);
	this->wc.style  = CS_DBLCLKS|CS_HREDRAW|CS_VREDRAW|CS_NOCLOSE|CS_CLASSDC;
	this->wc.lpfnWndProc = wp;
	this->wc.cbClsExtra = 0;
	this->wc.cbWndExtra = 0;
	this->wc.hInstance = hIns;
	this->wc.hIcon = NULL;
	this->wc.hCursor = LoadCursor(hIns, IDC_ARROW);
	this->wc.hbrBackground = NULL;
	this->wc.lpszMenuName = "";
	this->wc.lpszClassName = "WCFORM";
	this->wc.hIconSm = NULL;

	this->width = w;
	this->height = h;

	RegisterClassEx(&this->wc);
	
	this->hWnd = CreateWindowEx(WS_EX_TOPMOST, "WCFORM", "", 0, x, y, w, h, NULL, NULL, hIns, NULL);
	//this->hWnd = GetDesktopWindow();


	this->bgColour = CreateSolidBrush(RGB(255,255,255));
	this->ForeHDC = GetDC(this->hWnd);
	this->BackHDC = CreateCompatibleDC(this->ForeHDC);
	SetBkMode(this->BackHDC, TRANSPARENT);
	this->backBmp = CreateCompatibleBitmap(this->BackHDC, this->width, this->height);
	SelectObject(BackHDC, backBmp);
	
	this->controls = NULL;
	this->next = NULL;
}
Anyone know how to get rid of it?

Share this post


Link to post
Share on other sites
Advertisement

this->hWnd = CreateWindowEx(WS_EX_TOPMOST, "WCFORM", "", WS_POPUP, x, y, w, h, NULL, NULL, hIns, NULL);


If you want a border on it use: WS_POPUP | WS_BORDER.

Share this post


Link to post
Share on other sites
when using CreateWindowEx for the DWORD for the windowstyle use WS_POPUP. i think it''s the 4th parameter.. and using CreateWindow it''s the 3rd

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!