home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epm603a.zip
/
EPMSMP.ZIP
/
TEXTONLY.E
< prev
next >
Wrap
Text File
|
1994-12-06
|
4KB
|
97 lines
compile if not defined(EPM)
include 'stdconst.e'
defmain -- If being compiled separately, define a DEFMAIN so that
'textonly' arg(1) -- the .ex file can be executed directly. Note that you
compile endif -- won't be able to do a TextOnly Off if used thusly - the
-- old frame size will be lost when the .ex is unlinked.
defc textonly
universal old_frame
compile if EPM32
if upcase(arg(1))='OFF' & old_frame <> '' then
call dynalink32( 'PMWIN',
'#875',
gethwndc(EPMINFO_EDITFRAME) ||
atol(3) || /* HWND_TOP */
substr(old_frame,13, 4) ||
substr(old_frame, 9, 4) ||
substr(old_frame, 5, 4) ||
substr(old_frame, 1, 4) ||
atol(3)) -- SWP_SIZE (1) + SWP_MOVE (2)
return
endif
swp1 = copies(\0, 36)
swp2 = swp1
swpd = swp1
call dynalink32('PMWIN',
'#837',
gethwndc(EPMINFO_EDITCLIENT) ||
address(swp1) )
call dynalink32('PMWIN',
'#837',
gethwndc(EPMINFO_EDITFRAME) ||
address(swp2) )
call dynalink32('PMWIN',
'#837',
atol(1) || -- HWND_DESKTOP
address(swpd) )
x = - ltoa(substr(swp1,17,4),10)
y = - ltoa(substr(swp1,13,4),10)
cx = ltoa(substr(swpd,9,4),10) + ltoa(substr(swp2,9,4),10) - ltoa(substr(swp1,9,4),10)
cy = ltoa(substr(swpd,5,4),10) + ltoa(substr(swp2,5,4),10) - ltoa(substr(swp1,5,4),10)
old_frame = substr(swp2, 5, 16)
call dynalink32( 'PMWIN',
'#875',
gethwndc(EPMINFO_EDITFRAME) ||
atol(3) || /* HWND_TOP */
atol(x) ||
atol(y) ||
atol(cx) ||
atol(cy) ||
atol(3)) -- SWP_SIZE (1) + SWP_MOVE (2)
compile else
if upcase(arg(1))='OFF' & old_frame <> '' then
call dynalink( 'PMWIN',
'WINSETWINDOWPOS',
gethwnd(EPMINFO_EDITFRAME) ||
atoi(0) || atoi(3) || /* HWND_TOP */
substr(old_frame, 7, 2) ||
substr(old_frame, 5, 2) ||
substr(old_frame, 3, 2) ||
substr(old_frame, 1, 2) ||
atoi(3)) /* SWP_MOVE | SWP_SIZE */
return
endif
swp1 = copies(\0,18)
swp2 = swp1
swpd = swp1
call dynalink('PMWIN',
'WINQUERYWINDOWPOS',
gethwnd(EPMINFO_EDITCLIENT) ||
address(swp1) )
call dynalink('PMWIN',
'WINQUERYWINDOWPOS',
gethwnd(EPMINFO_EDITFRAME) ||
address(swp2) )
call dynalink('PMWIN',
'WINQUERYWINDOWPOS',
atol_swap(1) || -- HWND_DESKTOP
address(swpd) )
x = - itoa(substr(swp1,9,2),10)
y = - itoa(substr(swp1,7,2),10)
cx = itoa(substr(swpd,5,2),10) + itoa(substr(swp2,5,2),10) - itoa(substr(swp1,5,2),10)
cy = itoa(substr(swpd,3,2),10) + itoa(substr(swp2,3,2),10) - itoa(substr(swp1,3,2),10)
old_frame = substr(swp2, 3, 8)
call dynalink( 'PMWIN',
'WINSETWINDOWPOS',
gethwnd(EPMINFO_EDITFRAME) ||
atoi(0) || atoi(3) || /* HWND_TOP */
atoi(x) ||
atoi(y) ||
atoi(cx) ||
atoi(cy) ||
atoi(3)) /* SWP_MOVE | SWP_SIZE */
compile endif -- EPM32