[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

How to change tab control text color when moving mouse over CPropertyPage tab ???

I've seen it in Delphi applications, I have for example a dialog box application, and inside the dialog box I created a property sheet with several property pages in it, when I move with mouse over one of the tab controls of these property pages I want to change the color of the tab text. How is this possible ??

Thx,
Atari
0
atari
Asked:
atari
  • 3
  • 3
1 Solution
 
dwinklerCommented:
You can override the OnMouseMove in the CTabCtrl to keep track of the current tab.

i.e.

      // TODO: Add your message handler code here and/or call default
      CRect rect;

      if(GetItemRect( 0, rect))C
      {
            if(rect.PtInRect(point))
            {
                  m_nCurrentTab = 0;
            }

      }

then make the tab control owner drawn to do any custom tabs...

See Making Owner-Drawn Tabs in the CTabCtrl documentation.  They can explain it better than me....


0
 
ZoppoCommented:
Hi atari,

With IE 3.0 or higher (Comctl32.dll Version 4.70 or higher) you can use TCS_HOTTRACK style. With this style set the tabcontrol highlights the text on that tab beyond the mouse cursor.

hope that helps,

ZOPPO
0
 
atariAuthor Commented:
Hallo Zoppo, Deine Antwort ist gut, aber sie funktioniert leider nicht, habe ein kleines Demo-Proggie geschrieben, Dialogbox mit eingefügter Propertysheet, aber TCS_HOTTRACK funktioniert nicht. Könnte ich Dir den Code mal kurz hochschicken ??? Meine Email-Addy: BugTrapper@gmx.de

Bitte um Antwort, danke !!!!
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ZoppoCommented:
Freilich, kein Problem :)

Aber, wir sollten weiterhin bei Englisch bleiben (auch wenn ich da so meine Probleme hab), damit alle lesen koennen, was hier passiert ...

So, I gonna send you a mail now so you can send me your code and we will see ...

ZOPPO
0
 
atariAuthor Commented:
I contacted ZOPPO and he send me a demo example that exactly solved my problem with hightlighting CTabCtrl's, so sorry, dwinkler, I reject your answer and vote for ZOPPO's answer.

Bye,
Atari
0
 
ZoppoCommented:
Thanks a lot, atarti, I'll send you another email soon, first wanted to see what's on here ...

BTW: I'm not very lucky about handling EE questions like this (by sending the real answer as mail instead of posting it here), because if anyone searches the PAQ and pays points for this question he/she will not see a real answer.

So if anyone payed points for seeing this answer, please send me a mail (zoppo@cdsgmbh.de) and I'll send you the code of the sample projects, which helped atari to solve his problem.

greetings,

ZOPPO
0
 
atariAuthor Commented:
OK, you are right, but it is not possible to post all the source code here,
and there are a lot of question on experts-exchange, where somebody needs to have some code snippets. So I think this a suggestion for further updates of experts-exchange cgi-scripts, where it will maybe in the future be possible to append small code snippets.

I never believed that the search-function would ever be implemented, it lasted years to do so, but now it's working and is very helpful.

Why don't they change other things in the future ??? Who knows.

Bye,
and thanx,
Atari
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now