Re: A Few Questions
- Posted by C & K L <candk at TICNET.COM> Feb 06, 1999
- 515 views
Thanks, David. I've only recently started getting into the Windows-side of EUPHORIA programming, and your Win32Lib is impressive... but I'm sure you already knew that. When will the final version be made available? And (here's the important question), how much is it going to cost? Thanks, again! ck "Cuny, David" wrote: > > C & K L wrote: > > > Using EXW and Win32Lib, how do I get the current screen resolution? > > Use GetDeviceCaps. Here's a wrapper that should work: > > function getDeviceCaps( integer id, integer parm ) > > atom hDC, result > > -- get the device context of the window > hDC = getDC( id ) > > -- call GetDeviceCaps > result = c_func( xGetDeviceCaps, { hDC, parm } ) > > -- release the device context > releaseDC( id ) > > -- return the result > return result > > end function > > > I'm looking for width and depth... > > The parameters are defined in Win32Lib. Try: > > width = getDeviceCaps( 0, HORZRES ) > depth = getDeviceCaps( 0, VERTRES ) > > Note that an id of zero refers to the *screen*. > > > How do I apply strikethrough formatting to selected text? > > Use the Strikeout attribute. The bad news is that if you want to mix text > styles from within a control, you'll have to end up writing your own MLE > control. I've started work on a Win32Lib editor, but I'm taking a coding > break for right now. > > > Where are the key/input handlers for Win32Lib? I want to make the > > <DELETE> and <BACKSPACE> keys add strikethrough to text instead of > > deleting the text... > > There are three key handlers: > > onKeyPress > onKeyUp > onKeyDown > > Non-printing keys are filtered out of onKeyPress, so you have to use > onKeyUp/onKeyDown to trap your "special" keys. These keys are defined as > VK_DELETE and VK_BACK. > > Hope this helps! > > -- David Cuny