ID mode problem in MFC - c++

Problem:
I am using Visual studio 2010 MFC c++..
facing this problem
I need actual menus that i naked, but i am in edit ID mode by mistake how can i leave edit mode.. and when i click on any edit ID mode menu.. i received the message provided in the above link
and when i run the project.. it shows no error but even then MFC is not running and displaying the result.Any one can help me to get rid of from thim problem
Expecting a good response..
Thanks

I have no idea what you're trying to ask but...
maybe edit the resource file as text would help?

Apparently you are in ID edit mode and want to leave it. Right click somewhere on empty space and uncheck 'Edit IDs' in the context menu by clicking on it.

Related

VS2022 Community crashes when adding Class to MFC Dialog

I am facing a very consistent and persistent problem with Visual Studio 2022 Community Edition.
In an MFC project I open the Resource File and add a new Dialog. Then I place some standard controls and rename the dialog resource from its default name to a new ID.
Then I save and try to assign a Class to the dialog by right-clicking on the dialog and choosing 'Add Class'. Then the 'Add MFC Class' window appears, I enter the Class Name and click [OK].
It appears it creates the class on the File System and then VS2022 crashes completely!
I have disabled all addins in case an addin could be causing the problem but it happens every (almost) every time even without plugins. The only time I manage to get it to work is if I save, close all code editors, exit VS2022, restart it and immediately try to add the class. Another piece of information is that I have changed the MFC dialog template with a different one but it does not seem to bother it when I get it to work. Also intelliSense is completely disabled.
How can I debug this and identify the root cause of this crash?
There's a fair chance that you can't do anything in an effective fashion. VS2022 isn't an open source project, where you can easily pinpoint a crash to a specific line of code and fix it yourself.
But the good thing is that you don't need to. Just use the feedback channel VS2022 provides:
Usually a Microsoft employee will reply within a few days and maybe a fix will be included in the next preview version. Only now and then it can take some month to get a bug resolved.

watch window in the debug is empty

I was trying to understand how to fix my watch window but didn't find any good answer(I'm using visual studio 2013).
I used the debugger and suddenly the watch window didn't show the values or the object i'm have in the block - actually it didn't show anything anymore.
Does anyone know how can it be fixed?
Many thanks!!!
Maby this will help you:
To open the QuickWatch dialog box with a variable added While in break
mode, right-click a variable name in the source window name and choose
QuickWatch. This automatically places the variable into the QuickWatch
dialog box.
Source
The Watch windows don't show anything by default, you need to add things to them to see the values. What might have happened in your case, is that either you deleted what you had by mistake, or you ran into a bug, where something got corrupted in your solution and they were lost.
If you want to see everything that is currently in scope, the Locals window is the way to go.
And if you want a superset of that (which has both current and previous statement), use the Autos window.
The QuickWatch dialog box is similar in concept to the Watch window, but QuickWatch can display only one variable or expression at a time
https://msdn.microsoft.com/en-us/library/bhawk8xd.aspx

Show Message Bar in ribbon mfc

Probabbly i am not sure what to search for ... But the idea is to display a message bar bellow ribbon control. When user try to edit a read only file. I don't want user to click on OK to remove error message. Thats why i can't use MessageBox.
Status bar doesn't seem right place to display error messages.
Which control i should start exploring.
MSOffice normally displays such message when user opens files in protected view .
I don't want you to do research for me, I just want the right direction i will do the rest.
Thanks
You can easily use CMFCCaptionBar for such an attempt. When you create a ribbon bar SDI application you get sample code for free.
Also it is possible to hide and Show such a bar on the fly with ShowWindow. Also this code is generated by the wizard.

ActiveX bug in ctlinplc.cpp

I am writing an ActiveX Control. Everything worked fine when i test my AX Control with TestConn. But when i put it into a HTML and load the problem happened. When i click on the frame contain my control at the second time, bug occured. It said that "Debug Assertion Failed ..... ctlinplc.cpp line 51).
When i take a look at ctlinplc.cpp the bug line is
ASSERT(m_menuWidths.width[5] == 0);
Please , tell me how to overcome this bug. P/S: I am also stucking in create an ActiveX Control that has a menubar to add to my website

need help using 2 mfc projects in one solution

ive created the first project as mfc application and i have tried to enter the solution another project which created as mfc dll. when i running program the gui from the first solution(demodlg) is shows up. and i want that in a prss of a button in the gui the second gui(CAnalyzerDialog) will show up. i've tried a lot of options and i cant get it done right.
the last option ive tried is this code :
CAnalyzerDialog dlg;
dlg.Create(CAnalyzerDialog::IDD);
please help. thank you for your time
I think the problem is that the program and DLL both have their own resource files, but MFC is only accessing the program resources and ignoring the DLL ones. Look into AFX_MANAGE_STATE and see if that helps.
Have you tried to set CAnalyzerDialog as primary project?
On solution explorer, right click on the CAnalyzerDialog, tick "Set as startup project".
Probably you are trying to elaborate that:
demodlg - EXE
CAnalyzerDialog - DLL
Check the way you link both project(static or dynamic-runtime/compile time).