FWH/xHarbour Menus

Re: FWH/xHarbour Menus

Postby Antonio Linares » Wed May 27, 2009 8:41 am

Stefan, Evans,

Simply change FARPROC into WNDPROC in the C code section :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH/xHarbour Menus

Postby E. Bartzokas » Wed May 27, 2009 4:07 pm

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

Antonio Linares wrote:Stefan, Evans,

Simply change FARPROC into WNDPROC in the C code section :-)
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Re: FWH/xHarbour Menus

Postby StefanHaupt » Thu May 28, 2009 6:47 am

Antonio,

Antonio Linares wrote:Stefan, Evans,
Simply change FARPROC into WNDPROC in the C code section :-)


thanks, it compiles fine now.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: FWH/xHarbour Menus

Postby E. Bartzokas » Thu May 28, 2009 5:50 pm

Stefan,
Post an image when you try the program...
Thanks and regards
Evans


StefanHaupt wrote:Antonio,

Antonio Linares wrote:Stefan, Evans,
Simply change FARPROC into WNDPROC in the C code section :-)


thanks, it compiles fine now.
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Re: FWH/xHarbour Menus

Postby Antonio Linares » Thu May 28, 2009 10:49 pm

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 );
               ...
 

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH/xHarbour Menus

Postby E. Bartzokas » Fri May 29, 2009 2:34 pm

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 );
               ...
 

Image



Antonio hi,
It does work fine and of course, I would like to thank you very much for your help!!!

Image

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).
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 97 guests