Menu issue

Started by Douglas McDonald, February 25, 2010, 02:22:16 PM

Previous topic - Next topic

Rolf Brandt

OMG = Oh my Guinness?
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Douglas McDonald

Rolf, I don't get the meaning of your last post
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

Marc van Cauwenberghe


Rolf Brandt

Douglas, it was just a remark to Paul's abbreviation: OMG.
The Irish Guinness Brewery used to have a lot of funny cartoons out as commercials where the replaced 'Oh my goodness' with 'Oh my Guinness'.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Douglas McDonald

Thanks Rolf, I should have known. Stout is the best and about now I could use a good pub. I guess I had a dimwitted moment there, humm...... coming more often as I get older

Thank you, your a good soul

Doug
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

Paul Squires

Quote from: Douglas McDonald on February 25, 2010, 02:22:16 PM
I have a menu item that is "grayed", if I go back to the menu editor the grayed check box is un uhecked but its still grayed.

This was a bonehead ommission on my part. For top level items in the menu, I have now corrected the problem where the "graying" would not be correctly displayed while in the menu Editor.

Fix will be in the next update.
Paul Squires
PlanetSquires Software

Paul Squires

With regard to setting the state via code, you should update the current FF_Menu_SetState and FF_Menu_SetText functions in the Functions Library (these updated functions will bein the v1.08 update as well).


Function FF_Menu_SetState( ByVal hWndForm As Dword, _
                           ByVal hMenu  As Dword, _
                           ByVal idItem As Long, _
                           ByVal nState As Long _
                           ) As Long

   Local mType As MenuItemInfo
   
   mType.cbSize = SizeOf(mType)
   mType.fMask  = %MIIM_STATE
   mType.fState = nState   
   
   '%MFS_ENABLED, %MFS_GRAYED, %MFS_DISABLED, %MFS_CHECKED, %MFS_UNCHECKED
   '%MFS_DEFAULT, %MFS_HILITE, %MFS_UNHILITE

   ' Function returns 0 on fail.
   Function = SetMenuItemInfo( hMenu, idItem, %FALSE, mType )
   DrawMenuBar hWndForm

End Function



Function FF_Menu_SetText( ByVal hWndForm As Dword, _
                          ByVal hMenu  As Dword, _
                          ByVal idItem As Long, _
                          ByVal sText  As String _
                          ) As Long

   Local mType As MenuItemInfo
   
   mType.cbSize     = SizeOf(mType)
   mType.fMask      = %MIIM_STRING
   mType.dwTypeData = StrPtr(sText)
   mType.cch        = Len(sText)
   
   SetMenuItemInfo hMenu, idItem, %FALSE, mType
   DrawMenuBar hWndForm

End Function

Paul Squires
PlanetSquires Software

Douglas McDonald

Thank you Paul it works as expected.

Doug
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?