PDA

Click to See Complete Forum and Search --> : Problem with setparent


daamazing1
Jun 7th, 2000, 12:35 AM
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?

Crazy D
Jun 7th, 2000, 01:51 PM
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.

daamazing1
Jun 8th, 2000, 01:36 AM
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...

daamazing1
Jun 8th, 2000, 01:56 AM
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?