Click here to Skip to main content
15,911,762 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 11:34
Tomasz Sowinski1-Mar-02 11:34 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 12:16
alex.barylski1-Mar-02 12:16 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 12:23
Tomasz Sowinski1-Mar-02 12:23 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 14:25
alex.barylski1-Mar-02 14:25 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski2-Mar-02 1:31
Tomasz Sowinski2-Mar-02 1:31 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski2-Mar-02 8:57
alex.barylski2-Mar-02 8:57 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Michael Dunn1-Mar-02 11:36
sitebuilderMichael Dunn1-Mar-02 11:36 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 12:02
alex.barylski1-Mar-02 12:02 
I don't see how this is possible, i'm missing something here.

If I had:

#define WM_CUSTOMMSG  WM_USER+1

class MyClass
{
  MyClass(){ }
  ...and so on
};

BEGIN_MESSAGE_MAP(CView, MyClass)
  ON_MESSAGE(WM_CUSTOMMSG, OnCustomHandler)
END_MESSAGE_MAP


If I included this control as well as a third party control which by chance did the exact same thing
WM_USER+1, how would the two seperate, but equal #defines not clash...???

if the WndProc was like this:

WndProc()
{
  switch(nMsg)
  {
    case WM_MYMSG;
      break;
    case WM_YOURMSG:
      break;
  }
}


This is why i'm confused...if my app had 2 seperate libs which both did the WM_USER+1 how would my app be able to distinguish which message was really sent...?

Thanx Mike Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tomasz Sowinski1-Mar-02 12:16
Tomasz Sowinski1-Mar-02 12:16 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 12:21
alex.barylski1-Mar-02 12:21 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Tim Smith1-Mar-02 12:51
Tim Smith1-Mar-02 12:51 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
Michael Dunn1-Mar-02 12:21
sitebuilderMichael Dunn1-Mar-02 12:21 
GeneralRe: WM_USER+1 vs RegisterWindowsMessage Pin
alex.barylski1-Mar-02 14:17
alex.barylski1-Mar-02 14:17 
QuestionBrief & Epsilon emulation in VisStudio.Net? Pin
1-Mar-02 11:10
suss1-Mar-02 11:10 
GeneralPreTranslateMessage Pin
alex.barylski1-Mar-02 9:34
alex.barylski1-Mar-02 9:34 
GeneralRe: PreTranslateMessage Pin
Paul M Watt1-Mar-02 10:12
mentorPaul M Watt1-Mar-02 10:12 
GeneralRe: PreTranslateMessage Pin
alex.barylski1-Mar-02 10:36
alex.barylski1-Mar-02 10:36 
GeneralRe: PreTranslateMessage Pin
alex.barylski1-Mar-02 10:45
alex.barylski1-Mar-02 10:45 
GeneralWinsock API Pin
jangel1-Mar-02 8:19
jangel1-Mar-02 8:19 
GeneralRe: Winsock API Pin
Nish Nishant1-Mar-02 13:00
sitebuilderNish Nishant1-Mar-02 13:00 
QuestionAre the STL classes thread-safe? Pin
Le centriste1-Mar-02 8:05
Le centriste1-Mar-02 8:05 
AnswerRe: Are the STL classes thread-safe? Pin
Nemanja Trifunovic1-Mar-02 8:04
Nemanja Trifunovic1-Mar-02 8:04 
GeneralCListCtrl question Pin
jafrazee1-Mar-02 7:56
jafrazee1-Mar-02 7:56 
GeneralRe: CListCtrl question Pin
Shog91-Mar-02 7:59
sitebuilderShog91-Mar-02 7:59 
GeneralRe: Icon Searcher v1.2 and over 30,000 icons download Pin
Jon Hulatt1-Mar-02 7:07
Jon Hulatt1-Mar-02 7:07 

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.