CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Threaded View

  1. #1
    Join Date
    Jun 2012
    Posts
    19

    Question Cannot automate/simulate listview click of another process (C++/Win32)

    I am developing an automation tool. I want to click listview item of another process programatically. I have partially succeeded in doing. But I am getting a slightly different output.I have used NMITEMACTIVATE(I have also used PostMessage Instead of SendMessage in the code below).

    Code:
    NMITEMACTIVATE nmbh;
    nmbh.hdr.code = NM_DBLCLK;
    nmbh.hdr.hwndFrom=g_hWnd;
    nmbh.hdr.idFrom=GetDlgCtrlID(g_hWnd);
    nmbh.iItem=itemval;
    nmbh.iSubItem=0;
    nmbh.uNewState=0;
    nmbh.uOldState=0;
    nmbh.uChanged=0;
    nmbh.uKeyFlags=0;
    SendMessage(GetParent(g_hWnd), WM_NOTIFY,(WPARAM)g_hWnd,(LPARAM)&nmbh);
    Last edited by haroonrulz; October 31st, 2013 at 11:38 PM.

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured