StatusBar

This is a discussion on StatusBar within the Windows Programming forums, part of the Platform Specific Boards category; Hi: There is a DialogBox with some controls on it. if I move the mouse on one of the controls, ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    StatusBar

    Hi:

    There is a DialogBox with some controls on it. if I move the mouse on one of the controls, status bar shows the corresponding text. But how can I get the control ID when I move the mouse on the control?

    BOOL DlgProc(....)
    Code:
    case WM_MOUSEMOVE:
    {
    
        switch(CtrlID)
        SendMessage(hwndStatusBar,...,...,...);
    
    }
    break;


    Thanks.
    Last edited by SuperNewbie; 01-19-2004 at 02:55 AM.
    Don't laugh at me,I am just a SuperNewbie.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    I doubt you even receive a WM_MOUSEMOVE if the mouse is over a child window.

    You could subclass all of your controls...
    Last edited by CornedBee; 01-19-2004 at 03:19 AM.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    yes, it seems ok with WM_MOUSEMOVE, but now I have no idea that how to receive the control handle or ID when move the mouse on it
    Don't laugh at me,I am just a SuperNewbie.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    So you actually get the WM_MOUSEMOVE?

    You could use GetWindowFromPoint and pass the mouse coordinates.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    thanks, but I don't know if that is precious, is there any other way to do this?
    Don't laugh at me,I am just a SuperNewbie.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Message Handling
    By sethjackson in forum Windows Programming
    Replies: 14
    Last Post: 07-11-2006, 01:01 PM
  2. How to add a combobox in the statusbar?
    By amrsfmt in forum Windows Programming
    Replies: 8
    Last Post: 09-02-2003, 11:49 PM
  3. Progressbar as Part of Statusbar :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-26-2002, 08:59 AM

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