CompuServe Thread

#DialogBoxIndirect

3 messages in this thread
#50204From: Jackie LuppiJul 30, 1993 1:00 PM
HI, I have a question about the DialogBoxIndirect API, actually two questions: If I use DS_SETFONT what happens if the font I specify is not supported ?? Since I am specifying a point size and type face name I am not guaranteed that the font will be supported Is there any way to use CreateFont and select the Hfont created into the DC of the dialog box window while using the DialogBox Indirect call ?? Next question has to do with modality. I performed an experiment on Win32 and Win32s where I created two overlapped windows. One of the windows creates a modal dialog box which I bring up immediately. The other window "postmessage"s messages to the first window which has the modal box up. The window with the modal box is responding to the postmessage because it is writing the text to its client area even though it is the parent of an active modal box ?? According to the documentation the modal box should "disable" the parent, how do you define "disable" in this context ?? Also what kinds/types/groups of messages will a parent process when it is disabled by a modal dialog box ?? Thanx, Jackie There is 1 Reply.
#50458From: Steve Firebaugh [MS]Aug 2, 1993 9:32 PM
Hi Jackie, 1. If you use DS_SETFONT in your dialog template, that point size and face name will be turned into a LOGFONT specification when the dialog is created. When it comes time to draw text of any sort for that dialog, the font mapper will try to match that LOGFONT with one of the installed fonts. No, it is not possible to call CreateFont(), and then pass the HFONT to DialogBoxIndirect(). However, it is possible to watch for the WM_INIDIALOG message in your dialog procedure, and send your child controls WM_SETFONT messages with an HFONT. That should do what you want to do, even if it requires multiple SendMessage() calls. 2. The Win32 SDK documentation defines a disabled window as follows: "A window that cannot receive input from the keyboard, mouse, or other input device." Notice that does not mention receiving messages sent or posted from other parts of your program. Any message that you post or send will make it to your window procedure. It is only messages generated by user actions which are blocked when a window is disabled. I hope that this helps. Steve Firebaugh There is 1 Reply.
#51265From: Jackie LuppiAug 9, 1993 11:50 AM
Hi Steve, Thanx, this helps alot !!! Jackie