CompuServe Archive

This is an archive of CompuServe forum messages from 1985 to 1995, as saved in transcripts by John Foust.

Search Results (13 messages)

#30598 #CDialog startup Message #30639
Pat, PMFJI, try posting a user-defined message to yourself at OnInitDialog ( WM_USER + 2 or bigger ). When you get this message, the dialog should be visible. You can also set up a timer. ThomasZ
David, you should always call Ctl3dSubclassDlgEx as late as possible. But presumably this isn't the problem ( but you could just turn off 3D for making this sure ). >> Sometimes it works, and sometimes not. Could this be related to whether there are several dialogs up the same time,…
#30618 CDialogBar ctls Message #30637
Bruce, enabling/diabling of controls should be done using MFC's OnUpdateCommandUI mechanism. Add the following to your view: to the .h afx_msg void OnUpdateSortButton(CCmdUI* pCmdUI); and the following to the .cpp //message map entry ON_UPDATE_COMMAND_UI( IDC_SORT, OnUpdateSortButton ) // actual handler void CYourView::OnUpdateSortButton(CCmdUI* pCmdUI) { // TODO: Add your control notification…
#30588 Unfolding Dialogs Message #30636
Marion, there is an example in plain C/SDK in the MSL, its name is "Expand". AppStudio won't allow you to make the dialog template smaller than the rectangle of the contained controls, so you will have to edit the rc file manually. ThomasZ
#30524 Changing the Cursor Message #30635
Craig, if you knew how much processing is done when the mouse moves, you wouldn't care at all about this little check ! With every mouse move, the underlying window(s) get a least three messages, WM_NCHITTEST, WM_SETCURSOR and WM_MOUSEMOVE. If the associated processing really takes a lot of time, the…
Barry, linebreaks in an edit control are forced by "\r\n". You can add soft line breaks with "\r\r\n". HTH ThomasZ
#30447 rotating text Message #30470
David, to display rotated text, you have to initialize the members lfOrientation and lfEscapement of the LOGFONT structure both to the desired ratation angle times 10. For a plain SDK/C sample, take a look at FONTEST. ThomasZ
David, do you call it after you call the base class OnInitDialog ? ThomasZ
#30094- Using CMapStringToObj? Message #30239
Michael, cast your pointer manually to a CObject pointer! ThomasZ
#30064- subclass window assert Message #30238
David, this is due to CTL3D, since it subclasses all the controls in your dialog before your OnInitDialog is called. MFC checks the window proc when subclassing and complains. The easiest way to circumvent should be to swich off automatic subclassing and to to this manually in your OnInitDialog. ThomasZ
Mark, VC++ 1.1 targets win32 only ! And if you hit the compatibility button in the online doc, you will see they aren't supported on win32. If you want to target win16, you have to use VC++ 1.0 or VC++ 1.5, which of cours run on NT ( although 1.0…
#30068- #Subclass woe Message #30236
Charles, PMFJI, you only have to override this function for CWnd derived classes, the MFC control classes already override it, providing a place for the window proc pointer. Clear as mud ? ThomasZ
#30140- Changing the Cursor Message #30235
Craig, I assume that you in fact returned TRUE in your first code snippet to stop further processing ! I looked around a little and found an article "Static Controls" on the MSDN CD, below I paste the relevant paragraph: >>Static controls might be called "no input controls" because they…