Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages
Started by Renald Yazmir
Fri, 29 Feb 2008 19:14
ClipCursor() and Desktop Rect
Author: Renald Yazmir
Date: Fri, 29 Feb 2008 19:14
Date: Fri, 29 Feb 2008 19:14
23 lines
1637 bytes
1637 bytes
Hello I have 2 questions: 1) I am trying to use ClipCursor() function. As the test I just call GetClipCursor(&clip_rect) and then right away I call ClipCursor(&clip_rect). When I start dragging a dialog box I can drag it under the desktop taskbar. Why? 2) Then I am trying to change the clip_rect, to decrease it by the taskbar? I get the desktop window and then desktop rectangle. It turned out that desktop rectangle equals to clip_rect. desktop_hwnd = GetDesktopWindow(); GetWindowRect(desktop_hwnd, &desktop_rect); I get: clip_rect = = desktop_rect How do I get desktop rectangle minus taskbar? Thank you Rony.
Re: ClipCursor() and Desktop Rect
Author: Remy Lebeau (TeamB)
Date: Fri, 29 Feb 2008 20:05
Date: Fri, 29 Feb 2008 20:05
29 lines
1963 bytes
1963 bytes
"Renald Yazmir" <renald@partmaker.com> wrote in message news:47c8599b$1@newsgroups.borland.com... > As the test I just call GetClipCursor(&clip_rect) and then right > away I call ClipCursor(&clip_rect). > When I start dragging a dialog box I can drag it under the > desktop taskbar. Why? Obviously, GetClipRect() is including the area occupied by the taskbar. > 2) Then I am trying to change the clip_rect, to decrease it by the > taskbar? Why don't you want the user to be able to reach the taskbar? > I get the desktop window and then desktop rectangle. It turned > out that desktop rectangle equals to clip_rect. You are retrieving the rect of the desktop window itself. The taskbar sits on top of that. So it makes sense for the desktop rect to include the taskbar rect in it. > How do I get desktop rectangle minus taskbar? Have you looked at SystemParametersInfo(SPI_GETWORKAREA) yet? Gambit
Re: ClipCursor() and Desktop Rect
Author: Renald Yazmir
Date: Fri, 29 Feb 2008 21:13
Date: Fri, 29 Feb 2008 21:13
37 lines
2214 bytes
2214 bytes
Thank you very much! SystemParametersInfo(SPI_GETWORKAREA) is what I needed. Rony "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:47c86558$1@newsgroups.borland.com... > > "Renald Yazmir" <renald@partmaker.com> wrote in message > news:47c8599b$1@newsgroups.borland.com... > >> As the test I just call GetClipCursor(&clip_rect) and then right >> away I call ClipCursor(&clip_rect). >> When I start dragging a dialog box I can drag it under the >> desktop taskbar. Why? > > Obviously, GetClipRect() is including the area occupied by the taskbar. > >> 2) Then I am trying to change the clip_rect, to decrease it by the >> taskbar? > > Why don't you want the user to be able to reach the taskbar? > >> I get the desktop window and then desktop rectangle. It turned >> out that desktop rectangle equals to clip_rect. > > You are retrieving the rect of the desktop window itself. The taskbar > sits on top of that. So it makes sense for the desktop rect to include > the taskbar rect in it. > >> How do I get desktop rectangle minus taskbar? > > Have you looked at SystemParametersInfo(SPI_GETWORKAREA) yet? > > > Gambit >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads