Click here to Skip to main content
16,006,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 2 dim numbers.. Pin
_80866-Aug-07 6:27
_80866-Aug-07 6:27 
GeneralRe: 2 dim numbers.. Pin
_80866-Aug-07 6:41
_80866-Aug-07 6:41 
GeneralRe: 2 dim numbers.. Pin
Rage6-Aug-07 21:01
professionalRage6-Aug-07 21:01 
AnswerRe: 2 dim numbers.. Pin
Mark Salsbery6-Aug-07 7:13
Mark Salsbery6-Aug-07 7:13 
QuestionWinExec return value, Createprocess return value? VC++ 6.0 Pin
rolfhorror6-Aug-07 5:34
rolfhorror6-Aug-07 5:34 
AnswerRe: WinExec return value, Createprocess return value? VC++ 6.0 Pin
Rage6-Aug-07 5:40
professionalRage6-Aug-07 5:40 
AnswerRe: WinExec return value, Createprocess return value? VC++ 6.0 Pin
David Crow6-Aug-07 5:43
David Crow6-Aug-07 5:43 
QuestionPassing a Windows data type results in a liner error [modified] Pin
Cuziyq6-Aug-07 5:27
Cuziyq6-Aug-07 5:27 
In my program, I deliberately did not specify a background color in my WNDCLASSEX struct. As a result, I must paint it manually. My WNDPROC simply passes off all its arguments to an identical (static) function in a Controller class I created. The Controller class looks up the relevant HWND in a list and routes to the appropriate message handler for each object via a pointer GuiObject pointer.

My problem is the WM_ERASEBKGND message. The device context is contained in the WPARAM parameter, but when I try to pass WPARAM to my object's message handler, I get a linker error:

"LNK2001: unresolved external symbol "protected: virtual int __thiscall GuiObject::OnEraseBackground(void)" (?OnEraseBackground@GuiObject@@MAEHXZ)"

As far as I can tell, this only happens with Windows data types. I can pass ints and other things in with no problem.

Here is the code:

LRESULT Controller::MessageDispatcher(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)<br />
{<br />
	//Search for our hWnd in the list<br />
	for(current=head; !current->hWnd; current=current->next)<br />
		if(current->next=NULL) break;<br />
<br />
	switch(msg)<br />
	{<br />
	case WM_ERASEBKGND:<br />
		current->OnEraseBackground((HDC) wParam);<br />
		break;<br />
...<br />
}<br />


Can anyone tell me what I'm doing wrong?

Thanks in advance


-- modified at 11:32 Monday 6th August, 2007
AnswerRe: Passing a Windows data type results in a liner error Pin
Mark Salsbery6-Aug-07 5:51
Mark Salsbery6-Aug-07 5:51 
GeneralRe: Passing a Windows data type results in a liner error Pin
Cuziyq6-Aug-07 6:02
Cuziyq6-Aug-07 6:02 
QuestionHow to strip debug info from an executable on Vista using VS 2005 Pin
Ben Burnett6-Aug-07 5:04
Ben Burnett6-Aug-07 5:04 
QuestionVC5 DLL migration to VC8 Pin
Nitin_A6-Aug-07 4:58
Nitin_A6-Aug-07 4:58 
QuestionLINK error1181:Cann't open input file "Gx.obj" Pin
kcynic6-Aug-07 4:56
kcynic6-Aug-07 4:56 
AnswerRe: LINK error1181:Cann't open input file "Gx.obj" Pin
toxcct6-Aug-07 5:37
toxcct6-Aug-07 5:37 
GeneralRe: LINK error1181:Cann't open input file "Gx.obj" Pin
kcynic6-Aug-07 11:53
kcynic6-Aug-07 11:53 
AnswerRe: LINK error1181:Cann't open input file "Gx.obj" Pin
Rage6-Aug-07 5:42
professionalRage6-Aug-07 5:42 
QuestionImage comparision Pin
Maynka6-Aug-07 4:03
Maynka6-Aug-07 4:03 
QuestionRe: Image comparision Pin
David Crow6-Aug-07 4:06
David Crow6-Aug-07 4:06 
Questionhiding a window below another control window Pin
prithaa6-Aug-07 3:48
prithaa6-Aug-07 3:48 
AnswerRe: hiding a window below another control window Pin
baerten6-Aug-07 4:07
baerten6-Aug-07 4:07 
AnswerRe: hiding a window below another control window Pin
KarstenK6-Aug-07 4:08
mveKarstenK6-Aug-07 4:08 
Questionenumerate the subkey in registry [modified] Pin
retinex6-Aug-07 3:43
retinex6-Aug-07 3:43 
QuestionRe: enumerate the subkey in registry Pin
David Crow6-Aug-07 3:48
David Crow6-Aug-07 3:48 
AnswerRe: enumerate the subkey in registry Pin
retinex6-Aug-07 15:56
retinex6-Aug-07 15:56 
GeneralRe: enumerate the subkey in registry Pin
David Crow6-Aug-07 16:18
David Crow6-Aug-07 16:18 

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.