Re: Hiding the main MS Window Title Bar

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

I wrote:
> Here is the above written using Arwen:
Straight after posting I realised it could be further simplified:
include arwen.ew
without warning

constant Window1 = create(Window, "Press Escape to toggle", 0, 0, 0, 0, 800,
600, 0),
 w1txt = create(Label,"Press Escape to toggle",0,Window1,10,10,200,25,0),
 w1Hwnd=getHwnd(Window1)

function w1Handler(integer id, integer msg, atom wParam, object lParam)
atom style
    if msg = WM_KEYDOWN
    and wParam = VK_ESCAPE then
	style = c_func(xGetWindowLong,{w1Hwnd, GWL_STYLE })
	style = xor_bits(style,WS_BORDER)
	void = c_func(xSetWindowLong,{w1Hwnd,GWL_STYLE,style})
	void = c_func(xSetWindowPos,{w1Hwnd,0,0,0,0,0,SWP_UPDATECACHE})
    end if
    return 0
end function
setHandler(Window1, routine_id("w1Handler"))

WinMain( Window1, SW_NORMAL )


Regards,
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu