Antonio Linares wrote:Evans,
You just need this new line:
- Code: Select all Expand view
...
if( !bTab )
{
// V. ADDED STARTS
if( ! ( lpdis->itemState & ODS_SELECTED ) ) // NEW !!!!!!!!
SetBkColor( lpdis->hDC, 16770508 ); // HCYAN1
// V. ADDED ENDS
DrawText( lpdis->hDC, szPrompt, -1, &lpdis->rcItem, DT_LEFT );
...
Antonio hi,
It does work fine and of course, I would like to thank you very much for your help!!!
There is one more line to add the same code, where we use menuitems with Tabs,
and the change is as follows (marked with BOLD letters):
if( !bTab )
{
// V. STARTS
if( ! ( lpdis->itemState & ODS_SELECTED ) ) // NEW !!!!!!!! // THANKS TO ANTONIO !!! SetBkColor( lpdis->hDC, 16770508 ); // HCYAN1
// V. ENDS
DrawText( lpdis->hDC, szPrompt, -1, &lpdis->rcItem, DT_LEFT );
// MessageBox( 0, "Debug line 11385", "Attention", 0 );
}
else
{
lpdis->rcItem.right -= 21; // THOSE THAT HAVE TABS (eg. F5)
StrToken( szPrompt, 1, 9, &wLen ); // 32 bits does not fill wLen before
// V. STARTS
if( ! ( lpdis->itemState & ODS_SELECTED ) ) // NEW !!!!!!!! // THANKS TO ANTONIO !!! SetBkColor( lpdis->hDC, 16770508 );
// V. ENDS
DrawText( lpdis->hDC, StrToken(szPrompt, 1, 9, &wLen), wLen, &lpdis->rcItem, DT_LEFT );
StrToken( szPrompt, 2, 9, &wLen ); // 32 bits does not fill wLen before
DrawText( lpdis->hDC, StrToken(szPrompt, 2, 9, &wLen), wLen, &lpdis->rcItem, DT_RIGHT );
lpdis->rcItem.right += 21;
}
It now works nicely, and of course, our FW users can definitely offer something different to their clients,
considering that the above color used in my screens (and your example) [color 16770508, which is close
to HCYAN] can be changed to anything that the users like (can even be selected by the clients if they want).
Once again, I would like to express my many thanks to you and everyone else involved into these (both
the menu color, and the dialogs' background brush).
Thank You!
Long Live FWH !
My kindest regards
Evans
ps. For Otto... I will soon be involved with the tooltips for menus, in hopes that I can do it...
For anyone else concerned...
The balloon tooltips, do NOT work on Win XP Prof., not in the buttonbar, and not on buttons, classic or
buttonbmp's. I experienced this problem this morning; just one of my clients has this Win version.
Anybody else having resolved this issued (the program works on 3 workstations, 1 of them is XP Home,
another is Vista, and the last one is Win XP Prof. The XP Prof does not display tooltips at all, however,
the menuitem messages were displayed fine on the status bar).