Click here to Skip to main content
11,928,078 members (51,058 online)
Rate this:
Please Sign up or sign in to vote.
See more: VC6 VC7 VC7.1 VC8.0 C++ , +
Hi All,
Every mfc application created with two default icons,
1)MFC icon :- for main window.
2)Doc icon :- for child window.

I replaced main window icon with help of givn article,
Replacing the Default MFC Icon[^]

But problem arised when i deal with child frame icon.
I can replace child window icon with help of SetIcon() a mfc function.
but i want remove the icon from child window and not replace.
i tried,
In ::OnCreate of Child frame but its not working.instead of removing icon it displays a blank icon.

I also tried to remove ..


but removes maximize , minimize and close button also.
Please help me ,
to remove the child frame icon from title of child frame.
little hint of you guys worth me lot.

Santosh dhanawade.
Posted 21-Aug-12 23:41pm
Edited 22-Aug-12 0:08am
Jochen Arndt 22-Aug-12 6:08am
There is no simple solution for your problem. The display of the close button is tied to the system menu style. There are window styles that allow creation of windows without the system menu icon (WS_EX_DLGMODALFRAME, WS_EX_TOOLWINDOW). But these styles are not for frame windows.
Coder Block 22-Aug-12 6:21am
Thanks for reply first of all.
but it also hide maximize and minimize Button??
Jochen Arndt 22-Aug-12 7:10am
Hint: Use the Reply button right of a comment. Then the author of the comment gets a mail notification upon replying.

Yes, because they are also system menu commands. The corresponding style flags are provided to disable these buttons with system menus.

You should think about the idea to remove the icon while supporting the system menu commands:
- The icon is the mouse button to open the system menu
- It indicates that there is a system menu that can be also activated with Alt+
- It is helpful when identifying minimized windows (especially when using user defined icons)

It is a general Windows GUI element. Removing such elements or changing the behaviour should be always avoided.
Coder Block 23-Aug-12 1:50am
its complecated !!need alternative??

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Then you must override the drawing of the non-client area yourself, and perhaps even handle the mous clicking and window dragging as well. That area above the client area where the title bar is drawn is called the non-client area, and some legacy articles here or on CodeGuru might explain how to do that drawing. Yes, it IS complicated. Like Jochen said, you should seriously consider why you want or need to do this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 20 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100