Click here to Skip to main content
15,889,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFONT Pin
Anthony988713-Jun-03 13:24
Anthony988713-Jun-03 13:24 
QuestionHow to sync folders over the internet? Pin
IGx8913-Jun-03 12:59
IGx8913-Jun-03 12:59 
AnswerRe: How to sync folders over the internet? Pin
valikac13-Jun-03 15:12
valikac13-Jun-03 15:12 
AnswerRe: How to sync folders over the internet? Pin
Brian Delahunty14-Jun-03 0:30
Brian Delahunty14-Jun-03 0:30 
GeneralSearch Algorithims Pin
Steven M Hunt13-Jun-03 12:21
Steven M Hunt13-Jun-03 12:21 
GeneralRe: Search Algorithims Pin
Ryan Binns14-Jun-03 1:42
Ryan Binns14-Jun-03 1:42 
GeneralRe: Search Algorithims Pin
Steven M Hunt14-Jun-03 7:52
Steven M Hunt14-Jun-03 7:52 
GeneralProblem with CreateWindowEx(..)! Please Help! Pin
nutkase13-Jun-03 12:16
nutkase13-Jun-03 12:16 
Well,
while working on a class i am facing a really bad problem! well, i just cant get it!
i just run the following code
<br />
BOOL COpenGLWindow::CreateOpenGLWindow(RECT Rect,char* WindowCaption,bool Fullscreen,int Bits,UINT ExStyle,UINT Style,HWND Parent)<br />
{<br />
	WNDCLASS WndClass;<br />
	WndClass.style=CS_VREDRAW|CS_HREDRAW|CS_OWNDC;<br />
	WndClass.lpfnWndProc=OpenGLWndProc;<br />
	WndClass.cbClsExtra=0;<br />
	WndClass.cbWndExtra=0;<br />
	WndClass.hInstance=GetInstHandle();<br />
	WndClass.hIcon=::LoadIcon(NULL,IDI_WINLOGO);<br />
	WndClass.hCursor=::LoadCursor(NULL,IDC_ARROW);<br />
	WndClass.hbrBackground=0;<br />
	WndClass.lpszMenuName=0;<br />
	WndClass.lpszClassName="OpenGLClass";<br />
	if(!RegisterClass(&WndClass))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	bool ShowWnd=(Style&WS_VISIBLE);<br />
	Style|=~WS_VISIBLE;<br />
	//AdjustWindowRectEx(&Rect,Style,FALSE,ExStyle);<br />
	if(!(hWnd=CreateWindowEx(ExStyle,"OpenGLClass",WindowCaption,Style,Rect.left,Rect.top,Rect.right-Rect.left,Rect.bottom-Rect.top,Parent,(HMENU)NULL,GetInstHandle(),NULL)))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	if(!(hDC=GetDC()))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	PIXELFORMATDESCRIPTOR pfd=<br />
	{<br />
		sizeof(PIXELFORMATDESCRIPTOR),<br />
		1,<br />
		PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBUFFER,<br />
		PFD_TYPE_RGBA,<br />
		Bits,<br />
		0,0,0,0,0,0,0,0,0,0,0,0,0,<br />
		24,<br />
		0,0,0,0,0,0,0<br />
	};<br />
	int PixelFormat;<br />
	if(!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	if(!SetPixelFormat(hDC,PixelFormat,&pfd))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	if(!(hRC=wglCreateContext(hDC)))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	if(!wglMakeCurrent(hDC,hRC))<br />
	{<br />
		OutputDebugString();<br />
		return FALSE;<br />
	}<br />
	if(ShowWnd)<br />
	{<br />
		ShowWindow(hWnd,SW_SHOW);<br />
		SetForegroundWindow(hWnd);<br />
		SetFocus(hWnd);<br />
	}<br />
	return TRUE;<br />
}<br />

and the call to CreateWindowEx Failes ! GetLastError() prints INvalid Window Handle.?!?!?!?Confused | :confused:
well the call bieing made to this function is as follows:
<br />
CreateOpenGLWindow(Rect,"Mine",false,16,WS_EX_APPWINDOW|WS_EX_WINDOWEDGE,WS_POPUPWINDOW,NULL);<br />


WEll i m in serious trouble so please help as soon as possible!
shoaib.

Doesn't Window Really Sucks!
GeneralChanging View of CFormView derived class at runtime Pin
JaisonCodeMan13-Jun-03 11:37
JaisonCodeMan13-Jun-03 11:37 
GeneralRe: Changing View of CFormView derived class at runtime Pin
abc87613-Jun-03 13:01
abc87613-Jun-03 13:01 
GeneralRe: Changing View of CFormView derived class at runtime Pin
abc87613-Jun-03 13:02
abc87613-Jun-03 13:02 
GeneralRe: Changing View of CFormView derived class at runtime Pin
JaisonCodeMan16-Jun-03 20:32
JaisonCodeMan16-Jun-03 20:32 
GeneralRe: Changing View of CFormView derived class at runtime Pin
abc87621-Jun-03 10:22
abc87621-Jun-03 10:22 
Generaltitle Pin
aguest13-Jun-03 11:23
aguest13-Jun-03 11:23 
GeneralRe: title Pin
abc87613-Jun-03 11:39
abc87613-Jun-03 11:39 
GeneralRe: title Pin
adamUK14-Jun-03 11:53
adamUK14-Jun-03 11:53 
GeneralNetwork TCP conenction monitoring!! Pin
abc87613-Jun-03 11:21
abc87613-Jun-03 11:21 
General&amp; Pin
albean13-Jun-03 10:40
albean13-Jun-03 10:40 
GeneralRe: &amp; Pin
David Crow13-Jun-03 10:46
David Crow13-Jun-03 10:46 
GeneralRe: &amp; Pin
Michael Dunn13-Jun-03 14:29
sitebuilderMichael Dunn13-Jun-03 14:29 
GeneralRe: &amp; Pin
Atlantys13-Jun-03 19:05
Atlantys13-Jun-03 19:05 
GeneralDLL and CBitmap Pin
Bert Tuyt13-Jun-03 10:32
Bert Tuyt13-Jun-03 10:32 
GeneralRe: DLL and CBitmap Pin
gucy13-Jun-03 19:07
gucy13-Jun-03 19:07 
GeneralHelp with GUI Design in VC++ .NET Pin
James A Beggs13-Jun-03 10:31
James A Beggs13-Jun-03 10:31 
GeneralPostNcDestroy problems Pin
andyg.10113-Jun-03 10:24
andyg.10113-Jun-03 10:24 

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.