|
-
Jun 17th, 2007, 06:46 PM
#1
Thread Starter
Addicted Member
How I get the rect for menu
Hi all ....
I need to get the dimensions of any active menu , as if I clicked a desktop and it's menu appeared , how can I adjust my timer control to get this menu Rect ,or the start menu , or any other menus.
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 17th, 2007, 08:41 PM
#2
Re: How I get the rect for menu
Have you been able to find the hWnd (window handle)? If so you can use the GetWindowRect() API function.
To get the dimensions of only the client area (not including borders) you would use the GetClientRect() API function. Although I think the first one is the one you'd want.
Finding the start menu is apparently easy (there's code to manipulate the start menu all over the net). For any active menu in the system (desktop right-click, other programs, etc.) I imagine it would be very difficult.
-
Jun 18th, 2007, 09:08 AM
#3
Thread Starter
Addicted Member
Re: How I get the rect for menu
but if we know the class type of menu , I think we can find it's rect , cause if we use Forgroundwindow function return the handle of window contains the menu.I found many programs do that like SnagIt .
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 18th, 2007, 09:57 PM
#4
PowerPoster
Re: How I get the rect for menu
I believe it is possible if you solve this.
 Originally Posted by ashraf fawzy
but if we know the class type of menu , I think we can find it's rect
I have no idea about this.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Jun 18th, 2007, 09:59 PM
#5
Thread Starter
Addicted Member
Re: How I get the rect for menu
Many thanks for your support , I'll try hard to find it .
Some times when you make a step forward ...You can't get back. Be sure where you make your steps.
-
Jun 18th, 2007, 10:07 PM
#6
PowerPoster
Re: How I get the rect for menu
Ya pal, it is better. Actually I'm not best in VB. Just put your issues here. I'll try it.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|