Results 1 to 2 of 2

Thread: Creating Windows Messages

  1. #1
    Guest
    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;

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    it's actually very simple, there is a maximum limit that windows messages won't go above.

    Code:
    Private Const WM_USER = &H400
    so when you are deciding on your window messages give them message constants such as

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width