How to implement custom window message

This is a discussion on How to implement custom window message within the Windows Programming forums, part of the Platform Specific Boards category; I use Win32 SDK to write program. The program needs a function that when user clicks one button, the dialog ...

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    42

    How to implement custom window message

    I use Win32 SDK to write program. The program needs a function that when user clicks one button, the dialog box will be minum size and become a tray in the desktop status bar. As I know to implement tray effect, I should define a custom message. I can do it in MFC program, but I feel curious in Win32 SDK program.


    Thanks

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    35
    not hard.

    #define MY_MESSAGE WM_USER + 131

    and for example

    case WM_COMMAND:
    switch(LOWORD(wParam))
    {
    case ID_Button1:
    SendMessage(hmyEdit, MY_MESSAGE, 123, (LONG) other_var);
    [...]
    case MY_MESSAGE:
    if (wParam == 123 && lParam == 999) {.....};
    break;
    etc.
    Want to learn? Then try to teach...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange string behavior
    By jcafaro10 in forum C Programming
    Replies: 2
    Last Post: 04-07-2009, 07:38 PM
  2. Adding buttons, edit boxes, etc to the window
    By rainmanddw in forum Windows Programming
    Replies: 1
    Last Post: 04-10-2006, 03:07 PM
  3. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 01:39 PM
  4. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  5. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21