Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

cannot register window with win32

Status
Not open for further replies.

syedshan

Advanced Member level 1
Advanced Member level 1
Joined
Feb 27, 2012
Messages
463
Helped
27
Reputation
54
Reaction score
26
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,134
Hello every one

In my code I need to make two windows. First window is the main window, the second window is not the main window but I will create it sometime later in the code, But now I want to register it at the beginning of the code. Unfortunately I cannot register.

I cannot understand of any reason. I have shown only the window registration process for the one which fails to register.
please have a look

Code:
WNDCLASSEX wMain_class = {0}, wndClass_bmpVid = {0};

	HWND H_M_window;	
	//Main Window
	wMain_class.cbSize=sizeof(WNDCLASSEX);
	wMain_class.style=CS_HREDRAW|CS_VREDRAW;
	wMain_class.lpfnWndProc=(WNDPROC)WinProc;	//call to window procedure function
	wMain_class.hInstance=hInst;
	wMain_class.hCursor=LoadCursor(NULL,IDC_ARROW);
	wMain_class.hbrBackground=(HBRUSH)(COLOR_WINDOW);
	wMain_class.lpszMenuName= MAKEINTRESOURCE(IDR_MYMENU);
	wMain_class.lpszClassName=_T("Window Class1");

	//Second: register them
	if(!RegisterClassEx(&wMain_class)){
		MessageBox(NULL,_T("Could not register classX"),_T("Window Class Failed"),MB_ICONERROR);
	}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top