Thread: Child window/OpenGl

  1. #1
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972

    Child window/OpenGl

    I can't seem to get a child window to show up when I draw using opengl in the same application. I can tell it is there because when I click and drag where it should be, I can see the outline of it, but it is not visible. Is there any way to do this?

    At the moment I'm defining the dialog in a resource file like this:
    Code:
    IDD_DIALOGLEFT DIALOG DISCARDABLE 0, 0, 100, 100
    
    STYLE WS_CHILD| WS_VISIBLE | WS_CAPTION 
    EXSTYLE WS_EX_TOOLWINDOW    
    //...
    And calling CreateDialog:
    Code:
    CreateDialog(hInstance,MAKEINTRESOURCE(IDD_DIALOGLEFT),hWnd,NULL);
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Zip up a minimal project that demonstrates the issue....it'll get fixed faster that way.

    gg

  3. #3
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Ah never mind I added WS_CLIPCHILDREN to the parent window style and now it shows up...
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  4. #4
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Ok now I added a dropdown list to the window. I don't have very much windows experience as you can probably tell, and when you click on the arrow to display the list it doesn't display them...instead you have to scroll through the list with the arrow keys. Do you have to manually tell it to drop down? I tried:
    Code:
         SendMessage(cHwnd, CB_SHOWDROPDOWN, TRUE, 0);
    But it does nothing. I'll attach an example program

    Edit: There may be some OpenGL variables left in there because I originally thought it was a problem using OpenGL. You should just be able to ignore any of that if I accidentally left it in there.
    Last edited by JaWiB; 05-29-2004 at 04:16 PM.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    If I remember correctly the height of a combo box includes the drop down portion.

  6. #6
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Thanks! I can't believe it was so simple! Ah well, at least I'm learning :P
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. create a child process that creates a child process
    By cus in forum Linux Programming
    Replies: 9
    Last Post: 01-13-2009, 02:14 PM
  2. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  3. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM
  4. Child window inside child window
    By Magos in forum Windows Programming
    Replies: 13
    Last Post: 04-20-2004, 06:51 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM