Click here to Skip to main content
15,894,740 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: A link problem with c++ template function Pin
Stefan_Lang27-Jul-11 3:29
Stefan_Lang27-Jul-11 3:29 
QuestionCan both VS2005 and 2008 be installed on XP Pin
Cold_Fearing_Bird25-Jul-11 3:51
Cold_Fearing_Bird25-Jul-11 3:51 
AnswerRe: Can both VS2005 and 2008 be installed on XP Pin
Chris Losinger25-Jul-11 3:54
professionalChris Losinger25-Jul-11 3:54 
JokeRe: Can both VS2005 and 2008 be installed on XP Pin
«_Superman_»25-Jul-11 7:11
professional«_Superman_»25-Jul-11 7:11 
GeneralRe: Can both VS2005 and 2008 be installed on XP Pin
Chris Losinger25-Jul-11 7:22
professionalChris Losinger25-Jul-11 7:22 
AnswerRe: Can both VS2005 and 2008 be installed on XP Pin
User 742933825-Jul-11 8:23
professionalUser 742933825-Jul-11 8:23 
AnswerRe: Can both VS2005 and 2008 be installed on XP Pin
Rajesh R Subramanian25-Jul-11 3:57
professionalRajesh R Subramanian25-Jul-11 3:57 
GeneralRe: Can both VS2005 and 2008 be installed on XP Pin
Cold_Fearing_Bird25-Jul-11 4:14
Cold_Fearing_Bird25-Jul-11 4:14 
GeneralRe: Can both VS2005 and 2008 be installed on XP Pin
Albert Holguin25-Jul-11 4:22
professionalAlbert Holguin25-Jul-11 4:22 
AnswerRe: Can both VS2005 and 2008 be installed on XP Pin
Jaime Olivares25-Jul-11 16:37
Jaime Olivares25-Jul-11 16:37 
AnswerRe: Can both VS2005 and 2008 be installed on XP Pin
Ni740826-Jul-11 1:54
Ni740826-Jul-11 1:54 
AnswerRe: Can both VS2005 and 2008 be installed on XP Pin
Stefan_Lang27-Jul-11 3:42
Stefan_Lang27-Jul-11 3:42 
QuestionVisual C++ 2008 and Ultragrid 2.0 Pin
sujipal24-Jul-11 19:56
sujipal24-Jul-11 19:56 
AnswerRe: Visual C++ 2008 and Ultragrid 2.0 Pin
Code-o-mat24-Jul-11 22:07
Code-o-mat24-Jul-11 22:07 
AnswerRe: Visual C++ 2008 and Ultragrid 2.0 Pin
Maximilien25-Jul-11 3:27
Maximilien25-Jul-11 3:27 
QuestionHelp Regarding XML Parsing Pin
pix_programmer24-Jul-11 19:55
pix_programmer24-Jul-11 19:55 
AnswerRe: Help Regarding XML Parsing Pin
_AnsHUMAN_ 24-Jul-11 20:32
_AnsHUMAN_ 24-Jul-11 20:32 
GeneralRe: Help Regarding XML Parsing Pin
pix_programmer24-Jul-11 20:52
pix_programmer24-Jul-11 20:52 
GeneralRe: Help Regarding XML Parsing Pin
_AnsHUMAN_ 24-Jul-11 22:46
_AnsHUMAN_ 24-Jul-11 22:46 
QuestionHow to get unplug the Ethernet cable message in WSAAsyncSelect ? Pin
wangningyu24-Jul-11 16:00
wangningyu24-Jul-11 16:00 
AnswerRe: How to get unplug the Ethernet cable message in WSAAsyncSelect ? Pin
Richard MacCutchan24-Jul-11 21:11
mveRichard MacCutchan24-Jul-11 21:11 
GeneralRe: How to get unplug the Ethernet cable message in WSAAsyncSelect ? Pin
wangningyu24-Jul-11 21:21
wangningyu24-Jul-11 21:21 
GeneralRe: How to get unplug the Ethernet cable message in WSAAsyncSelect ? Pin
Richard MacCutchan24-Jul-11 23:12
mveRichard MacCutchan24-Jul-11 23:12 
GeneralRe: How to get unplug the Ethernet cable message in WSAAsyncSelect ? Pin
wangningyu24-Jul-11 23:13
wangningyu24-Jul-11 23:13 
QuestionVisual C++ Express receiving a custom message Pin
martinmos23-Jul-11 8:18
martinmos23-Jul-11 8:18 
I am totally new to C++, this is the first thing I've tried to do.
I have a simple program (A) which I want to receive a message from and send a message to another app (B).
I can send messages from A to B fine but if I do then A longer sees the message sent from B, although B gets 0 as the return from the message it sends to A.
I can receive a message (Message number AuMessage obtained using RegisterWindowMessageA) once from B but the message isn't received by A a second time if I send a message to B. If I never send a message to B I can keep receiving the messages in A.

Obviously I'm doingsomething wrong. Every reference seems to tell me to use something like this

BEGIN_MESSAGE_MAP(szWindowClass, CMyParentWndClass)
	//{{AFX_MSG_MAP(CWordPadApp)
	//AFX_MSG_MAP 
//	ON_MESSAGE(AuMessage,HandleAuCommand);
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


but I cannot see how to find CMyParentWndClass, so I have added code to WinProc like this

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	PAINTSTRUCT ps;
	HDC hdc;

          //added this if clause
	if (message == AuMessage )
		{msgin = 7;some flag I intend to use
		 return 76;//any number for tests just so the sending app sees a reply
		}

	switch (message)
...


I couldn't add a new case because using a variable (AuMessage ) gives a compilation error.

How should I handle receiving and sending custom messages? Or can anyone supply a link where I can find the correct approach?

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.