Forum Discussion

sschultheiss's avatar
sschultheiss
New Member
11 years ago

wButtonText returns the same name for each item (CMFCMenuBar)

Hi,




I'm going to write a test for an MDI MFC application. Here I encountered the following problem:


The wButtonText property of an CMFCMenuBar always returns the same value regardless of which index I use.


 


The ClickItem method also does not work. The following error occurs:



The control item '&Ansicht' not found.

Total number of items: 3.

Items: '&Datei', '&Datei', '&Datei'.




 


Sorry for my bad English.



Stefan

3 Replies

  • I have a similar problem. Test Complete is returning the same caption for each of the menuBar items. Test Complete Object Spy show the wButtonText correctly for the first item but not for the others. 



    I have attached a screenshot.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Mahesh,

     


    Did your compile the app with debug information according to the "MFC Menu Button Support" article?


    If you did, but the issue persists, I suggest that you contact our Support team to investigate this behavior in detail. If you provided a simple app where the issue is reproduced on your computer, that would be great. Thanks.