B
Benjamin Lukner
Hi all!
I have to get the upper left corner of the client rectangle in relation
to the upper left corner of the WinCE form in order to call
SetWindowRgn() correctly. Is there an easy way to do it? GetClientRect()
returns by definition 0;0 though it is e.g. 4;23 on an NT-style Windows
XP. I made up several ways that mostly only work in Full Framework but
not in Compact Framework:
1.
- Declare GetWindowInfo() and GetTitleBarInfo()
- Call them
- Location = New Point(WindowInfo.cxWindowBorders, _
WindowInfo.cyWindowBorders + oTitleBarInfo.rcTitleBar.Height)
-> CE does not have these two functions implemented
2.
- Create MyPanel at 0;0
- Declare ClientToScreen()
- New Point (0,0)
- ClientToScreen(MyPanel.Handle, Point)
- Location = Point.Offset(-Me.Left,-Me.Top)
-> CF does not allow to retreive the Handle of a control
3.
- Location = New Point((Me.Width-Me.ClientSize.Width)\2, _
Me.Height-Me.ClientSize.Height-((Me.Width-Me.ClientSize.Width)\2))
-> This assumes that the bottom (Y) border is the same width as the left
and right (X) border.
What is the suggested way to retreive the client location on Windows CE?
Kind regards,
Benjamin Lukner
I have to get the upper left corner of the client rectangle in relation
to the upper left corner of the WinCE form in order to call
SetWindowRgn() correctly. Is there an easy way to do it? GetClientRect()
returns by definition 0;0 though it is e.g. 4;23 on an NT-style Windows
XP. I made up several ways that mostly only work in Full Framework but
not in Compact Framework:
1.
- Declare GetWindowInfo() and GetTitleBarInfo()
- Call them
- Location = New Point(WindowInfo.cxWindowBorders, _
WindowInfo.cyWindowBorders + oTitleBarInfo.rcTitleBar.Height)
-> CE does not have these two functions implemented
2.
- Create MyPanel at 0;0
- Declare ClientToScreen()
- New Point (0,0)
- ClientToScreen(MyPanel.Handle, Point)
- Location = Point.Offset(-Me.Left,-Me.Top)
-> CF does not allow to retreive the Handle of a control
3.
- Location = New Point((Me.Width-Me.ClientSize.Width)\2, _
Me.Height-Me.ClientSize.Height-((Me.Width-Me.ClientSize.Width)\2))
-> This assumes that the bottom (Y) border is the same width as the left
and right (X) border.
What is the suggested way to retreive the client location on Windows CE?
Kind regards,
Benjamin Lukner