Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!ns-mx!ccad.uiowa.edu!cadsi From: cadsi@ccad.uiowa.edu (CADSI) Newsgroups: comp.windows.ms.programmer Subject: Re: Extra Bytes in Dialog Window Message-ID: <1991May29.230641.22824@ccad.uiowa.edu> Date: 29 May 91 23:06:41 GMT References: <1663@msa3b.UUCP> Organization: CAD-Research, U. of Iowa, Iowa City, Iowa Lines: 23 From article <1663@msa3b.UUCP>, by kevin@msa3b.UUCP (Kevin P. Kleinfelter): > I need to store 2 bytes in a dialog window. In "normal" windows, > I set cbClsExtra = 2, and use SetWindowWord and GetWindowWord. > > I can do similar stuff with a dialog box, but I have to use > CreateDialogIndirect, and do all the dialog stuff in my program, instead of > using a template created by the dialog editor. > > Is there a way to create a dialog window, using a dialog-box template, > and get extra bytes? Indirectly. I use the SetProp() function. Matter of fact, this is how I store the 'this' of my Dialog base class. It works well for me. Just set the property during the WM_INITDIALOG message. Then, when you need those little bytees, call GetProp(). Also, you'll probably call DialogBoxParam() instead of DialogBox so you can pass the bytes you need to the WM_INITDIALOG message. |----------------------------------------------------------------------------| |Tom Hite | The views expressed by me | |Manager, Product development | are mine, not necessarily | |CADSI (Computer Aided Design Software Inc. | the views of CADSI. | |----------------------------------------------------------------------------|