Newsgroups: comp.windows.ms.programmer Path: 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 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.