Click here to Skip to main content
15,886,199 members

Comments by BarryPearlman (Top 9 by date)

BarryPearlman 3-Feb-14 20:42pm View    
The main reason is that I don't want to learn yet another language. MFC, albeit it old fashioned, works for my needs. Besides, XML looks like a lot of typing to me. Give me C++ and pointers. I feel that Microsoft keeps coming up with new languages that do the same thing as the ones they are replacing because it lets them get developers to fork out another $500 plus for the "latest and the greatest".

Barry
BarryPearlman 16-Aug-12 14:48pm View    
Eugen -

The line of code marked "very important" solved the problem of displaying text in Pane 3; I believe that I understand the concept.

I did run into a couple of problems however. The first concerns the code paragraphs:

// free strings before freeing array of elements
for (int i = 0; i < m_nCount; i++)
{
VERIFY(SetPaneText(i, NULL, FALSE));
SetPaneIcon(i, NULL, FALSE);
}

// first allocate array for panes and copy initial data
if (!AllocElements(nCount, sizeof(CMFCStatusBarPaneInfo)))
return FALSE;

When the status bar is first created, there are no strings to cancel and the solution bombs out when it hits the "VERIFY" macro; it is looking to free a string that hasn't been created yet. Reversing the two blocks of code solves that problem.

The second problem concerns:

virtual CWnd* GetMessageBar() { return NULL; } // no tracing of menu/toolbar commands in the first pane

It appears that when you mark the application for context sensitive help, it automatically wants to display AFX_IDS_IDLEMESSAGE (supplied in string table) when the application enters the idle loop.

I let the wizard allow context sensitive help; I wish I had known then and I would have not done it. I need to find out how I can undo that.

Thanks for all of your help,

Barry
BarryPearlman 15-Aug-12 16:07pm View    
As usual, scope requirements have changed in the more elaborate direction; I do plan on using your revision and I will try to write it up and submit it to Code Project.

As an aside, I can't find a reference to _GetPanePtr(nIdx) and it appears that m_nCount is a member of something, but what is the something? Is it the number of physical panes?

Thanks,

Barry
BarryPearlman 15-Aug-12 10:46am View    
Sorry, but it still doesn't work Eugen, and debugging shows that the text is placed in the pane information structure in the case of pane 0 and the last pane, Pane 2.

I am wondering if Microsoft decided that the last pane (right) is not intended for text, but rather would be used exclusively for the date and/or keyboard key status information and hence the internal pane coding will not support text. It is above my pay grade to be able to look at the source code and confirm or deny this.

I have tried both suggestions, but with negative results. I do have a few ideas which are unconventional, and will take some time to code and debug. If I am successfull, I will try to write it up and submit it as a seperate article.

Any other ideas are welcome, and thanks to those that have submitted input so far.
BarryPearlman 14-Aug-12 11:45am View    
Done