Click here to Skip to main content
15,849,130 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange CListBox Behavior Pin
Jochen Arndt8-Jan-16 0:26
professionalJochen Arndt8-Jan-16 0:26 
GeneralRe: Strange CListBox Behavior Pin
wdolson8-Jan-16 0:33
wdolson8-Jan-16 0:33 
GeneralRe: Strange CListBox Behavior Pin
Jochen Arndt8-Jan-16 0:42
professionalJochen Arndt8-Jan-16 0:42 
GeneralRe: Strange CListBox Behavior Pin
Richard MacCutchan8-Jan-16 2:04
mveRichard MacCutchan8-Jan-16 2:04 
QuestionEasy to use asymmetric (public key) encryption Pin
peterchen6-Jan-16 6:26
peterchen6-Jan-16 6:26 
QuestionHow to communicate between two different app using SendMessage API? Pin
Anasuya201529-Dec-15 20:56
Anasuya201529-Dec-15 20:56 
AnswerRe: How to communicate between two different app using SendMessage API? Pin
Richard MacCutchan29-Dec-15 23:29
mveRichard MacCutchan29-Dec-15 23:29 
GeneralRe: How to communicate between two different app using SendMessage API? Pin
Anasuya201530-Dec-15 3:32
Anasuya201530-Dec-15 3:32 
Thanks for your help.
I am facing issue in extracting the message.

Code is as follows...
APP1:
C++
int WM_MYMSG = RegisterWindowMessage (L"MYMESSAGE");
HWND hw = FindWindow(NULL, L"Demo");
    LPCTSTR strMsg = L"ClientDemo1";
    //Send that message
   ::SendMessage(hw, WM_MYMSG, NULL, (LPARAM(LPCTSTR)strMsg);


APP2:
C++
LRESULT CDemoDlg::OnMyMsg(WPARAM w, LPARAM l) {

	MSG* p = (MSG*)l;
	LPCTSTR str = (LPCTSTR)p->message;
	MessageBox(str);// No message. But getting the alert while sending message. Need to extract the actual msg here.

	return (LRESULT) 0;
}


Please let me know what changes is needed here by which it'll display "ClientDemo1" in msgbox.
QuestionRe: How to communicate between two different app using SendMessage API? Pin
Richard MacCutchan30-Dec-15 3:41
mveRichard MacCutchan30-Dec-15 3:41 
AnswerRe: How to communicate between two different app using SendMessage API? Pin
Anasuya201530-Dec-15 4:06
Anasuya201530-Dec-15 4:06 
GeneralRe: How to communicate between two different app using SendMessage API? Pin
Richard MacCutchan30-Dec-15 5:29
mveRichard MacCutchan30-Dec-15 5:29 
SuggestionRe: How to communicate between two different app using SendMessage API? Pin
David Crow30-Dec-15 11:28
David Crow30-Dec-15 11:28 
AnswerRe: How to communicate between two different app using SendMessage API? Pin
Arthur V. Ratz30-Dec-15 3:42
professionalArthur V. Ratz30-Dec-15 3:42 
GeneralRe: How to communicate between two different app using SendMessage API? Pin
Anasuya201530-Dec-15 4:51
Anasuya201530-Dec-15 4:51 
GeneralRe: How to communicate between two different app using SendMessage API? Pin
Arthur V. Ratz30-Dec-15 5:27
professionalArthur V. Ratz30-Dec-15 5:27 
GeneralRe: How to communicate between two different app using SendMessage API? Pin
Arthur V. Ratz30-Dec-15 5:29
professionalArthur V. Ratz30-Dec-15 5:29 
AnswerRe: How to communicate between two different app using SendMessage API? Pin
Serkan Onat30-Dec-15 10:30
professionalSerkan Onat30-Dec-15 10:30 
PraiseRe: How to communicate between two different app using SendMessage API? Pin
Maximilien6-Jan-16 3:49
Maximilien6-Jan-16 3:49 
QuestionConversions in C Pin
ForNow29-Dec-15 9:09
ForNow29-Dec-15 9:09 
AnswerRe: Conversions in C Pin
Richard Andrew x6429-Dec-15 12:44
professionalRichard Andrew x6429-Dec-15 12:44 
GeneralRe: Conversions in C Pin
ForNow29-Dec-15 12:52
ForNow29-Dec-15 12:52 
AnswerRe: Conversions in C Pin
Arthur V. Ratz30-Dec-15 3:45
professionalArthur V. Ratz30-Dec-15 3:45 
GeneralRe: Conversions in C Pin
ForNow30-Dec-15 7:22
ForNow30-Dec-15 7:22 
QuestionHow to call c# callback function from VC++ Pin
shakumar_2128-Dec-15 23:54
shakumar_2128-Dec-15 23:54 
AnswerRe: How to call c# callback function from VC++ Pin
Richard MacCutchan29-Dec-15 1:57
mveRichard MacCutchan29-Dec-15 1:57 

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.