Click here to Skip to main content
15,907,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCompatibility Question Pin
1-Jan-02 3:37
suss1-Jan-02 3:37 
GeneralRe: Compatibility Question Pin
Philip Patrick1-Jan-02 3:50
professionalPhilip Patrick1-Jan-02 3:50 
GeneralHi, Philip ,look here... Pin
1-Jan-02 5:42
suss1-Jan-02 5:42 
GeneralRe: Hi, Philip ,look here... Pin
Philip Patrick1-Jan-02 6:02
professionalPhilip Patrick1-Jan-02 6:02 
GeneralWM_ Pin
The_Server1-Jan-02 2:41
The_Server1-Jan-02 2:41 
GeneralRe: WM_ Pin
Philip Patrick1-Jan-02 2:55
professionalPhilip Patrick1-Jan-02 2:55 
GeneralRe: WM_ Pin
The_Server1-Jan-02 3:17
The_Server1-Jan-02 3:17 
GeneralRe: WM_ Pin
Philip Patrick1-Jan-02 3:41
professionalPhilip Patrick1-Jan-02 3:41 
Well...
A1: Yes, you can just use WM_APP+.. but.. imagine that you defined WM_APP+2 message ID and some other running program defined same message. And doesn't matter that YOU are sending your message to particular HWND, but the other prog. is sending using broadcast, that means you will get 2 messages, yours and not. That's why you need RegisterWindowMessage.
But... You have to use Register... only if you jave TWO applications, that communicating with each other. Within ONE application (when you are sending messages to CHILD and not top-level windows) you can simply define the message id.

A2: Yes you have to register your message everytime the application starts. See a simple example below:

UINT WM_MYCUSTOM_MESSAGE = RegisterWindowMessage(_T("WM_MYCUSTOM_MESSAGE"));

Of course instead of WM_MYCUSTOM_MESSAGE you can use any name you can imagine. Once the message is registered, you can get its value in another application with exactly same string of code.


This is the main idea Smile | :)

Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
GeneralRe: WM_ Pin
1-Jan-02 3:25
suss1-Jan-02 3:25 
GeneralRe: WM_ Pin
Philip Patrick1-Jan-02 3:43
professionalPhilip Patrick1-Jan-02 3:43 
GeneralRe: WM_ Pin
Jörgen Sigvardsson1-Jan-02 4:07
Jörgen Sigvardsson1-Jan-02 4:07 
GeneralRe: WM_ Pin
Philip Patrick1-Jan-02 4:22
professionalPhilip Patrick1-Jan-02 4:22 
GeneralHi, Philip Look Here... Pin
1-Jan-02 6:11
suss1-Jan-02 6:11 
GeneralTotally agree... :) Pin
Philip Patrick1-Jan-02 6:16
professionalPhilip Patrick1-Jan-02 6:16 
GeneralCustom User Interfaces in VC++ Pin
31-Dec-01 23:56
suss31-Dec-01 23:56 
GeneralRe: Custom User Interfaces in VC++ Pin
Christian Graus1-Jan-02 0:42
protectorChristian Graus1-Jan-02 0:42 
GeneralMicrosoft Speech API (SAPI) question Pin
31-Dec-01 22:28
suss31-Dec-01 22:28 
GeneralRe: Microsoft Speech API (SAPI) question Pin
Nnamdi Onyeyiri1-Jan-02 3:09
Nnamdi Onyeyiri1-Jan-02 3:09 
GeneralRe: Microsoft Speech API (SAPI) question Pin
1-Jan-02 3:28
suss1-Jan-02 3:28 
GeneralCImage to HBITMAP Pin
Liorsh31-Dec-01 19:44
Liorsh31-Dec-01 19:44 
GeneralRe: CImage to HBITMAP Pin
Christian Graus1-Jan-02 0:47
protectorChristian Graus1-Jan-02 0:47 
GeneralRe: CImage to HBITMAP Pin
Liorsh1-Jan-02 0:50
Liorsh1-Jan-02 0:50 
GeneralRe: CImage to HBITMAP Pin
Christian Graus1-Jan-02 1:01
protectorChristian Graus1-Jan-02 1:01 
GeneralRe: CImage to HBITMAP Pin
Philip Patrick1-Jan-02 6:10
professionalPhilip Patrick1-Jan-02 6:10 
GeneralHBITMAP & open file Pin
Matt Newman31-Dec-01 16:21
Matt Newman31-Dec-01 16:21 

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.