Yes, it's legal, but I can't recall that I have ever done it on purpose. Maybe that behaviour is defined just because it's better than the alternative of undefined behaviour?
I don't know if this is a common problem, but I've sometimes encountered unexpected runtime issues caused by unsigned values being decremented below zero.
It's not NULL. The device context is retrieved from a window and should be valid. I can use the handle later with DrawText and see the results. ChoosePixelFormat returns a non-zero value, so...
How can I disable a category of CMFCRibbonBar? In other words, I want the text in the category tab to be grayed out and ignore any clicks on it to prevent its elements from being shown. In...
GetID is a method of CMFCRibbonBaseElement (and CMFCRibbonQuickAccessCustomizeButton is derived from this class). It returns the command ID according to MSDN...
I suppose you mean ON_UPDATE_COMMAND_UI, but for that I need the ID of the control, right? Unfortunately, GetID() returns 0 if I call the button when it's clicked, so I...
We have migrated to Visual Studio 2010, but have problems with relative paths (that is when selecting a file in Solution Explorer and showing File Properties).
I now created a new MFC project with VS2010 and added just my CDockablePane class. See attached file. You can now see trace for yourself. Please advise.
OK, I see how it's supposed to work. I also read here: http://msdn.microsoft.com/en-us/magazine/cc301402.aspx, where it says "If the mouse is in the left or right border, the default proc returns...
Thanks for the suggestion. I tried it now, but I couldn't prevent resizing of the window (though I noticed OnSize is no longer being called if I try to push the original size to...
I'm rebuilding a MFC MDI application with the new extended classes (CMDIFrameWndEx, etc) in Visual Studio 2010. All OK except for some CDialogBars that I have some trouble regarging keeping same...
When rewriting to use std::vector instead, I miss the "SetAt" method from CArray. Is there any equivalent with bounds checking in STL to prevent writing to...