Solved

Change Gripper of Resizeable Dialog

Posted on 2008-10-14
2
516 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

738 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