🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2163

Re: Menus in dialogs

#2163
From: Paul Bonneau
Date: Wed, 17 Apr 1991 22:36
31 lines
1631 bytes
In article <5542@eastapps.East.Sun.COM> kstout@medieval.UUCP () writes:
>
>I would like to include menus in a dialog. Any thoughts or 
>suggestions on how to go about this? References to correct
>documentation, Petzold examples, are good too.
>
The key here is to get the (*!(!&!$&!%) dialog editor to emit
a text file, instead of a .res file.  Do this by performing a
file saveas and give an explicit .dlg extension.

Now, edit the resulting text file and simply add the CLASS
statement to the header, with the name of a class you will
register for the dialog proc (instead of using the default
as usual).

Instead of returning true or false, your dialog proc will
call DefDlgProc() for any messages it does not handles.  It
will be a "true" window proc, with a long return value.

Also, since you will now register a class for the dialog
proc, you don't need to do a MakeProcInstance() (but make
sure the name is in your .def file!).  Essentially, you
are just using a regular window proc instead of a dialog
proc.

Oh, yeah.  Of course you need to create a MENU resource
and supply the name when you register your class.  I
haven't tried this personally, but in theory it should
work!

cheers - Paul Bonneau.
Technical Details
Message-ID: <1991Apr17.223615.1910@hyper.hyper.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
References: <5542@eastapps.East.Sun.COM>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau
From: bonneau@hyper.hyper.com (Paul Bonneau)
Subject: Re: Menus in dialogs
Message-ID: <1991Apr17.223615.1910@hyper.hyper.com>
Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
Organization: HyperCube Inc.
References: <5542@eastapps.East.Sun.COM>
Date: Wed, 17 Apr 1991 22:36:15 GMT