Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!pasteur!ucbvax!decwrl!hplabs!hp-pcd!hpcvlx!bturner From: bturner@hpcvlx.HP.COM (Bill Turner) Newsgroups: comp.windows.ms Subject: Re: Windows management from dynamic link libraries Message-ID: <106580024@hpcvlx.HP.COM> Date: 30 Jan 89 18:29:42 GMT References: <6287@ecsvax.uncecs.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 22 > I'm having difficulty figuring out how to create and manage windows > from a dynamic link library that is loaded from a main program after > program initialization (the main program does not know the name or > contents of the DLL until the DLL is selected from a list of DLLs > on disk). As I understand it from Petzold's book, DLLs do not receive > messages from Windows and so must peek at the main program's message > queue. The only exception is for modal dialog boxes, which get their > messages directly. However, I really need full popup windows, or at > least a modeless dialog box. > > Can anyone offer some suggestions (or maybe even a little code) about > windows management from within a DLL? Well, if you're using GetMessage/TranslateMessage/DispatchMessage as your main loop, the messages will get to windows created in the DLL just fine. Remember, all dialog controls are windows registered by a DLL, and you can create and use them just as any other window. What exactly is the problem you're having? If you register the window class and have the code in the DLL, it should work fine. --Bill Turner