What on earth is a caret in the context of a CSplitterWnd class? I can't find any documentation relating explicitly to CSplitterWnds...
EDIT: Specifically, what do these functions actually do:
CWnd * pCurView = m_wndSplitter2.GetPane(2, 0);
pCurView->ShowCaret()
pCurView->HideCaret()
EDIT2: Please note, I know what a caret is, I am s...
Hi all,
I am trying to create a control that implements the per-pixel alpha blend while painting a 32-bit bitmap.
I extended a CWnd and use static control in the resource editor. I managed to paint the alpha channel correctly but still the static control keep painting the gray background.
I overwrote the OnEraseBkgnd to prevent the co...
Is it possible to take a DLGTEMPLATE and use it as a CWnd-derived control for placing in any other CWnd?
I have a dialog template that I want to use on one of my CDockablePanes
...
Hi all,
I have a control derived from a CWnd object that has its custom implemented tooltip system . The tooltip is implemented using a CDialog and works fine but I have a problem to know when I have to hide it.
The tooltip shows up when the mouse hover over the control (WM_MOUSEHOVER) and it's hidden when the mouse leaves the control ...
Hi all,
I want to display a custom image while dragging an object in a drag&drop operation.
I have created a CWnd-derived control (a chart) and I display 4 of them in the same dialog. I've implemented drag&drop using COleDataSource so that the user can change its position by dragging and dropping the control. Now I would like to displ...
In an instance of a class derived from CWnd, is it possible to forward (redirect) all MFC messages to another object, without writing separate handlers and message mappings for each possible message? Specifically, I'd like to forward all unhandled WM_ messages to another object. If this isn't possible, then is it possible for objects ...
I am using MFC to write a GUI application. I chose dialog-based application, and put
picture control, edit box and buttons on it. When the picture control is mapped to
the class derived from CWnd using DDX_Control, all the message boxes (including default system message box pop up when you enter invalid input in the edit box) are hidden...
According to msdn, when I get a CWnd* with CWnd::FromHandle,
The pointer may be temporary and should not be stored for later use.
What is meant by "later use" is not clear to me. Is it only the scope of the current method?
As far as I know, there is no GC in Win32!
...
Hi All,
Is there a way to retrieve window handle from a CDialog derived class (like CWnd::m_hWnd member) ?
Thanks
...
I tried to paint on my windows desktop using GetDesktopWindow().
But i failed because desktop repaints itself rapidly and my painting doesn't appear.
So I need to replace my desktop window obtained by GetDesktopWindow() with ownerdraw application window
Can anyone has an idea, how to do this ?
Thanks in advance,
Milan
...
I have an application with following windows hierarchy:
W1
-W2 (Child of W1)
- W3 ( Child of W2)
--------------------|
| W1|------------| |
| |W2 |------| | |
| | |W3 | | |
| | |------| | |
| |------------| |
|-------------------|
When certain event happens in W2, I call UpdateWindow:
W2::onCertainEvent()...
My job requires me to maintain some old MFC programs, and I've been asked to add a CButton to an existing dialog. Even though my code calls CWnd::EnableWindow to enable the button, CCmdUI::Enable disables it.
Here is part of the stack trace at the moment CWnd::Enable disables the button.
mfc90d.dll!CWnd::EnableWindow()
mfc90d.dll!CCmd...
I have a C++ gui application(MFC). I have made it dll and used its functionality from my C# windows exe application. Surely I'm not showing any window that previously were shown from C++ application.
For the following line i'm getting the error
Error: "Microsoft Visual C++ Debug Library... Debug Assertion Failed!... afxwin1.inl Line:2...
Using CWnd::ShowWindow(SW_SHOWMAXIMIZED) maximizes my app window as expected.
However, when clicking the restore button on the app (or double clicking the title-bar), the restored size is the same size as the maximized window, which is confusing for the user.
Using this alternative code has the same problem:
WINDOWPLACEMENT wndpl;
Get...
I have a MS Visual C++ project where I have a CDialog based dialog box with several edit controls. I want to highlight the control with the current focus for the user. I implemented this by getting a pointer to the window that has the current focus with GetFocus() and then obtaining the ID for the focused control with GetDlgCtrlID():
...