I have a rich edit control and I want to add some kind of a selection bar on the left side of it. I need to paint this bar on my own (gray background, images etc.).
Maybe you could put a value in the registry that works as a counter of the instances of your app and then divide the time equally between all instances?
I don't have the full MSDN installed (just the docs about MFC, C++ libraries and so on). But I have the Platform SDK update which contains very good documentation with clear function descriptions and...
Wait a minute. A toolbar button is not a control (like a dialog button) so you can't attach it to a CButton. Use CToolbarCtrl member function to manipulate buttons.
Well... when they say something is unsupported under Win95, it means that it will fail if you try to do it. That's why you should always check the result and use some default value.
The MSDN says that the edit control sends WM_CTLCOLOREDIT to its parent (which is the combo box in this case). This message is handled by
CWnd::OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor );...
The easier way to create a font is CFont::CreatePointFont() where you only need to pass the size (multiplied by 10) and name. LOGFONT is useful if you have to specify all these bold, italic,...
You have to read the variable from the CMainDialog object that opens the subdialog. When you create a temporary (local)CMainDialog object, it contains nothing. It's a different instance.
What you...
Since CPoint is a really simple object, I don't see any reasons not to return it from a function, as well as pass it as a argument etc. Returning a reference allows anyone to modify this object and...
It's easier to check if the HWND of toolbar is not null in OnSize(), this way you don't need an extra variable. In fact WM_SIZE is often sent to a window before its children have been created.
You have to use the report list style having one column as wide
as the list. You can use GetClientRect() to find the width and decrease it by some number for the scrollbar to fit.
When you press ENTER in a dialog, it activates the default button, so if you have an OK button the dialog will be closed. KillFocus is sent when the user deactivates the control (by pressing TAB or...