[comp.windows.ms] Keyboard Interface with not DIALOG class Dialog Boxes

bturner@hpcvlx.HP.COM (Bill Turner) (11/29/88)

I think the function IsDialogMessage is what handles the keyboard interface
for dialog boxes -- when you have a modeless dialog (created by CreateDialog)
your main message loop needs to be something like

while(GetMessage(...))
{
    if (IsDialogMessage(...))
	continue;
    TranslateMessage(...);
    DispatchMessage(...);
}

--Bill Turner

rogerson@PEDEV.Columbia.NCR.COM (rogerson) (11/30/88)

In article <106580004@hpcvlx.HP.COM> bturner@hpcvlx.HP.COM (Bill Turner) writes:
>I think the function IsDialogMessage is what handles the keyboard interface
>for dialog boxes -- when you have a modeless dialog (created by CreateDialog)
>your main message loop needs to be something like
>
>while(GetMessage(...))
>{
>    if (IsDialogMessage(...))
>	continue;
>    TranslateMessage(...);
>    DispatchMessage(...);
>}
>
>--Bill Turner

	Thanks for the help.  This is what I used along with changing the
	the input focus in response to WM_INITDIALOG commands.  It is
	funny the way Petzold's book and the SDK work together (?).  The
	SDK documentation says that a CreateDialog call is only for Dialog
	templates that have the Dialog Class, but Petzold uses it to make
	Hexcalc (MS uses it to make PifEdit).  Then in the section about
	Modeless Dialog Boxes Petzold maked me believe it was only for
	Modeless Dialog Boxes, however, the SDK statest clearly that the
	IsDialogMessage function can be used with any window that wants to
	have the keyboard functions like a dialog box.  Works great! 

	One note, the source to PifEdit was a big help.  It told me I was right
	and help with setting the focus correctly.

	Danke Sehr
	-----Dale
		Rogerson-----