Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHave a question about color in a control... Pin
Snyp21-Sep-03 9:47
Snyp21-Sep-03 9:47 
GeneralRe: Have a question about color in a control... Pin
Ravi Bhavnani21-Sep-03 11:19
professionalRavi Bhavnani21-Sep-03 11:19 
Generaldebug assertion failed in propertysheets Pin
Anonymous21-Sep-03 9:46
Anonymous21-Sep-03 9:46 
GeneralRe: debug assertion failed in propertysheets Pin
David Crow21-Sep-03 10:17
David Crow21-Sep-03 10:17 
GeneralRe: debug assertion failed in propertysheets Pin
Anonymous23-Sep-03 9:29
Anonymous23-Sep-03 9:29 
GeneralRe: debug assertion failed in propertysheets Pin
David Crow23-Sep-03 9:36
David Crow23-Sep-03 9:36 
GeneralRe: debug assertion failed in propertysheets Pin
Anonymous26-Sep-03 5:09
Anonymous26-Sep-03 5:09 
GeneralCreateWindow fails Pin
User 665821-Sep-03 8:51
User 665821-Sep-03 8:51 
Hi
the code below works fine in one of my apps. But when I copy the code into another project CreateWindows fails with GetLastError() == 0.
static char szAppName[] = "LogWindow" ;
		HINSTANCE hInstance		= GetModuleHandle(NULL);
	WNDCLASS	WndClass;

	DWORD style = WS_VISIBLE | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU | CS_NOCLOSE | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;

	WndClass.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS | CS_NOCLOSE;
	WndClass.lpfnWndProc = WndProc;
	WndClass.cbClsExtra = 0;
	WndClass.cbWndExtra = 0;
	WndClass.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
	WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
	WndClass.hIcon = 0;
	WndClass.hInstance = hInstance;
	WndClass.lpszClassName = "LogWindow";
	WndClass.lpszMenuName = NULL;

	RegisterClass(&WndClass);

	wndHiddenWindow = CreateWindow(
		"LogWindow",
		"LogWindow",
		WS_THICKFRAME | WS_VISIBLE | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU,
		0,
		0,
		100,//GetSystemMetrics(SM_CXSCREEN),
		100,//GetSystemMetrics(SM_CYSCREEN),
		NULL,
		NULL,
		hInstance,
		NULL
	);


What's the problem? Confused | :confused:

regards
Greg

modified 12-Sep-18 21:01pm.

GeneralRe: CreateWindow fails Pin
Toni7821-Sep-03 9:29
Toni7821-Sep-03 9:29 
GeneralRe: CreateWindow fails Pin
User 665821-Sep-03 9:35
User 665821-Sep-03 9:35 
GeneralCPropertyPage from DLL extension Pin
Hans Ruck21-Sep-03 7:29
Hans Ruck21-Sep-03 7:29 
GeneralRe: CPropertyPage from DLL extension Pin
JWood22-Sep-03 9:38
JWood22-Sep-03 9:38 
GeneralRe: CPropertyPage from DLL extension Pin
Hans Ruck23-Sep-03 23:43
Hans Ruck23-Sep-03 23:43 
GeneralInserting GIF in Rich Edit Control Pin
Shah Shahpori21-Sep-03 7:21
sussShah Shahpori21-Sep-03 7:21 
GeneralRe: Inserting GIF in Rich Edit Control Pin
JWood22-Sep-03 9:31
JWood22-Sep-03 9:31 
Questioncode for making a morph program? Pin
andreas75521-Sep-03 6:06
sussandreas75521-Sep-03 6:06 
AnswerRe: code for making a morph program? Pin
JWood22-Sep-03 9:46
JWood22-Sep-03 9:46 
Generalwindows arrows on CHeaderCtrl Pin
YaronNir21-Sep-03 5:47
YaronNir21-Sep-03 5:47 
GeneralRe: windows arrows on CHeaderCtrl Pin
Ravi Bhavnani21-Sep-03 11:26
professionalRavi Bhavnani21-Sep-03 11:26 
GeneralRe: windows arrows on CHeaderCtrl Pin
Michael Dunn21-Sep-03 12:44
sitebuilderMichael Dunn21-Sep-03 12:44 
GeneralPointers Pin
Sirrius21-Sep-03 2:54
Sirrius21-Sep-03 2:54 
GeneralRe: Pointers Pin
Roger Allen21-Sep-03 4:43
Roger Allen21-Sep-03 4:43 
GeneralRe: Pointers Pin
Sirrius21-Sep-03 5:06
Sirrius21-Sep-03 5:06 
GeneralRe: Pointers Pin
ZoogieZork21-Sep-03 6:26
ZoogieZork21-Sep-03 6:26 
GeneralPipe Hell - GetLastError() 131 or 183 Pin
Alberto Bar-Noy21-Sep-03 1:51
Alberto Bar-Noy21-Sep-03 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.