Sign in to follow this  
Followers 0
Aditya

PostMessage to tray

3 posts in this topic

My application is minimized to tray & I am trying to use PostMessage to open it. The code in C++ would be:

::PostMessage(m_hwndTray, WM_COMMAND,  MAKEWPARAM(ID_CLIENT, 0), 0);

where ID_CLIENT is ID of the control of our app, which forces the window to open or show. I am trying to do the same in AutoIT & here is my snippet:

#include <WinAPI.au3>
#include <WindowsConstants.au3>

$hWnd = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
$ID_CLIENT = 32788 ; this is the ID of the control to which message will be sent.

_WinAPI_PostMessage($hWnd, $WM_COMMAND, $ID_CLIENT, 0))

The only problem I have is the MAKEWPARAM macro which gives me the wParam from the ID of the control. How to do this in AutoIT?

Share this post


Link to post
Share on other sites



where ID_CLIENT is ID of the control of our app...

That doesn't sound right for some reason. Where did you get this ID from?

:(


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

That doesn't sound right for some reason. Where did you get this ID from?

The devs, its our app.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0