Click here to Skip to main content
15,915,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Window has no title... conflicting window styles? Pin
Code-o-mat16-Dec-09 20:35
Code-o-mat16-Dec-09 20:35 
GeneralRe: Window has no title... conflicting window styles? Pin
Sauce!16-Dec-09 20:49
Sauce!16-Dec-09 20:49 
GeneralRe: Window has no title... conflicting window styles? Pin
Code-o-mat16-Dec-09 20:55
Code-o-mat16-Dec-09 20:55 
GeneralRe: Window has no title... conflicting window styles? Pin
Sauce!16-Dec-09 21:34
Sauce!16-Dec-09 21:34 
GeneralRe: Window has no title... conflicting window styles? Pin
Code-o-mat16-Dec-09 21:50
Code-o-mat16-Dec-09 21:50 
GeneralRe: Window has no title... conflicting window styles? Pin
Sauce!17-Dec-09 0:44
Sauce!17-Dec-09 0:44 
GeneralRe: Window has no title... conflicting window styles? Pin
David Crow17-Dec-09 2:30
David Crow17-Dec-09 2:30 
GeneralRe: Window has no title... conflicting window styles? Pin
Sauce!17-Dec-09 2:57
Sauce!17-Dec-09 2:57 
I'm thinking then that it has something to do with my msgRouter() or wndProc() - I've tried an empty wndProc that simply returns defWindowProc() with no luck.

LRESULT CALLBACK Window::msgRouter(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	//NOTE: The following messages may need to be handled here explicitly as they are sent
	//before CreateWindow() returns - WM_NCCREATE, WM_GETMINMAXINFO, WM_CREATE.
	
	if(msg == WM_NCCREATE)
	{
		//A window was created. Set the user data of the handle to the pointer passed in the call to createWindow()
		Window *window = reinterpret_cast<Window*>(reinterpret_cast<LPCREATESTRUCT>(lParam)->lpCreateParams);
		SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<long>(window));
		return TRUE;
	}
	else
	{
		Window *window = (Window*)GetWindowLongPtr(hWnd, GWLP_USERDATA);

		if(window)
		{
			return window->wndProc(msg, wParam, lParam);
		}

		return DefWindowProc(hWnd, msg, wParam, lParam);
	}

	return DefWindowProc(hWnd, msg, wParam, lParam);
}

LRESULT CALLBACK Window::wndProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch(msg)
	{
	case WM_CLOSE:
	case WM_DESTROY:
		PostQuitMessage(0);
		return 0;
	case WM_KEYDOWN:
		switch(wParam)
		{
		case VK_ESCAPE:
			PostQuitMessage(0);
			return 0;
		default:
			break;
		}
		break;
	default:
		break;
	}

	return DefWindowProc(mHWnd, msg, wParam, lParam);
}

GeneralRe: Window has no title... conflicting window styles? Pin
Sauce!17-Dec-09 3:54
Sauce!17-Dec-09 3:54 
GeneralRe: Window has no title... conflicting window styles? Pin
Code-o-mat17-Dec-09 8:33
Code-o-mat17-Dec-09 8:33 
QuestionUdp broadcast failed in vista Pin
ganesh.dp16-Dec-09 20:04
ganesh.dp16-Dec-09 20:04 
AnswerRe: Udp broadcast failed in vista Pin
KarstenK16-Dec-09 21:09
mveKarstenK16-Dec-09 21:09 
GeneralRe: Udp broadcast failed in vista Pin
ganesh.dp16-Dec-09 22:31
ganesh.dp16-Dec-09 22:31 
GeneralRe: Udp broadcast failed in vista Pin
KarstenK16-Dec-09 22:35
mveKarstenK16-Dec-09 22:35 
Questionerror PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue Pin
itkid16-Dec-09 18:27
itkid16-Dec-09 18:27 
AnswerRe: error PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue [modified] Pin
22491716-Dec-09 18:33
22491716-Dec-09 18:33 
GeneralRe: error PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue Pin
itkid16-Dec-09 19:02
itkid16-Dec-09 19:02 
GeneralRe: error PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue Pin
22491716-Dec-09 19:13
22491716-Dec-09 19:13 
GeneralRe: error PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue Pin
itkid16-Dec-09 19:31
itkid16-Dec-09 19:31 
GeneralRe: error PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue Pin
itkid16-Dec-09 19:32
itkid16-Dec-09 19:32 
AnswerRe: error PRJ0019: A tool returned an error code from "Registering ActiveX Control..." Issue Pin
KarstenK16-Dec-09 22:38
mveKarstenK16-Dec-09 22:38 
Questionreading writing to a file system Pin
hrishiS16-Dec-09 17:44
hrishiS16-Dec-09 17:44 
AnswerRe: reading writing to a file system Pin
Adam Roderick J16-Dec-09 17:56
Adam Roderick J16-Dec-09 17:56 
GeneralRe: reading writing to a file system [modified] Pin
hrishiS16-Dec-09 18:23
hrishiS16-Dec-09 18:23 
GeneralRe: reading writing to a file system Pin
Adam Roderick J16-Dec-09 21:51
Adam Roderick J16-Dec-09 21: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.