Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!usc!apple!vsi1!hsv3!jls From: jls@hsv3.UUCP (James Seidman) Newsgroups: comp.windows.ms Subject: Using DefWindowProc() in a child window Message-ID: <5461@hsv3.UUCP> Date: 24 Oct 90 15:51:17 GMT Reply-To: jls@hsv3.UUCP (James Seidman) Organization: Video Seven / Headland Technology Lines: 24 I'm writing an app which has a couple of non-MDI child windows. I can't find an example of this anywhere in the SDK (*every* reference to "child" in the Guide to Programming is for MDI!). Anyway, my problem is this: I do not (of course) process all messages in the child window's window function, and I just pass most of them on to DefWindowProc(). Now, it seems to me that I should pass DefWindowProc() the handle to the *child* window. However, if I try to do that, then CreateWindow() returns NULL! I have to pass the handle to the *parent* window, and then things seem to more-or-less work. Now, this sounds really wrong to me. Am I doing something wrong? I'm creating the window with WS_CHILD | WS_VISIBLE, and correctly specifying the parent. Right now I'm just processing WM_PAINT, although I'll be processing other messages later. Any insights would be very much appreciated. -- Jim Seidman (Drax), the accidental engineer. "It doesn't have to work... they'll be paralyzed just from laughing at me." - Dr. Who, _Shada_ UUCP: ames!vsi1!hsv3!jls INTERNET: hsv3.UUCP!jls@apple.com