Click here to Skip to main content
15,921,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Toolbar question Pin
Shay Harel28-Jul-03 6:36
Shay Harel28-Jul-03 6:36 
GeneralRe: Toolbar question Pin
Chris Richardson28-Jul-03 9:24
Chris Richardson28-Jul-03 9:24 
GeneralRe: Toolbar question Pin
Shay Harel28-Jul-03 9:28
Shay Harel28-Jul-03 9:28 
GeneralRe: Proper use of _bstr_t Pin
David Crow28-Jul-03 5:10
David Crow28-Jul-03 5:10 
GeneralRe: Proper use of _bstr_t Pin
nibor28-Jul-03 23:16
nibor28-Jul-03 23:16 
GeneralManaging right click in a CListBox control Pin
doctorpi28-Jul-03 4:25
doctorpi28-Jul-03 4:25 
GeneralRe: Managing right click in a CListBox control Pin
Beer2628-Jul-03 4:30
Beer2628-Jul-03 4:30 
GeneralRe: Managing right click in a CListBox control Pin
doctorpi28-Jul-03 4:33
doctorpi28-Jul-03 4:33 
Generalretrieving hardware information(win2k) Pin
Alexander M.,28-Jul-03 4:11
Alexander M.,28-Jul-03 4:11 
GeneralRe: retrieving hardware information(win2k) Pin
Mike Nordell28-Jul-03 13:46
Mike Nordell28-Jul-03 13:46 
GeneralRe: retrieving hardware information(win2k) Pin
Alexander M.,29-Jul-03 2:29
Alexander M.,29-Jul-03 2:29 
GeneralRe: retrieving hardware information(win2k) Pin
Alexander M.,29-Jul-03 9:39
Alexander M.,29-Jul-03 9:39 
Generalusing PostMessage with user defined messages Pin
Joel Lipschultz28-Jul-03 3:58
Joel Lipschultz28-Jul-03 3:58 
GeneralRe: using PostMessage with user defined messages Pin
David Chamberlain28-Jul-03 4:16
David Chamberlain28-Jul-03 4:16 
GeneralRe: using PostMessage with user defined messages Pin
Joel Lipschultz28-Jul-03 4:30
Joel Lipschultz28-Jul-03 4:30 
GeneralRe: using PostMessage with user defined messages Pin
Cedric Moonen28-Jul-03 4:38
Cedric Moonen28-Jul-03 4:38 
GeneralRe: using PostMessage with user defined messages Pin
Beer2628-Jul-03 4:56
Beer2628-Jul-03 4:56 
GeneralRe: using PostMessage with user defined messages Pin
David Crow28-Jul-03 4:39
David Crow28-Jul-03 4:39 
GeneralRe: using PostMessage with user defined messages Pin
Joel Lipschultz28-Jul-03 5:21
Joel Lipschultz28-Jul-03 5:21 
GeneralRe: using PostMessage with user defined messages Pin
David Crow28-Jul-03 5:30
David Crow28-Jul-03 5:30 
GeneralRe: using PostMessage with user defined messages Pin
peterchen28-Jul-03 4:40
peterchen28-Jul-03 4:40 
GeneralRe: using PostMessage with user defined messages Pin
Joel Lipschultz28-Jul-03 5:04
Joel Lipschultz28-Jul-03 5:04 
GeneralRe: using PostMessage with user defined messages Pin
Beer2628-Jul-03 4:41
Beer2628-Jul-03 4:41 
GeneralRe: using PostMessage with user defined messages Pin
Joel Lipschultz28-Jul-03 5:16
Joel Lipschultz28-Jul-03 5:16 
GeneralRe: using PostMessage with user defined messages Pin
Beer2628-Jul-03 5:40
Beer2628-Jul-03 5:40 
I didn't mean for you to literally add that line, that was just a template like example where you're supposed to replace the CReceive* with the actual pointer to the other window.

That or you can just pass the handle directly in the constructor of the send window

in header

public:
CSend(CWnd* pParent = NULL, HWND h_recievewnd = NULL); // standard constructor

in implementation

CSend::CSend(CWnd* pParent, HWND h_recievewnd)
{
ASSERT(h_recievewnd);
ASSERT(::IsWindow(::FromHandle(h_recievewnd)));
::PostMessage(h_recievewnd, WMU_FUN_MSG, 0, 0);
}

Of course you should make sure and Create CReceive first to get the handle to pass to the constructor of CSend

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.