Article View: comp.windows.ms.programmer
Article #2434Help: custom controls in a dialog box
From: Bruce Sabalaskey
Date: Sat, 04 May 1991 19:32
Date: Sat, 04 May 1991 19:32
32 lines
1730 bytes
1730 bytes
I've been having trouble trying to display a custom control in a modeless dialog box. Can anyone tell me what I am doing wrong? Here's the background: First, I'm using BC++. I've created a custom control and placed it into a DLL. It seems to initialize properly since the dialog editor of the SDK displays it correctly (I've noticed that the Whitewater toolkit doesn't show anything but an outline -- is this a clue or a limit of the Whitewater toolkit ??) My reference material for doing custom controls has been "Programming Windows 3" from Microsoft. In my main program, I've included the custom control header file (for the messages it needs). When I link the main program, I also include the custom control .LIB file which was created as part of my DLL. The program compiles and links OK. My .DLL itself is in the win3 directory so I know it's in the path. Now here's the specific problem. When I try to create the modeless dialog box with CreateDialog(), it always returns a NULL (0) window handle when the custom control is in the dialog box. If I take the custom control out of the dialog box, the dialog box gets created properly. (Turbo debugger sure made this easy!) (PS: yes, i've thunked the dialog proc) Any help would be appreciated. Bruce Sabalaskey saba@tellabs.com ..!uunet!tellab1!saba
Technical Details
Message-ID:
<5992@tellab5.tellabs.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!tellab5!sabaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!tellab5!saba From: saba@tellabs.com (Bruce Sabalaskey) Newsgroups: comp.windows.ms.programmer Subject: Help: custom controls in a dialog box Keywords: custom control Message-ID: <5992@tellab5.tellabs.com> Date: 4 May 91 19:32:08 GMT Sender: news@Tellabs.COM Lines: 32