Checked menuitem

Checked menuitem

Postby AlexSchaft » Wed Jul 12, 2006 8:36 am

Hi,

Why do menu items with checks appear with the check in a border?

Image

Also, is there a way to "bullet" a menu item, like the view menu in windows explorer?

Alex
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Fri Jul 14, 2006 1:42 pm

Alex,

Please comment out this line in source\winapi\menus.c line 295:
Code: Select all  Expand view
           if( lpdis->itemState & ODS_CHECKED )
           {
              HBITMAP hBmp = LoadBitmap( 0, MAKEINTRESOURCE( OBM_CHECK ) );

              if( ! ( lpdis->itemState & ODS_SELECTED ) )
                 DrawGrayed( lpdis->hDC, hBmp, lpdis->rcItem.top + 1,
                             lpdis->rcItem.left + 1 );
              else
                 DrawMasked( lpdis->hDC, hBmp, lpdis->rcItem.top + 1,
                             lpdis->rcItem.left + 1 );
              DeleteObject( hBmp );
              // WindowInset( lpdis->hDC, &rct );   HERE!
           }

We have to implement the bullet option.
regards, saludos

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

Compiling

Postby AlexSchaft » Mon Jul 17, 2006 6:37 am

Hi,

What #defines do I need to compile this? Compiling fails using Xhb

Tried WIN32

Alex
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Mon Jul 17, 2006 6:46 am

Alex,

We email you the modified library for your review, thanks.
regards, saludos

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

Postby Enrico Maria Giordano » Mon Jul 17, 2006 4:15 pm

It seems that there is still a light grey background under the check sign.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Jul 17, 2006 4:28 pm

Enrico,

Please try this:
Code: Select all  Expand view
           if( lpdis->itemState & ODS_CHECKED )
           {
              HBITMAP hBmp = LoadBitmap( 0, MAKEINTRESOURCE( OBM_CHECK ) );

              DrawMasked( lpdis->hDC, hBmp, lpdis->rcItem.top + 1,
                                lpdis->rcItem.left + 1 );
              DeleteObject( hBmp );
           }
regards, saludos

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

Postby Enrico Maria Giordano » Mon Jul 17, 2006 4:34 pm

Can you send me the new lib, please?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Checked items

Postby AlexSchaft » Thu Oct 18, 2007 9:00 am

Hi,

I've gotten menus.c to compile, and highlighted menu items are ok, but unhighlighted items still have the gray background?
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Thu Oct 18, 2007 9:25 am

Alex,

Are you still using DrawMasked() ? If yes, does your bitmap has the transparent color at pixel 0, 0 ?

Please post a screenshot of the bitmap and how it looks in the menu. Thanks
regards, saludos

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

Menu items

Postby AlexSchaft » Thu Oct 18, 2007 9:30 am

Hi,

This is the gray background of unselected menu items, as below

Image
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Thu Oct 18, 2007 10:49 am

Alex,

Are those menuitems "checked" ?
regards, saludos

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

Postby AlexSchaft » Thu Oct 18, 2007 10:51 am

Yes, they are :)
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Thu Oct 18, 2007 11:05 am

Alex,

Please make this change in your menus.c:
Code: Select all  Expand view
           if( lpdis->itemState & ODS_CHECKED )
           {
              HBITMAP hBmp = LoadBitmap( 0, MAKEINTRESOURCE( OBM_CHECK ) );

              DrawMasked( lpdis->hDC, hBmp, lpdis->rcItem.top + 1,
                          lpdis->rcItem.left + 1 );
              DeleteObject( hBmp );
           }
regards, saludos

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

Postby AlexSchaft » Thu Oct 18, 2007 11:59 am

Did that change from your earlier post.

Selected items are ok, unselected are not
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby Antonio Linares » Thu Oct 18, 2007 2:53 pm

Alex,

You are using white as the menu color, please select another menu color and check if that makes a difference, thanks
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 85 guests