Solved

Change Gripper of Resizeable Dialog

Posted on 2008-10-14
2
477 Views
Last Modified: 2013-11-20
Hello,

is it possible to change the icon or bitmap of a mfc resizeable dialog? If this is not possible, is there a way to make a dialog resizable without the gripper, like with a own image /Icon/Button?

Thanks,

Ocrana
0
Comment
Question by:Ocrana
  • 2
2 Comments
 
LVL 5

Expert Comment

by:isprabu
Comment Utility
Ocrana,
I am trying to understand your need. I think your primary objective is to change the icon of the dialog box in MFC. If this is true, it can be done.
Usually the icon files are available under ../res folder. You can change the icon for a dialog
1) either by editing the icon file
2) modifying the icon entry in the rc file (see below) - to point to your icon instead of the default.
You may have to recompile your rc file for the changes to take effect.

Hope this helps!
// Icon with lowest ID value placed first to ensure application icon

// remains consistent on all systems.

IDR_MAINFRAME           ICON    DISCARDABLE     "res\\TestApp.ico"

IDI_ICON1               ICON    DISCARDABLE     "res\\icon1.ico"

Open in new window

0
 
LVL 5

Accepted Solution

by:
isprabu earned 500 total points
Comment Utility
In case, if your objective is to change/redraw the gripper, it can be done too. You can subclass the CControlBar class in your code and override its methods according to your needs. Mainly you have to override the DrawGripper method and the DoPaint method. You may also have to handle the OnNcPaint message.

Once this is done, in your application, use your derived class member variable.

You can also refer to this link:
http://kbalertz.com/843490/gripper-drawn-incorrectly-application-Windows-Visual-Styles.aspx

Hope this helps!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now