Checked menuitem
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
Checked menuitem
Hi,
Why do menu items with checks appear with the check in a border?
Also, is there a way to "bullet" a menu item, like the view menu in windows explorer?
Alex
Why do menu items with checks appear with the check in a border?
Also, is there a way to "bullet" a menu item, like the view menu in windows explorer?
Alex
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Alex,
Please comment out this line in source\winapi\menus.c line 295:
We have to implement the bullet option.
Please comment out this line in source\winapi\menus.c line 295:
Code: Select all
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!
}
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
Compiling
Hi,
What #defines do I need to compile this? Compiling fails using Xhb
Tried WIN32
Alex
What #defines do I need to compile this? Compiling fails using Xhb
Tried WIN32
Alex
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Enrico,
Please try this:
Please try this:
Code: Select all
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 );
}
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
Checked items
Hi,
I've gotten menus.c to compile, and highlighted menu items are ok, but unhighlighted items still have the gray background?
I've gotten menus.c to compile, and highlighted menu items are ok, but unhighlighted items still have the gray background?
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
Menu items
Hi,
This is the gray background of unselected menu items, as below
This is the gray background of unselected menu items, as below
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Alex,
Please make this change in your menus.c:
Please make this change in your menus.c:
Code: Select all
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 );
}
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: