| View previous topic :: View next topic |
| Author |
Message |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Sep 16, 2003 12:59 pm Post subject: |
|
|
| jules wrote: | | How is it determined where the menu pops up. In other words, if you pop up the menu from a tray icon click event, will it appear in the right place? |
Menu Pop ups are easy to do Jules. There is an API that allows you to take any Menu and make it a pop up menu. The API you guys need to use is "TrackPopupMenu". Here is the Gadget definition.
| Code: | | Gadget Define,Function,TrackPopupMenu,%%USER32,PopupMenu,hMenu As Handle;uFlags As DWORD;X As Integer;Y As Integer;nReserved As Integer;Hwnd As Handle;prcRect As Pointer,Integer |
You can use @mousepos(XY) to place the Popup Menu where the mouse cursor is. I have already built examples for this with Gadget so Prakash if you want you can use one of my examples as a template for your DLL if you like. At one time I had all the menu abilities added to Gadget but I felt that it was too much overhead since Gadget could just call the menu functions with the API's instead. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1567
|
Posted: Tue Sep 16, 2003 1:03 pm Post subject: |
|
|
Pricing hasn't been determined yet; but it won't be anywhere near vdsipp or vdsobj pricing since it's a smaller dll.
As to how the popup will appear, it will work just like DIALOG POPUP, the last parameters for this new popup are the X, and Y that you supply. For a taskicon when you right click you usually just send the mousepos as the X, Y values.
POPUP <menu items>,X,Y,<optional style> |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Sep 16, 2003 1:28 pm Post subject: |
|
|
| PGWARE wrote: | Pricing hasn't been determined yet; but it won't be anywhere near vdsipp or vdsobj pricing since it's a smaller dll.
As to how the popup will appear, it will work just like DIALOG POPUP, the last parameters for this new popup are the X, and Y that you supply. For a taskicon when you right click you usually just send the mousepos as the X, Y values.
POPUP <menu items>,X,Y,<optional style> |
Prakash,
Why don't you have your DLL capture the mouse position so that these perameters are optional if they are not used? You can use the GetCursorPos API to do this. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1567
|
Posted: Tue Sep 16, 2003 1:31 pm Post subject: |
|
|
It's already implemented The default is to use the current mouse position if nothing is inputted. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Sep 16, 2003 1:35 pm Post subject: |
|
|
Thats cool Prakash:) _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1567
|
Posted: Tue Sep 16, 2003 2:50 pm Post subject: |
|
|
Good thing I did some bug testing On taskicons the popup menu wouldn't disappear when I clicked on desktop or any other Window. Fixed that pretty easily. Now what's left is more bug testing and writing up the documentation. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1567
|
Posted: Tue Sep 16, 2003 7:18 pm Post subject: |
|
|
Well heres the good news - dll is finished.
The bad news - the dll isn't small at all. Compressed this dll weighs in at 189 Kb, uncompressed around 415 kb. The problem is the component I'm using for the XP/Office style requires the form unit in Delphi,without it the component chokes and dies. I'll need to take a look at the component deeply and remove the unnecessary code it has (which is quite alot) and then see if I can bypass the requirement for the forms unit. If I can remove the forms unit I'm suspecting the dll to jump down well below 100kb. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1567
|
|
| Back to top |
|
 |
|