CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2008
    Posts
    31

    Win32 child window

    I've been doing some basic win32 programming. Just a simple window and a couple of buttons. Now i want to add a child window to my main window

    Code:
    	SaveButton  = CreateWindow("BUTTON","Save",      WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,10, 10,80,20,m_hWnd,(HMENU)102,m_hInstance,NULL);
    This is how i added a button. I should be able to add a window in the same way if i have defined the window in another file right???

    Thanks

    P.S. Hope the code tags work, haven't used it before

  2. #2
    Join Date
    Oct 2008
    Posts
    31

    Re: Win32 child window

    Ok i think i have figured it out, Child frames have to be defined differently. You have to use DefWindowProc() call to DefFrameProc() and things like that.
    Sorry for wasting your time
    I anyone else wants more information visit http://www.winprog.org/tutorial/app_four.html
    Sorry again

  3. #3
    Join Date
    Nov 2007
    Posts
    74

    Re: Win32 child window

    Someone new online I just caught via webcam said that child window is created with WS_CHILD alone only which sure will work. Don't go far into web site introduction. it might hurt the bathroom as always

  4. #4
    Join Date
    Feb 2009
    Posts
    56

    Re: Win32 child window

    Quote Originally Posted by Thu View Post
    .......child window is created with WS_CHILD .....
    Very good Thu, always on the right track

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured