using TBSTYLE_DROPDOWN buttons in cDialogBar?

I want a toolbar with comboboxes and drop-down menus.  I
originally implemented using CToolBar and the hacks necessary
to add combobox controls to a CToolBar, but it was becoming too
kludgy.  So I'm trying to reeimplement using CDialogBar, and now
I am finding it difficult to replicate the behavior of the toolbar
buttons with CDialogBar.

Is there a way to get buttons in a CDialogBar to act like buttons
in CToolBar, supporting TBSTYLE_DROPDOWN styles?  

(ie, the button has a down-arrow drawn next to it, and 
clicking on it will trigger a ON_NOTIFY(TBN_DROPDOWN message ?


Any help would be most appreciated.  I thought this might 
work, but it doesn't seem to:


CButton* pButton1 = (CButton*) wndViewBar.GetDlgItem(IDC_BUTTON1);
DWORD dwStyle = pButton1->GetButtonStyle();
dwStyle |= TBSTYLE_DROPDOWN;
pButton1->SetButtonStyle(dwStyle);


-- 

Jeff Thompson  "Float on a river, forever and ever, Emily"
        Email  "underscore j t at cox dot net"
0
jt7250 (2)
2/11/2004 1:05:15 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
346 Views

Similar Articles

[PageSpeed] 25

Hello

http://www.codeproject.com/docking/toolbarwithcombo.as

With Regards
R.Selva

0
2/11/2004 5:16:05 AM
"R Selvam" <selvamselvam@hotmail.com> wrote in message news:<735A21EE-8789-4B37-92D0-D8A99AEBE0D5@microsoft.com>...
> Hello,
> 
> 
> http://www.codeproject.com/docking/toolbarwithcombo.asp
> 
> 
> With Regards,
> R.Selvam

Thank you.  I do know how to add combo boxes to ctoolbars.  

What I was hoping to find out is if there is a way to 
assign ctoolbar-esque behavior to buttons in cdialogbar.  eg 
buttons that draw themselves with dropdown arrows, and that, 
when clicked, will trigger ON_NOTIFY(TBN_DROPDOWN events in 
a way that is reasonably similar to the way that such things 
are done with ctoolbar.

-- 

Jeff Thompson "Float on a river, forever and ever, Emily"
       Email@ "underscore j t at cox dot net"
0
jt7250 (2)
2/11/2004 3:21:24 PM
Reply:

Similar Artilces:

How export all mailbox-enabled users from the GAL using Outlook?
Hello, We have a user which, for administrative reasons, needs to export all mailbox-enabled users in the GAL now and then. They just need all the names. Is there a straightforward way for them to do that? We don't want to give them any special permissions and want to avoid server scripting. Ideally, they should be able to export it to a CSV file or any text file. Thanks, - Alan. Alan wrote: > We have a user which, for administrative reasons, needs to export all > mailbox-enabled users in the GAL now and then. They just need all the > names. Is there a straightforward way fo...

Bitmaps on Buttons #2
Hi. I am displaying a bitmap on a button. In the bit map editor, the uncolored bits around the edges of the "picture" are white. When I perform: m_stopBitmap.LoadBitmap (IDB_BITMAP_STOP); c_buttonStop.SetBitmap (m_stopBitmap); The bitmap is displayed but the white bits show up. I would like them to be transparent. Is there a way to do this with CBitmap and CButton members or do I have to use BitBlt() somewhere like OnPaint() or OnCtrlColor() ? I've tried to use LoadMappedBitMap() and played with parameters but I can't seem to get the behavior that I need. Thanks alo...

e-mail send button not working
I have noticed in the past week that the send button on messages to contact in Outlook does not send the message. When I go to close the message it asks to 'save'. I click yes. it is 'saved' but the message is not sent. when I go to the Drafts folder the message is there. I open it and try to send and it doesn't send the message. any thoughts on what I could have changed to give me this problem? Gordon in Alaska ...

iPhone inbox (using Gmail) and Entourage
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop Before I upgraded to Entourage 2008, I was using 2004 with (10.4) on an older iMac. I have an iPhone and use it for email. Previously, my email would come to my iPhone and when I opened Entourage, the emails on my iPhone would disappear. I've upgraded to Snow Leopard and Entourage 2008. Now, my emails don't disappear after I've opened Entourage on my iPhone. I have to manually delete them. I checked the settings and they're all the same. Can anyone help me figure out how...

Can I use an industry standard XSD and ADO.NET / SQLServer to output a conforming XML file
We have tentatively agreed with a supplier to exchange order information. The plan is to use an 'industry standard' order schema definition from say www.xcbl.org. Is there are simple way to use ADO.NET in this scenario. Ideally (naively) I would like to do something along these lines : 1. Create a SQLServer stored proc that returns a dataset (or similar) containing the order details such as : select PurchaseOrderID,ProductID,Qty from PurchaseOrder join PurchaseOrderItem...... 2. In a COM+ object (not entirely relevant to the problem, but this is how it will work), I would expe...

Strange error when using offline sync
A couple of users are getting the message below when bringing their laptop and logging on to the domain. First of all, does the message below mean that only items on "Deleted" items failed to sync, or the whole thing fail to sync ? I've seen article that may associate this problem to the server Symantec AV but I already stopped/started Symantec services and problem below still persists. How can I solve this ? Is this a back end related problem ? 16:12:16 Synchronizing Mailbox 'My user' 16:12:16 Synchronizing Hierarchy 16:12:17 Synchronizing Favorites 16:12:17 Synchro...

How do I send out a survey using excel?
Is it possible to build and send out a survey to a specific user group in an Office application? Most likely yes, but need more information in order to assist you "Mas" <Mas@discussions.microsoft.com> wrote in message news:0742EDFE-2A2E-46B7-967F-FC4DEF577F3D@microsoft.com... : Is it possible to build and send out a survey to a specific user group in an : Office application? ...

Using MBCS in a UNICODE defined project
Hi, my project has the UNICODE and _UNICODE macros defined. I want to display a lot of chinese text, and this is working well for me. However, within the code, I make a call to a function: TestFunction(char * input); I need to supply it with MBCS format. So I use a T2A().... TestFunction(T2A(input)); and all is good (assuming the string is english alphabet chars). However.. that "input" string is read from a text file. If the input string is something like this.. "abcdefgXXXhigjklmop" - where "XXX" denotes some chinese MBCS chars If i read that string my proje...

VAT report should be to print without using system password
Currently when print VAT report (used for UK), tools-routines-company-vat return, need to enter system password and then can print report. Should be able to print VAT report without entering system password. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.m...

Use arrows to navigate
I just got Excel 2003, and had a strange problem. The arrow keys no longer move the selection box; they scroll through the worksheet. Anybody know how to change this setting? I have looked in the help file, but could not figure it out. Matthew Any chance you hit the scroll lock on the keyboard? Just hit it again to toggle it off. Matthew wrote: > > I just got Excel 2003, and had a strange problem. > > The arrow keys no longer move the selection box; they scroll through the > worksheet. > > Anybody know how to change this setting? I have looked in the help fi...

Excel2000: Is there a way to use name as parameter for ODBC query from Excel table
Hi I have an Excel workbook where dates, started from 01.01.2003 and up to some year in future (2011 at moment), along with some other information (i.e. workday/weekend/holiday, working hours etc.), are listed. This table is read into another workbook, using ODBC query. But the problem is, that I don't need all those future dates. I can't use any functions exept MIN, MAX, SUM and COUNT in query from Excel files, but is there a way to pass a name as parameter. P.e. I define a name: CurrDat=TODAY() and use it in query's WHERE condition, like .... WHERE MyTable.Datefield Is Not Null...

Adding a "CLEAR" button to the worksheet
On my worksheet I would like to add a"CLEAR" button that would delete the contents of multiple cells. Go to View/Toolbars/Control Toolbox/Click on the command button icon and place on the sheet. Right click the button and place this code into it (Change the cell reference to the cells you want to affect). Then change the range to suit. Code: -------------------- Sheets("sheet1").Activate Range("a2,d2,f2,h2").Select Selection.ClearContents -------------------- Come out of design view and test. Make sure to test this on a copy. Larry -- kei...

Settings Button (administrator features) Missing in Web Brower Cli
The Settings option in the web Browser client is missing on one machine but not on others. I deleted the cookies and restarted the browser and the Setting Button appears. Does anyone have a suggestion for how to correct the problem without deleting all cookies? Mark Nabors Hi Mark, I have noticed this too. It is very frustrating. I have read a post that says that this is a conflict between the web client and the outlook client. I think that the outlook client creates the cookie so that settings does not appear in the web client and not the outlook client. Supposedly this woul...

Trying to do Business Cards Using Publisher
I apologize for this, but my previous thread I think maybe was looked at as being closed so I wasn't getting any responses. Please excuse me for being a little impatient here, but I would just love to get some good advice here on how to solve my ongoing problem. So I just started a new thread, but it really is a continuation of my previous one under basically the same heading. It looks like I have a problem here. After I applied my 2 by 3.5 business card graphic to the blank business card template in Publisher by applying it to the Master page, it looked great online and when I p...

print button #4
I have a spresdsheet of 5 pages. I only want to print certai highlighted columns,(always the same ones). can i put a button with macro to print them off when i want them without highkighting them al every time??? -- Cavema ----------------------------------------------------------------------- Caveman's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2754 View this thread: http://www.excelforum.com/showthread.php?threadid=48616 Good morning caveman You can do this yourself, and learn about macros to boot. Tools > Macros > Record new macro Then hide th...

Control Button to Create a New Record in Another Form
I've developed a MS Access application for Trade Shows. One of my tables contains all basic client info. This table is used as the data source for both a complete client form and a partial data form. Both forms can show all clients (individually). Using the partial data form I want to create a button that copies the current record and creates a new record in a form titled Trade Show Attendees. Other data in the Trade Show Attendees must be entered to complete that attendee's record. Some of the data entered will populate the TradeShow Attendees table. Can anyone describe t...

password for command button?
Is there a way to code a command button in its on click event that will prompt the user to enter a password to perform the command button's operation? Thank you. -Debbie On Jan 4, 11:34 am, Debbie S. <Debb...@discussions.microsoft.com> wrote: > Is there a way to code a command button in its on click event that will > prompt the user to enter a password to perform the command button's > operation? > > Thank you. > > -Debbie Yes, but you'll need to delve into VBA. Attach a click event to the button and in the code: Public Function Button1_Click() ...

the right button of mouse cant do nothing
Please anybody can tellme why when I point on any cell of any exce file, and try to do one click with my right button on my mouse, don showme the options ? because my right button dont do nothing, and if I want to format an specific cell, I need to go to "Format" and then the options on th menu bar... In the past this option its working very well, but today its gone !! can any body tellme what its happening ? ( my mouse its working good i other programs or on windows ) thanks :rolleyes -- rapidito7884 ----------------------------------------------------------------------- rapidi...

Letter Writing assitant to be used with Prospects
Would like to see Letter Writing Assitant to be extended to be used with Prospects. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=73b8a531-e5c3-4d8b-91ae-5b1758b9f1a5&...

Release Version.. using memory big.. because CString in class
Release Version Only Problem.. this simple.. class include member variable CString, make many object and free. but programe using memory size is big and big..(only release version, debug version is correct) ========exam code============== #include <afxtempl.h> class CObj:public CObject { public: __int64 a,b,c,d,e,f,g,h; CString sa,sb,sc,sd,se; }; void TestFunc() { CTypedPtrArray<CPtrArray,CObj*> m_array; CObj *p; for (int i=0;i<120000;i++) { p=new CObj; p->sa="123"; m_array.Add(p); } for (i=0;i<m_array.GetSize();i++) delete m_array[m_array....

CToolBarCtrl.Customize() dialog could delete button but not insert
CToolBarCtrl.Customize() dialog could delete button but not insert A CToolBar is created during FrameWindow::OnCreate(), In response to a Menu of Customize tool bar, Add handle to this Menu by GetToolBarCtrl plus ToolBarCtrl.Customize(). As you know if the Framewindow does not response to the WM_NOTIFY of TBN_QUERYINSERT message with result of TRUE, the Tool bar customize dialog screen will gone with a flash. So add two handle in Framewindow of TBN_QUERYINSERT and TBN_QUERYDELETE, now the tool bar customize dialog display correctly. You can delete the button, buttons deleted display in the B...

excel chart size using inside positioning
Hi, I am trying to standardize the sizes of multiple embedded charts so I can copy the charts into Powerpoint. I can set the PlotArea ..Left,.Height,.Width,.Top numbers, but the left inside gridline of the chart still shifts a little inside the PlotArea, which I assume is related to the read only InsideHeight,InsideWidth, InsideLeft, InsideTop numbers. If you want to set the constant dimensions of the inside area, does anyone know a way to iterate through each chart to make these adjustments? Anyone responding to this may first want to check if there are any responses to the multi-pos...

The "Skip This Occurrence" Button
Hello everyone. Just asking for a little help. During the month of September, I entered a monthly deposit into the "scheduled bills and deposit" section of Microsoft Money 2003 scheduled for October 1, 2003. But, then, I decided to exclude that deposit for the month of October and include it in November. So, I used the "Skip This Occurrence" button. Much to my surprise, the deposit I excluded for October still showed up on the income section of the "review your current budget status" menu for the month of October. In addition, I noticed that if I kep...

Close Excel Completely Using VBA #2
Damn.......It does ask me if I want to save the changes. Can this be stopped by adding another code after the Application.Quit Hpoe you can help! Celtic_Avenge -- Celtic_Avenge ----------------------------------------------------------------------- Celtic_Avenger's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1410 View this thread: http://www.excelforum.com/showthread.php?threadid=27391 Hmm, it is working for me. Make sure you make a call to Save right before this call. Also make sure you save any other workbooks that might be open. Also make sure if ...

Two seperate identities
Does Outlook have "From" field similar to Outlook Express when sending mail? I want a default email address but be able to choose second address EdwardH >Does Outlook have "From" field similar to Outlook Express when sending mail? >I want a default email address but be able to choose second address What version of Outlook? The menus are different for different versions. I do what you describe all the time. -- Brian Tillman Smiths Aerospace 3290 Patterson Ave. SE, MS 1B3 Grand Rapids, MI 49512-1991 Brian.Tillman is the name, smiths-aerospace.com is the domain. ...