RE: Win32Lib v0.60.6 available

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

CoJaBo wrote:

[snip]
> Also, I am trying to change a WS_POPUP window into a normal window,
> but the titlebar still isn't displayed. Is there a way to do this?
> }}}
<eucode>
> 
> include Win32Lib.ew
> without warning
> 
>
> --------------------------------------------------------------------------------
> --  Window w
> sequence IDEFlags
> IDEFlags = classDefaults(Window, { {1, {WS_SYSMENU}},{2, {0}} } )
> constant w = createEx( Window, "Window1", 0, Default, Default, 400, 274,
> {WS_POPUP}, 0 )
> constant PushButton2 = createEx( PushButton, "Should make this a normal
> window", w, 164, 92, 172, 28, 0, 0 )
> constant PushButton3 = createEx( PushButton, "exit", w, 68, 60, 88, 28, 0, 0 )
> ---------------------------------------------------------
>
> --------------------------------------------------------------------------------
> procedure PushButton3_onClick (integer self, integer event, sequence
> params)--params is ()
> closeWindow(w)
> end procedure
> setHandler( PushButton3, w32HClick, routine_id("PushButton3_onClick"))
>
> --------------------------------------------------------------------------------
> procedure PushButton2_onClick (integer self, integer event, sequence
> params)--params is ()
> removeStyle(w,WS_POPUP)
> 
> addStyle(w,{WS_DLGFRAME+WS_SYSMENU+WS_MINIMIZEBOX,
> WS_EX_DLGMODALFRAME})
> end procedure
> setHandler( PushButton2, w32HClick, routine_id("PushButton2_onClick"))
> 
> 
> WinMain( w,Normal )
> </eucode>
{{{

> 

You might like to add WS_CAPTION to the new flags. eg...

  addStyle(w,{ w32or_all({WS_DLGFRAME,
                          WS_CAPTION,  --<<<<
                          WS_SYSMENU,
                          WS_MINIMIZEBOX}),
               WS_EX_DLGMODALFRAME})


-- 
Derek Parnell
Melbourne, Australia

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

Search



Quick Links

User menu

Not signed in.

Misc Menu