Default attributes in new Win32lib

new topic     » topic index » view thread      » older message » newer message

Hi Derek,

I still did not find out why you generally changed WS_CHILD to
WS_CLIPPINGCHILD (WS_CHILD + WS_CLIPSIBLINGS) for all the controls. The
following code will not work correctly for me.(Win95/Win98) The picture
is from Winlib's DemoRecources folder. What would be wrong with the
commented statements, which should indicate the default attributes
according to Win32lib's documentation?

Regards,
Roland


--  code generated by Win32Lib IDE

include Win32Lib.ew
without warning

--  Window Win
constant Win = createEx( Window, "Window1", 0, 50, 50, 400, 300, 0, 0 )
constant BM = createEx( Bitmap, "Bitmap2", Win, 68, 44, 260, 172, 0, 0 )
setBitmap( BM,"largetiles.bmp")
constant Edit = createEx( EditText, "Hello World", Win,4,156,144,32,0,0)
--constant Edit = createEx( EditText, "Hello World", Win,4,156,144,32,
-- {WS_CHILD, WS_VISIBLE,ES_AUTOHSCROLL,ES_LEFT,WS_BORDER,WS_TABSTOP},0)
setHint( Edit,"This is an EditText")
setFont( Edit,"Arial",12,Normal+Bold)
setBitmap( Edit,"largetiles.bmp")
constant PB = createEx( PushButton, "Exit", Win,268, 64, 104, 36, 0, 0 )
--constant PB = createEx( PushButton, "Exit", Win, 268, 64, 104, 36,
--  {WS_CHILD,WS_VISIBLE,BS_PUSHBUTTON,WS_TABSTOP}, 0 )
setFont( PB,"Arial",12,Normal+Bold)

procedure Win_onAfterEvent (integer self, integer event, sequence params)
sequence result
   setPenWidth(Win,3)
   drawLine(Win, 10,10,390,260)
   setFont(Win, "Arial", 10, Bold+Italic)
   result=drawText(Win,"Fourscore and twenty years ago, our fathers,...",
            {5,50, 140, 120}, DT_WORDBREAK, 4, 0, 0)
end procedure
setHandler( Win, w32HAfterEvent, routine_id("Win_onAfterEvent"))

procedure PB_onClick (integer self, integer event, sequence params)
      closeWindow(Win)
end procedure
setHandler( PB, w32HClick, routine_id("PB_onClick"))

WinMain( Win,Normal )

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu