English
Source / code snippets

positions Trackmenu different

 

CompileMarkSeparation
cls
declare h&
h&:=createdialog(%hwnd,"",300,300,400,200)

while 1

    createmenu
    appendmenu 100,"funzt :)"
    trackmenu_byXY_byDialog 0,0,h&
    waitkey

wend

proc trackmenu_byXY

    parameters x&,y&
    declare gmp#,dx&,dy&
    dim gmp#,8
    external("user32","ClientToScreen",%hwnd,gmp#)
    dx&=long(gmp#,0)
    dy&=long(gmp#,4)
    trackmenu (x&-dx&),(y&-dy&)
    dispose gmp#

endproc

proc trackmenu_byMousepos

    declare gmp#,dx&,dy&
    dim gmp#,8
    external("user32","ClientToScreen",%hwnd,gmp#)
    dx&=long(gmp#,0)
    dy&=long(gmp#,4)
    external("user32","GetCursorPos",gmp#)
    trackmenu (long(gmp#,0)-dx&),(long(gmp#,4)-dy&)
    dispose gmp#

endproc

proc trackmenu_byXY_byDialog

    parameters x&,y&,h&
    declare gmp#,dx&,dy&
    dim gmp#,8
    external("user32","ClientToScreen",h&,gmp#)
    dx&=long(gmp#,0)
    dy&=long(gmp#,4)
    trackmenu_byXY x&+dx&,y&+dy&
    dispose gmp#

endproc

salvo, iF.
 
08/19/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.254 Views

Untitledvor 0 min.
RudiB.07/30/21
Georg Teles01/30/16
Andre Rohland02/11/14
Peter Max Müller01/18/12
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie