BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Professional Edition
 Toolbars some buttons with Image and Text
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

JMSA

4 Posts

Posted - 05/04/2021 :  11:24:56 AM  Show Profile  Reply with Quote

I wanted to know how it is possible to add the text in any of the buttons of the toolbars by default without the user having to do all the configuration.

My program has several toolbars with their respective buttons (default_toolbar.jpg) and what I want to achieve is that when I start the program for the first time, some buttons have the text on their right (needed_toolbar.jpg).

Currently the user can configure it manually with the customization options (user_customization.jpg and button_apperance_option.jpg) but I want the program to come by default in this way.

I have implemented the following functions to create the toolbars and position them.

How can I do it?

----------- x ----------

CreateBars Function:

if (!wndBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC, CRect(2,2,2,2), AFX_IDW_TOOLBAR))
{
return FALSE;
}

HMODULE hmod = AfxFindResourceHandle (MAKEINTRESOURCE (IDR_MAINFRAME), RT_TOOLBAR);
if (hmod == NULL)
{
return FALSE;
}

HMODULE hmodPrv = AfxGetResourceHandle ();
AfxSetResourceHandle (hmod);
wndBar.LoadToolBar (IDR_MAINFRAME)
AfxSetResourceHandle (hmodPrv);

wndBar.SetWindowText ( AfxLoadString (IDS_TB_STANDARD));
wndBar.EnableDocking (CBRS_ALIGN_ANY);

----------- x ----------

initDockingBars Function:

DockControlBar (&m_tbMain, AFX_IDW_DOCKBAR_TOP);

----------- x ----------





Support

4035 Posts

Posted - 05/04/2021 :  1:11:55 PM  Show Profile  Visit Support's Homepage  Reply with Quote
Hello,

First, we suggest to take a look at our BCGPOutlookDemo example where "New" and "Send/Receive" buttons initially have the text.

If you still have the problem, please open a new support ticket (http://support.bcgsoft.com/) and attach your sample where we can see the problem.

Best regards,

BCGSoft Technical Support
Go to Top of Page

JMSA

4 Posts

Posted - 05/05/2021 :  09:52:01 AM  Show Profile  Reply with Quote
Thank you, works fine.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2021 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000