that just launches MS VS IDE and that's it. I am curious if there at least some way to "debug" in a proper way using command line tools? (not just cout << statements..)
User 11169029
Posts
-
Setting breakpoints in source code in manual compile -
Setting breakpoints in source code in manual compileI am experimenting with Microsoft Visual c++ 2015, for quick tests of console only program I just edit .cpp files with an editor then I call the "developer Command Prompt for VS2015" and compile source using: cl /EHsc mysource.cpp then run executable. My question is, how can I manually now set breakpoints in mysource.cpp file and step through them in a same command line environment?
-
Question about Direct3D View AreaI am following the example about setting up Direct3D rendering area on this link: Tutorial 1: Direct3D 11 Basics[^] All I did is just wrapped it in my own class and instantiated within MFC project. However, my question is, why no matter what values I put as width/height in the DXGI_SWAP_CHAIN_DESC structure, I still get all window filled with blue? shouldnt width/height in that structure or in the D3D11_VIEWPORT structure make difference at all?
-
MFC, Cannot disable Menu option from Child ViewPerfect! I did almost exactly what you suggested with slight difference;
void ChildView::OnRButtonDown(UINT, CPoint point) {
CWnd\* pMain = AfxGetMainWnd(); // get to main window CMenu \*ptrmenu = pMain->GetMenu(); // point to main menu CMenu \*ptrpopup = ptrmenu->GetSubMenu(1);// point to edit popup ClientToScreen(&point); // convert coordinates ptrpopup->EnableMenuItem(CM\_VIEW\_OPTION1, CMViewOption1Enabled ? 0 : MF\_GRAYED); ptrpopup->TrackPopupMenu(0, point.x, point.y, AfxGetMainWnd(), 0);
}
Now it works great! thanks
-
MFC, Cannot disable Menu option from Child Viewok so here is a thing, the CmEnableViewOption1 occurs only when i do View-> from top bar menu, there i see Option 1 and Option2 popping down. However, when i mouse right click from inside ChildView window i do see |Option1,2 menu popping up but inside debugger it does not enter the CmEnableViewOption1, meaning that this function does not run. In that case my question would be, why when i click directly inside top frame menu that function is called, but when i right click from child view window and properly getting that menu and can even run its commands, but CmEnableViewOption1 is not executed?
-
MFC, Cannot disable Menu option from Child ViewI have added a menu with submenus to my MFC frame program. I also have a child view window instantiated within a main frame. In the child window i can successfully do a MouseRight click and popup of some menu with its submenus from the main menu bar. However, when i want to disable some submenu I cannot do it. I already have the following functions:
bool CMViewOption1Enabled;
.
.
.
.
.ON\_COMMAND(CM\_VIEW\_OPTION1, CmViewOption1) ON\_COMMAND(CM\_VIEW\_OPTION2, CmViewOption2) ON\_UPDATE\_COMMAND\_UI(CM\_VIEW\_OPTION1, CmEnableViewOption1)
.
.
.
.
.
.
.
/***************************************************************/
/* */
/* ViewOption1: */
/* */
/***************************************************************/void ChildView::CmViewOption1()
{
MessageBox("View Option1", "MENU", MB_OK | MB_ICONEXCLAMATION);
CMViewOption1Enabled = false;}
/***************************************************************/
/* */
/* CmEnableViewOption1: */
/* */
/***************************************************************/void ChildView::CmEnableViewOption1(CCmdUI *ptrenabler)
{
ptrenabler->Enable(CMViewOption1Enabled);
//ptrenabler->DoUpdate(this, TRUE);}
/***************************************************************/
/* */
/* ViewOption2: */
/* */
/***************************************************************/void ChildView::CmViewOption2()
{
MessageBox("View Option2", "MENU", MB_OK | MB_ICONEXCLAMATION);
}So, i right click inside my child view i see Option1, Option2, and when i click on either i can see message window popping up, meaning that they work. However, if you noticed, when i click Option 1, it must disable this same option in menu (it must be grayed out) but that does not happen. What is the proper way to get it to work? to give additonal details, when i right click and select Option 1, i do see message about it, and as i mentioned above I do not see it grayed out, however when i click it again, no message appears, which means (i assume) that menu is already disabled, but not grayed out..so how to permanently disable/gray i
-
Features and rich documentation of MFC vs Small Executable of WTLI am looking around for topics like MFC vs WTL. There have been many discussions regarding that. I am trying to make a decision of what type of library to use for programming C++ GUI application on Windows7/8. One of the strongest arguments in support for using WTL over MFC was the fact that executable of WTL will be around 4x smaller in size than statically linked MFC Application. Now, given the fact that we are living in 2015 now, does it really matter? If your program is 8MB or 2MB? From what I see, MFC has many more rich features, and most of all, it is very well supported. For example, I can install Visual Studio 2013, and build MFC right away and change it the way I want. On the other hand WTL does not even install properly with its installer under new Visual Studio unless you do some tricks/corrections. Plus, WTL literature/examples are scattered here and there, and there is very minimal support to it. And most of all, it doesnt have as many nice UI features as MFC does. The only thing WTL buys me is the fact that its applications will be just more compact, and smaller, but then again, does it really matter for PC's of these days? Also, MFC gives programmer to do anything what he could do with Win32 API. Am I missing anything else what is needed to make a decisio whether I should go with MFC or WTL? So, if one wants to develop some big and professional Windows GUI Application, what is better invest time for coding/learning, MFC, or WTL?