| View previous topic :: View next topic |
| Author |
Message |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Tue Oct 06, 2009 10:21 pm Post subject: ChildForm Anoiyances |
|
|
Hey, I've been trying to force MS into a child window for for a few day's now. It now fits snug inside the panel but with a short list of problems. Not only do key presses not work. My mouse is not visible when I click back on the form. Is this something to do with focus?
CODED IN VB.NET Yeah i know -_-
Example: *MS is only used as an example
_________________
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Oct 07, 2009 4:56 am Post subject: |
|
|
| make sure your parent window has the WSCLIP_CHILDREN style
|
|
| Back to top |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Wed Oct 07, 2009 5:11 am Post subject: |
|
|
Is that correct?
| Code: | | Friend Const WSCLIP_CHILDREN = &H10000000 |
I'm not sure what to replace with with WSCLIP_CHILDREN
| Code: | | SetWindowLong(hwnd, GWL_STYLE, WS_CHILD Or WS_VISIBLE) |
I know these are kind of stupid questions. Forgive me for that
_________________
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Oct 07, 2009 6:22 am Post subject: |
|
|
I don't code VB or .NET but in regular WinAPI you can define it as part of the style argument when calling CreateWindow/Ex
If you want to do it with the way above, GetWindowLongPtr() first then OR the result with WS_CLIPCHILDREN if you're sure that it's not already there then SetWindowLongPtr() the result
|
|
| Back to top |
|
 |
shhac Expert Cheater
Reputation: 0
Joined: 30 Oct 2007 Posts: 108
|
Posted: Wed Oct 07, 2009 3:44 pm Post subject: |
|
|
| If WSCLIP_CHILDREN isn't working you can always just get rid of it manually as the gap is the size of a window's border in your OS's theme. In the form try setting the top/side offsets to negative numbers of the height/width of the border respectively, or just stick a blank panel ontop so it is covered.
|
|
| Back to top |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Wed Oct 07, 2009 8:43 pm Post subject: |
|
|
That still wont solve the mouse problem though. Or key presses.
_________________
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sat Oct 10, 2009 5:03 pm Post subject: |
|
|
| try SetFocus() or SetForegroundWindow()
|
|
| Back to top |
|
 |
|