Thread: Hover Style

  1. #1
    rEtaRD r HUMANS TOO !!! rEtard's Avatar
    Join Date
    Feb 2005
    Posts
    80

    Hover Style

    Is it possible, doing a hover effect over an OwnerDrawn button ?
    /* Have a nice day */

  2. #2
    Chief Code Coloniser!
    Join Date
    Apr 2005
    Posts
    121
    Yes.

  3. #3
    rEtaRD r HUMANS TOO !!! rEtard's Avatar
    Join Date
    Feb 2005
    Posts
    80
    theres only 2 case for ownerdrawn buttons ODS_SELECTED AND ODS_FOCUS and they can't detect if the mouse is just over the button so is it reccomended that i use WM_PARENTNOTIFY or WM_MOUSEOVER ?
    /* Have a nice day */

  4. #4
    Registered User r1ck0r's Avatar
    Join Date
    Apr 2005
    Location
    UK
    Posts
    30
    The ODS_HOTLIGHT flag is used to notify about mouse hovering.
    However, I believe your owner drawn button will only recieve these notifications when you have called the TrackMouseEvent function.

  5. #5
    rEtaRD r HUMANS TOO !!! rEtard's Avatar
    Join Date
    Feb 2005
    Posts
    80
    r1ck0r, i tried to test what ODS_HOTLIGHT is about but why did my compiler tell me
    Code:
    G:\C++\System\Main.cpp(46) : error C2065: 'ODS_HOTLIGHT' : undeclared identifier
    /* Have a nice day */

  6. #6
    Registered User r1ck0r's Avatar
    Join Date
    Apr 2005
    Location
    UK
    Posts
    30
    You just need to update your compiler.

  7. #7
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Quote Originally Posted by rEtard
    r1ck0r, i tried to test what ODS_HOTLIGHT is about but why did my compiler tell me
    Code:
    G:\C++\System\Main.cpp(46) : error C2065: 'ODS_HOTLIGHT' : undeclared identifier
    You need to #define WINVER 0x0500 (see winuser.h) for your project - for simplicity just #define it before you #include windows.h.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  8. #8
    rEtaRD r HUMANS TOO !!! rEtard's Avatar
    Join Date
    Feb 2005
    Posts
    80
    can someone tell me how to update my compiler? im using Visual C++ 6.0
    /* Have a nice day */

  9. #9
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You visit microsoft's website and download and install whatever the latest service pack for it is (6, probably) and get the psdk from them, too.

    You'll still have to #define WINVER as I have described, though.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. WS_EX_COMPOSITED style (double buffering) problems
    By JasonD in forum Windows Programming
    Replies: 2
    Last Post: 10-12-2004, 11:21 AM
  4. Making a mouse hover button, API style
    By hanhao in forum C++ Programming
    Replies: 1
    Last Post: 05-27-2004, 06:17 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM