Results 1 to 4 of 4

Thread: Problem with setparent

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17

    Unhappy

    I am building a project that has multiple projects with other forms that are going to be the children of the main projects form. The main projects form is a regular form and not and MDI and I made all the other forms children of that form using the setparent function.

    The problem is that when I click on the children forms to move them the mouse cursor seems to be off by the height of the title and menu bars, anyway to fix this problem?

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    If I remember right, you need to change the windowstyle to WM_CHILD (setwindowlong), I believe that's enough for your problem. If it isn't, I'll have to see if I still have the code. I played with it, and at first I had the same problem but I think I fixed it with the above.
    Hope this helps

    Crazy D

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17

    Still doesn't work

    I tried setwindowlong(me.hwnd,GWL_Style,GW_Child) but what this does is make the window inmoveable and it doesn't paint will to the screen. Please some more help...

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17

    Talking I Got it but,toolbar

    Thanks the exact code is setwindowlong(me.hwnd,GWL_STYLE,WS_CHIld or OrigWinStyl).

    The Problem is now the window covers the toolbar, Any suggestions?

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