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

x
?
Solved

How to draw dropdown button in CFormview?

Posted on 2008-10-31
4
Medium Priority
?
455 Views
Last Modified: 2013-11-20
Hi,
How to draw dropdown button in CFormview?
0
Comment
Question by:srikadi
[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
4 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 750 total points
ID: 22855716
Please see:
    A Basic Chooser-Style DropDown ToolBar Button
    http://www.codeproject.com/KB/menus/ToolBarDropdown.aspx
and
   Using Drop-Down Buttons in a Toolbar Control  
   http://msdn.microsoft.com/en-us/library/1ke6s1fc(VS.80).aspx
0
 
LVL 39

Assisted Solution

by:itsmeandnobodyelse
itsmeandnobodyelse earned 750 total points
ID: 22855991
>>>> How to draw dropdown button in CFormview?
The style TBSTYLE_EX_DRAWDDARROWS was needed for that. It was available with MFC 5.80 that came with VC7 (2002/2003).

So for VC6 (released 1998) you can't use these button styles but could try to make it your self.

You could

- create a bitmap button (or an owner-draw button)
- add a handler which opens a menu placed below the button (same as would open a menu on right-clicking in a list)

Of course it would take some time to get a suitable quality and behavior for your self-made control but it may be worth the efforts ;-)

 
0
 

Author Comment

by:srikadi
ID: 22892458
Hi,
could you tell me how to create owner draw button?..what are the steps i need to do..
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 22892923
You need to choose the owner draw style for the button in the resource editor. Then you have to provide a member of the button (use the wizard). Derive a new class from CButton and change the type of the dialog member button to the new class type. The DoDataExchange then will make the subclassing for the button. Finally override the CButton::DrawItem (you must override it) which will be called whenever the button must be drawn.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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 …
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

730 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