Stefan, Evans,
Simply change FARPROC into WNDPROC in the C code section
FWH/xHarbour Menus
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- E. Bartzokas
- Posts: 114
- Joined: Tue Feb 14, 2006 8:13 am
- Location: Corinth, Greece
Re: FWH/xHarbour Menus
Antonio hi,
Can you please take a look at my modified MENUS.C, regarding this annoying HCYAN
background color under the selected menuitem?
I would really be obliged if you find some solution.
Thanks a million times...
Kind regards
Evans
Can you please take a look at my modified MENUS.C, regarding this annoying HCYAN
background color under the selected menuitem?
I would really be obliged if you find some solution.
Thanks a million times...
Kind regards
Evans
Antonio Linares wrote:Stefan, Evans,
Simply change FARPROC into WNDPROC in the C code section
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: FWH/xHarbour Menus
Antonio,
thanks, it compiles fine now.Antonio Linares wrote:Stefan, Evans,
Simply change FARPROC into WNDPROC in the C code section
kind regards
Stefan
Stefan
- E. Bartzokas
- Posts: 114
- Joined: Tue Feb 14, 2006 8:13 am
- Location: Corinth, Greece
Re: FWH/xHarbour Menus
Stefan,
Post an image when you try the program...
Thanks and regards
Evans
Post an image when you try the program...
Thanks and regards
Evans
StefanHaupt wrote:Antonio,
thanks, it compiles fine now.Antonio Linares wrote:Stefan, Evans,
Simply change FARPROC into WNDPROC in the C code section
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: FWH/xHarbour Menus
Evans,
You just need this new line:
You just need this new line:
Code: Select all
...
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 );
...
- E. Bartzokas
- Posts: 114
- Joined: Tue Feb 14, 2006 8:13 am
- Location: Corinth, Greece
Re: FWH/xHarbour Menus
Antonio Linares wrote:Evans,
You just need this new line:Code: Select all
... 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).