forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Menu items
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Sep 16, 2003 12:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Tue Sep 16, 2003 1:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Sep 16, 2003 1:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Tue Sep 16, 2003 1:31 pm    Post subject: Reply with quote

It's already implemented Smile The default is to use the current mouse position if nothing is inputted.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Sep 16, 2003 1:35 pm    Post subject: Reply with quote

Thats cool Prakash:)
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Tue Sep 16, 2003 2:50 pm    Post subject: Reply with quote

Good thing I did some bug testing Smile 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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Tue Sep 16, 2003 7:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Wed Sep 17, 2003 6:42 am    Post subject: Reply with quote

The dll is now available for download, read more about it at:

http://forum.vdsworld.com/viewtopic.php?p=14669
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group