With this Example,there are many useful functions!!
And they are easy to use in main();
http://msdn.microsoft.com/en-us/library/windows/desktop/dd373640(v=vs.85).aspx[
^]
#include <Windows.h>
#include <Oleacc.h>
HWINEVENTHOOK g_hook;
#pragma comment( lib,"Oleacc.lib")
int main()
{
MSG msg;
InitializeMSAA();
while ( GetMessage(&msg, NULL, 0, 0) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
ShutdownMSAA();
return 0;
}
In SetWinEventHook()...
You'd better to get the "Process ID" of chrome.exe first.(you can get PID from task manager)
I choice the event from EVENT_OBJECT_VALUECHANGE to EVENT_OBJECT_VALUECHANGE
And in void CALLBACK HandleWinEvent()
You will see get_accName(). It will get the Object Name
But there is another function get_accValue() , you will see url after use it.
get_accName() will get the Object Name.
Example:Address and search bar
get_accValue() will get the Object Value....
This value is URL. Example: http://www.google.com/