Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176

    help calling user32 function

    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)
    Last edited by screwed over; 04-21-2008 at 09:52 AM.

  2. #2
    Join Date
    May 2006
    Posts
    1,443
    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
    it demonstrades what you want to do

    thanks

  3. #3
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176
    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.

  4. #4
    Join Date
    May 2006
    Posts
    1,443
    Quote Originally Posted by screwed over View Post
    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

    there is no licence for it
    just i want to know , does someone share it on a site or elsewhere

    thanks

  5. #5
    Join Date
    May 2006
    Posts
    5,380
    http://www.indigorose.com/forums/sho...t=taskbar+tool


    edit, taskbar info from ams useing user32.dll

    Code:
    hTrayWnd = DLL.CallFunction(_SystemFolder.."\\User32.dll", "FindWindowA", "\"Shell_trayWnd\",\"\"", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
    tbTraySize=Window.GetSize(hTrayWnd)
    tbTrayPos=Window.GetPos(hTrayWnd)
    Last edited by RizlaUK; 04-21-2008 at 12:34 PM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  6. #6
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176
    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.
    Last edited by screwed over; 04-21-2008 at 12:45 PM.

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    you sure.....



    works fine here

    Code:
    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);
    Open your eyes to Narcissism, Don't let her destroy your life!!

  8. #8
    Join Date
    Apr 2007
    Location
    Suffolk, UK
    Posts
    176
    hmmm, it works now, i dont know why it didnt before. thanks a bunch Rizla.

  9. #9
    Join Date
    May 2006
    Posts
    5,380
    lol, no problem
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. buttons disappear
    By mgokkaya in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 04-11-2008, 02:40 PM
  2. function calling error
    By mn80 in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 04-22-2007, 03:09 AM
  3. Problem Calling Dll Function
    By gustavoAUDACES in forum Setup Factory 7.0
    Replies: 0
    Last Post: 05-05-2006, 11:22 AM
  4. Another tough one... Interaction between Web and AMS
    By Agent Jones in forum AutoPlay Media Studio 5.0
    Replies: 13
    Last Post: 08-18-2005, 02:10 PM
  5. Function: Resize & Center an Image
    By kpsmith in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-17-2004, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts