| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: MS_CONDITIONALCASCADE in menus |
Hallo Phil,
PC> How do I create a MS_CONDITIONALCASCADE menuitem?
PC> Can I add MS_CONDITIONALCASCADE to the .rc file, or do I have to call
PC> some API?
you have to use API calls. Try this:
VOID
setCascadeDefault( HWND hwndMenu, USHORT usSubmenu, USHORT usDefault )
//-------------------------------------------------------------------------
// This function sets the default menuitem for the specified cascade menu.
//
// Input: hwndMenu - specifies the menu window handle.
// usSubmenu - specifies the id of the cascade menu.
// usDefault - specifies the id of the default menuitem.
//-------------------------------------------------------------------------
{
MENUITEM miItem;
ULONG ulStyle;
WinSendMsg(chwndMenu, MM_QUERYITEM,
MPFROM2SHORT(usSubmenu,TRUE), MPFROMP(&miItem) );
ulStyle = WinQueryWindowULong(miItem.hwndSubMenu,QWL_STYLE);
ulStyle |= MS_CONDITIONALCASCADE;
WinSetWindowULong(miItem.hwndSubMenu,QWL_STYLE,ulStyle);
WinSendMsg( miItem.hwndSubMenu, MM_SETDEFAULTITEMID,
MPFROM2SHORT(usDefault,FALSE), 0L );
WinSendMsg( miItem.hwndSubMenu, MM_SETITEMATTR,
MPFROM2SHORT(usDefault,TRUE),
MPFROM2SHORT(MIA_CHECKED,(TRUE?MIA_CHECKED:0)) );
}
ciao
Richard
--- ISDN Watcher/2 v1.1 Ready for Merlin - ISDNW110.ZIP from 2:2433/601.0
* Origin: Rick's Cafe at (2:2433/601.11)SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1 @PATH: 2433/600 1200 225 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.