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 BUTTONLIST list box in the customize dialoge.

At this time comes the problem, you could select the deleted button in
the BUTTONLIST, but you can never put it back to the button CURRENT
list box, no matter drag, double click. Use spy++ check the dialog box
sent TBN_QUERYINSERT to framewindows, and framewindow response with
result TRUE.

Don't know why it did not work.

Below is some related source:

CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
	// TODO: Add your specialized creation code here

//handle of menu toolbar customize
void CMainFrame::OnMenuTbcus() 
	// TODO: Add your command handler code here
	CToolBarCtrl& MyTBCTRL=m_wndMyToolBar.GetToolBarCtrl();

//msg map of WM_NOTIFY in MainFrameWnd

void CMainFrame::ON_TBCUSTI(NMHDR * pNotifyStruct, LRESULT * result)
 	//AfxMessageBox("In the OnTBCus",MB_OK,0);
	//return TRUE;
	* result= TRUE; 

void CMainFrame::ON_TBCUSTD(NMHDR * pNotifyStruct, LRESULT * result)
 	//AfxMessageBox("In the OnTBCus",MB_OK,0);
	//return TRUE;
	* result= TRUE; 

The enviroment is under VC6, NT4, cmmctrl32 version 5.81

syhsyhcn (1)
2/20/2004 7:40:33 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 14


Similar Artilces:

Recover deleted items crash O2K
One machine on the network gets blown out of Outlook when he access recover deleted items. It starts to list about 7 items then exists Outlook. He has a laptop doing the same thing so I assume the issue is on the fully patched Exchange Server 5.5? Any ideas? Dirk-Thomas ...

Custom File Properties
Can you help? I use a template that has custom properties linked to the cells. Is there anyway I can either extract those particular properties to list I don't what to data track the information using the template wizard just a straight forward list or this my only option? Julie Willi -- jujuwilli ----------------------------------------------------------------------- jujuwillis's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=212 View this thread: http://www.excelforum.com/showthread.php?threadid=39176 You'd need a macro to make the list. Sub ListC...

Missing Customer
Has anyone ever had customer's disappear on them. We've got 22 different stores and customers are set to global. Recently a couple of stores have complained that customers are disappearing from their Store Operations systems. Any advice is appreciated, -Bill On Fri, 3 Dec 2004 07:09:05 -0800, "Bill" <Bill@discussions.microsoft.com> wrote: >Has anyone ever had customer's disappear on them. We've got 22 different >stores and customers are set to global. Recently a couple of stores have >complained that customers are disappearing from their St...

resizing dialog frame "grabber"
Greetings.. In my apps, I am creating dialogs with the resizing border, and they all work fine. However, some of my users have trouble recognizing that the windows are resizable. I would to display that little "grabber" image that appears in the lower right corner of the frame that I see sometimes in other applications. The one that looks like little diagonal treads for grabbing and dragging the window to resize. Is that something that I can get for free by setting some undocumented dialog style? Thanks- Suz. Hallo stgagnon! > I would to display that little "grabbe...

Account Customization
We are looking to Customise the Account so that there are additional button on the Nav bar. Are there any examples of use of the template.css for This sort of customization ? The example in the SDK, is for the top level Nav bar, I want the tabs accros the top etc... Many Thanks Keith I am a bit confused... Using ISV.Config you can easily add "Left Nav Items" to the "Left Navigation Bar" of an Account. You can also add new menus to the "Menu Bar" as well as "buttons" to the "Tool Bar" (Just below the top menu bar). If you want to...

Customize Campaign activity
Hi, I would like customize the campaign activity form by replacing actualend and actualstart formats by "date and time" instead of "date only". This customization is not a problem but when I want to close the activity, the dialogbox ask only the dates. In the form, these fields are in read only. If we allow writing, when we change the date in the dialogbox, these values overwrite the values in the form. Anybody knows how to resolve this problem ? I think it is a bug. Thanks for your help. WTCSO ...

Hide button based on a cell value
Hello, I have been trying to write a macro that would hide a button based on a cell value (cell N20). Somehow, it doesn't work. If N20=1, the button should be visible. If not, then it should be hidden. The button is called Button 4388 and the sheet is called Results. This is what I have come up with so far but as I said it doesn't work (please don't laught, I'm a beginner!): Sub HideButton() Dim myButton As Button With ActiveSheet Set myButton = .Buttons("Button 4388") If Range("N20").Value = "1" Then ..Visible = True E...

Using crm:5555 rather than a custom hostheader
All I would just like to know what's the recommended solution for a CRM (v3) deployment:- use the standard crm:5555 or a custom hostheader e.g. crm.mycompany.net. Will the custom hostheader cause me any problems? Will external users be able to logon remotely using this host header? Many thanks, Nick. ...

Can I get Button name or Cell Reference
If I have a sheet with 20 buttons (1 on each row) and each button points to the same macro, is it possible for the macro to determine the Row number (Or possibly the Button Name)? Based on the row, the macro will continue updating data on that Row. -- Trefor This is a button from the Forms toolbar? Option Explicit Sub testme() Dim BTN As Button Set BTN = ActiveSheet.Buttons(Application.Caller) MsgBox Application.Caller & vbLf _ & BTN.Name & vbLf _ & BTN.TopLeftCell.Address(0, 0) & vbLf _ & BTN.Caption End Sub A...

If I create a CToolBarCtrl as follows: BOOL done = m_toolbar.CreateEx( TBSTYLE_EX_MIXEDBUTTONS, WS_CHILD | WS_VISIBLE | CCS_NODIVIDER | TBSTYLE_TOOLTIPS | TBSTYLE_LIST, CRect(0,0,0,0), this, IDC_TOOLBAR); // we only set NORESIZE after creation so it gets created at the right default height m_toolbar.SetStyle(m_toolbar.GetStyle() | (CCS_NORESIZE) & ~(CCS_TOP)); and then add the buttons with AddButtons(), one at a time, then the text of the buttons is always displayed to the right of the image, even though BTNS_SHOWTEXT was not set the any of the buttons' fsStyle fields...

iTechArt-Custom Software Development and Offshore outsourcing Company
iTechArt Group - Custom Software Development and Offshore outsourcing Company http://www.itechart.com/ Offshore custom software development company iTechArt - Web site and Content Management Solutions development, CMS consulting: Ektron, Drupal and DotNetNuke iTechArt Group provides high quality custom software development services and offshore software development. On December 2006, iTechArt Group became an authorized Microsoft Certified Partner. This means that our company has been recognized by Microsoft for our vast expertise and authorized to custom software development; provide IT ser...

Customize Activities Views
Is there any way of customizing the Activities view? Every other view seems to be customizable except activities. Thanks, Not in the current release of CRM ie 1.0 and 1.2. We are expecting to see the ability to customise Activity views in version 2.0. One way to get what you need is to create your own activity view in asp.net and using the CRM SDK. <anonymous@discussions.microsoft.com> wrote in message news:29b8701c46681$04162130$a601280a@phx.gbl... > Is there any way of customizing the Activities view? > Every other view seems to be customizable except > activities. >...

DoModal() Dialog box fails in eVC4 to VS2005 Migration
I have a Pocket PC 2003 MFC DLL that compiles and works perfectly under eVC++ 4.0. I imported the project into Visual Studio 2005. It compiles fine. The problem is that the dialog box that it is supposed to display does not display at all. After stepping through it I realize that the Dlg.DoModal() is returning -1. I am following the rules which is calling AFX_MANAGE_STATE(AfxGetStaticModuleState()); as the absolute first statement in the exported function. To be sure the exported function is as follows. CDRVCEDLGS_API int WINAPI CdrvLInitDialog( int &Subport,int &Baud,int &...

Print and Page Preview buttons not working
I'm currently experiencing a problem where when a Network Printer is set as the default on the computer that both the Print and Page Preview don't work, you can click on them but they do nothing. Things work fine when using a Local printer. This is happening on a Windows XP SP2 in a Managed Desktop environment and Office 2003. Any things I can try, to get this working? To help clarify things, what happens in this Access database when the person clicks the Page Preview or Print option from the File menu the dialogs don't appear, unless the default printer set to a local/vir...

Need to create inventory, customer in excel
Trying to get several files such as inventory, customer, vendor, etc. over to a MS Excel file. I need all data fields offered brought over. Dan There are 2 ways, 1. Open report giving you desired info. select coulmns (Show hide columns) you want, there is an option at the top to export it to any desired format. (try CSV.) 2. Go to administrator, use SQL query to give you all required fields. Go to File > Export to export it to CSV format. Sagar "Dan'O" wrote: > Trying to get several files such as inventory, customer, vendor, etc. over to > a MS Excel file. I ne...

Importing Customers into a new HQ Database
I have a site (1 store) that I'm implementing HQ into. I get HQ to create a new database for the store and when I Import Store Operations data it doesn't import the global customers or local from the original store database. ...

Permanently deleted
how can i ensure that all email older than my backup strategy is completely unrecoverable. I don't it to be recoverable by any means. is as simple as formating the backup tape or does something need to be done to the hard drive or information Store? Set deleted item retention appropriately. In Storage Group properties | General - "Zero out deleted database pages" - server takes some performance hit to do this. Can use Mailbox Manager settings in Recipient Policies to delete users' Deleted Items based on your requirements. -- Bharat Suneja MCSE, MCT www.zenprise.com blo...

CToolBarCtrl bitmap not being displayed
Hi All, First, let me say I am a 'newbie' to MFC, therefor I ask for your indulgence... I am attempting to display a toolbar in an SDI app, using a CToolBarCtrl class. In the CMainWnd class, I declare a protected CToolBarCtrl* m_ToolBar variable, and pass the ON_WM_CREATE message to the 'OnCreate' message handler. afx_msg int CMainWin::OnCreate(LPCREATESTRUCT cs) { BOOL rtn = FALSE; TBBUTTON buttons[2]; m_ToolBar = new CToolBarCtrl; if ( ! m_ToolBar->Create(WS_CHILD | WS_VISIBLE | WS_BORDER | CCS_TOP, rectDefault, this, IDR...

Broken "To:" button in Outlook 2002
My mom just got a new laptop with Office XP. I just transferred everything off her desktop with Office 2000. I copied her.pst file into the appropriate folder on her laptop and all of her data stayed in tact. However, when she opens a new mail message and clicks "To:" she gets an error message that says "Address Book Cannot be displayed, the file may have been moved or deleted or you do not haver permission to access this file." When she clicks Contacts, everything works fine. It's like Outlook doesn't know that clicking "To:" should open the...

Electronic Copy of Report or Create Custom View of To Do list
Hi, Is there a way to generate electronic copy of To-Do list to hand out to users via email? What I am currently doing it to generate the report than save it as .pdf file format to send it via electronically. Or can a to-do list be generated in a view? I turned on filtering & tried to sort tasks by resource name but this doesn't quite provide the view want because some of the tasks have 2+ resources assigned. I just want each resource to be able to see their own planned work hour & start/finish date for each task. Thanks for your time!!! Lilly :) This is a ...

VBA code for a custom button on Customer Maintenance screen
Hello: I have a custom button created on the Customer Maintenance screen using Modifier and VBA. Below is my VBA code to open an Internet Explorer screen and display a page based on the Customer ID showing: Private Sub Documents_Changed() 'open customer folder on Intranet Dim iepath As String Dim txtPath As String Dim txtCustomerID As String txtCustomerID = RTrim(Me.CustomerID.Value) iepath = "C:\Program Files\Internet Explorer\iexplore.exe" txtPath = "http://intranet/accounting/Shared%20Documents/Forms/ AllItems.aspx?RootFolder=%2faccountin...

Minimize/Maximize, Restore Window buttons do not work
Buttons do appear in title bar of Excel program and in the individual worksheet, but clicking on any of them does not work. ...

Outlook Contacts always suggests "Custom Form Cannot Be Opened"
Dear All, I have ascertained by searching "Message Class Field" that all contacts in the search come up as found. Therefore I think somehow I have put in place a Custom Form and would like Outlook to go back to using the default / standard form. Thank you for any further Help. Yours sincerely, -- Neil@UK Get http://www.publicshareware.com/download/DocMessageClass.zip and use it to change the message class back to the default. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.sli...

Hiding/Enabling Custom Menu Options
I have created a custom menu, and am having difficulty hiding and/or enabling or disabling options. I am able to disable at the primary menu level, but not a sub-level. For example: The following works to gray-out the menu option Purchasing, from the base menu: Application.CommandBars("menuwms1").Controls("purchasing").Enabled = False However, this next line doesn't work to turn off only the Purchase Order option, below the Purchasing menu: Application.CommandBars("menuwms1").Controls("purchasing").Controls("purchase orde...

deleting all customers
Is there a query I can run to delete all customers in the databas? Thanks Scott have you tried this: delete from customer "Scott Santorio" wrote: > Is there a query I can run to delete all customers in the databas? > > Thanks > > Scott ...