PDA

Click to See Complete Forum and Search --> : Creating Windows Messages


Aug 27th, 2000, 08:12 AM
Hi,

I have two components which share a common class, and I want to use SendMessage to allow this class the communicate with the components.

How would I go about creating a message which I know is not being used by the system. For example, is there a limit on the default messages (a bit like the vbObjectError constant). Or can Windows itself assign me a free message id?

Thanks;

Sam Finch
Aug 28th, 2000, 01:35 AM
it's actually very simple, there is a maximum limit that windows messages won't go above.

Private Const WM_USER = &H400

so when you are deciding on your window messages give them message constants such as



Private Const WM_AriadsMessage = WM_USER + 1
Private Const WM_AriadsOtherMessage = WM_USER + 2
Private Const WM_AnotherMessage = WM_USER + 3