View Full Version : help calling user32 function
screwed over
04-21-2008, 09:50 AM
can anyone help me call the SystemParametersInfoA function found in the user32.dll to obtain the taskbar height? the msdn library is useless and i have no idea how to enter the functions. I'm pretty sure sside or Rizla knows how to do this with dlls but i really need to know how to call other functions from user32.dll and kernel.dll etc. particularly from within my app.
any helps appreciated.
(link to msdn library (http://msdn2.microsoft.com/en-us/library/ms724947.aspx))
reteset
04-21-2008, 10:17 AM
it requires a dll
because return value of that function is a pointer variable
there is an alternative way to do it, if you want to use
if you was installed WinApi plugin, get this WinApi Example_20 (http://www40.websamba.com/winapiplugin/islem_yukle.asp?id=73)
it demonstrades what you want to do
thanks
screwed over
04-21-2008, 10:22 AM
that blows. thanks for the reply. Thanks for the example. also, what is the lisence for WinAPI because i am planning to make some commercial products with it which is one of the main reasons i wanted to learn to do it myself.
reteset
04-21-2008, 10:43 AM
that blows. thanks for the reply. Thanks for the example. also, what is the lisence for WinAPI because i am planning to make some commercial products with it which is one of the main reasons i wanted to learn to do it myself.
you can do what ever you want with it :yes :yes
there is no licence for it
just i want to know , does someone share it on a site or elsewhere
thanks
RizlaUK
04-21-2008, 12:28 PM
http://www.indigorose.com/forums/showthread.php?t=22575&highlight=taskbar+tool
edit, taskbar info from ams useing user32.dll
hTrayWnd = DLL.CallFunction(_SystemFolder.."\\User32.dll", "FindWindowA", "\"Shell_trayWnd\",\"\"", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
tbTraySize=Window.GetSize(hTrayWnd)
tbTrayPos=Window.GetPos(hTrayWnd)
screwed over
04-21-2008, 12:40 PM
thanks for the replies. Thanks for the info on WinApi's license reteset. And thanks mensly for the script from AMS Rizla.
edit.
Rizla. It doesnt work on my side, i get a nil value for tbTraySize.Height.
RizlaUK
04-21-2008, 01:31 PM
you sure.....
works fine here
hTrayWnd = DLL.CallFunction(_SystemFolder.."\\User32.dll", "FindWindowA", "\"Shell_trayWnd\",\"\"", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
tbTraySize=Window.GetSize(hTrayWnd)
tbTrayPos=Window.GetPos(hTrayWnd)
Dialog.Message("Notice", "Tray Height: "..tbTraySize.Height);
Dialog.Message("Notice", "Tray Width: "..tbTraySize.Width);
Dialog.Message("Notice", "Tray X Pos: "..tbTrayPos.X);
Dialog.Message("Notice", "Tray Y Pos: "..tbTrayPos.Y);
screwed over
04-21-2008, 01:39 PM
hmmm, it works now, i dont know why it didnt before. thanks a bunch Rizla.
RizlaUK
04-21-2008, 02:39 PM
lol, no problem
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.