If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

[RESOLVED] CMFCToolBar issue: Can't change title?

Visual Studio 2013. C++.

Created a blank, SDI MFC app.

I added a new CMFCToolBar (by hand, didn't use a wizard)

It docks OK. The commands work OK. It renders OK. No problems there.

In the code, attempting to set the window text of this toolbar has no effect. The title bar text is always "Standard". I triple triple triple checked to make sure I don't have any resource ID conflicts. In a small app as this, it was pretty easy to verify this.

The toolbar also does not show in the menu illustrated in the screenshot. (The bottom, undocked toolbar should be titled "My Page Bar" and I think it should show up in the popup menu.)

I know I'm probably missing a simple step somewhere, but I haven't seen it. It looks like its getting mixed up with the Standard Toolbar resource ID somewhere but I could see nothing in the .rc or resource.h files. A search yielded a few results with similar problems, but I've had no luck finding out what I'm missing.

Re: CMFCToolBar issue: Can't change title?

I already saw it.
Therefore I wrote you in the post#4:Try to set some unique ID for m_wndPageBar!
Well, the "unique" in this context should mean IDR_PAGEBAR.
See MSDN article CToolbat::CreateEx and the last parameter of this method.