taskbar

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

There was some discussion about the taskbar a while ago, and I can't remember
the actual problem...  anyways...  smile

-- hides taskbar on start-up, restores on exit --
-- start demo --
include win32lib.ew

constant
CXFULL=c_func(xGetSystemMetrics,{SM_CXSCREEN}),
CYFULL=c_func(xGetSystemMetrics,{SM_CYSCREEN}),
Win = create( Window,"kick-taskbar",0,0,0,CXFULL,CYFULL,#C80000),
-- new function !
zFindWindow = linkFunc(user32, "FindWindowA", {C_POINTER,C_INT},C_INT)

atom ptr, ok, barhwnd

procedure hide_taskbar()
ptr = allocate_string("Shell_TrayWnd")
barhwnd= c_func( zFindWindow, { ptr, NULL } )
ok = c_func( xShowWindow, {barhwnd, SW_HIDE } )
free(ptr)
end procedure

-- you MUST do this on program exit...  blink
procedure restore_taskbar()
ok = c_func( xShowWindow, {barhwnd, SW_SHOW } )
end procedure

onOpen[Win] = routine_id("hide_taskbar")
onDestroy[Win] = routine_id("restore_taskbar")

WinMain( Win, Maximize )
-- end demo --

http://www.king.igs.net/~wolfritz
http://www.king.igs.net/~wolfritz/tutor.htm

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

Search



Quick Links

User menu

Not signed in.

Misc Menu