Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How remove System Menu & Icon without removing Close button in Dialog

2,088 views
Skip to first unread message

Simon

unread,
Mar 27, 2009, 8:36:06 AM3/27/09
to
Hi - I use the VC6 and the MFC. In various dialogs, I would like to get rid
of the System Menu in the Title bar, but retain the Close button. If I
check "System Menu" in the resource editor "properties" for the dialog I get
both. If I untick it, I get neither. And yet I see many other apps which
have a Close button but no System menu in their dialogs, so it must be
possible. Anyone know how I can do this?

Thanks in advance

Simon


Tom Serface

unread,
Mar 27, 2009, 10:11:50 AM3/27/09
to
Have you tried the "Tool Window" look (just a checkbox in the properties).
You might like that for these kinds of dialogs.

Tom

"Simon" <Sim...@newsgroup.nospam> wrote in message
news:deydnV5QA7ykVVHU...@pipex.net...

Rong-Chun Zhang [MSFT]

unread,
Mar 30, 2009, 5:27:38 AM3/30/09
to
Hello Simon,

Thanks Tom for your sharing. Microsoft no longer supports Visual C++ 6.0
in any form since 2005:
http://support.microsoft.com/lifecycle/?LN=en-us&p1=3003&x=12&y=13

However, I am still glad to share some information with you. Apart from
Tom's solution(setting window style), we can also try the following way.

To remove the Icon of a window, we can call SetIcon function with NULL as
its argument.

SetIcon(NULL,TRUE);

To remove System menus, we can call GetSystemMenu to get all menu items,
and then remove the ones that we don't need.

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
pSysMenu->RemoveMenu(0,MF_BYPOSITION);
}

More information, please check:
http://msdn.microsoft.com/en-us/library/9cb3b7b5(VS.80).aspx
http://msdn.microsoft.com/en-us/library/dew95fy5(VS.80).aspx

Best regards,
Rongchun Zhang (v-rz...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

0 new messages