Page 2 of 2

Re: EASYPTR4 - Minimum menu size

Posted: Mon Aug 08, 2016 4:00 am
by Giorgio Garabello
pjw wrote:Hi Giorgio,

I sent a reply to ql-users, but it takes forever for my mails to arrive there, so I'll copy it here, in case you need this info now:

Well, then you need to PEEK the window definition [WD] rather than the window working definition [WWD]. EasyPtr prepends its own header to the WD. I think its always 28b long, in which case the standard/minimum size can be found at

WD = APPA(<menu name>)
minx = PEEK_W(WD + 28): miny = PEEK_W(WD + 30)

This is not a universal formula, mind you, as more than one layout may be defined (the menu designer will know). However, I'll leave that as an excercise for now.. Check out the excellent QPTR manual for details, and use EasySource to dissemble your EasyMen menus.

Per

It seems to work, but it needs a _app files, I'm looking for something that works both with _cde, _app and _men files

Re: EASYPTR4 - Minimum menu size

Posted: Tue Aug 09, 2016 11:04 pm
by pjw
Giorgio,

Try:

Code: Select all

ch = fopen('con')

rem Get the WD directly via the WWD
adr = mwdef(#ch): madr = peek_l(adr + 4)
xmin% = peek_w(madr): ymin% = peek_w(madr + 2)

..
mdraw#ch; 'my_menu',..
Arguments and provisos as previously noted.

Per

Re: EASYPTR4 - Minimum menu size

Posted: Wed Aug 10, 2016 9:35 am
by Giorgio Garabello
pjw wrote:Giorgio,

Try:

Code: Select all

ch = fopen('con')

rem Get the WD directly via the WWD
adr = mwdef(#ch): madr = peek_l(adr + 4)
xmin% = peek_w(madr): ymin% = peek_w(madr + 2)

..
mdraw#ch; 'my_menu',..
Arguments and provisos as previously noted.


Per

This solution is exactly what I wanted.
Thanks to everyone for their time and commitment .


Giorgio