Solved

Change Gripper of Resizeable Dialog

Posted on 2008-10-14
2
505 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
ID: 22729437
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
ID: 22729534
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Line meaning 9 87
Where are the c++ header files to use in Eclipse? 4 24
Finding Divisors 5 19
learn programming 8 42
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

838 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