Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change Gripper of Resizeable Dialog

Posted on 2008-10-14
2
Medium Priority
?
529 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 2000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

670 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