1、得到此菜单的句柄?
我用spy++可以找到此菜单,但是::FindWindow(_T("#32768 (PopupMenu)"), NULL);怎么也找不到2、菜单中每一项的操作
选中,进入子菜单,不选中,单击

解决方案 »

  1.   

    CWnd::FindWindow
    This method retrieves the top-level CWnd whose window class is specified by lpszClassName and whose window name, or title, is specified by lpszWindowName. This method does not search child windows.static CWnd* PASCAL FindWindow( 
    LPCTSTR lpszClassName, 
    LPCTSTR lpszWindowName ); 
    Parameters
    lpszClassName 
    Points to a null-terminated string that specifies the window class name, a WNDCLASS structure. If the lpClassName parameter is NULL, then all class names result as a successful match. 
    lpszWindowName 
    Points to a null-terminated string that specifies the window name, the window title. If the lpWindowName parameter is NULL, then all window names result as a successful match. 第一个参数
    是ClassName
      

  2.   

    SHELL编程。先找到窗口名,然后枚举出所有控件,取出你想要的,并操作。
      

  3.   

    老大们说什么么呀?糊里糊涂的我给别人的一个窗口发右击消息后显示了一个上下文菜单(popmenu),我想找到此菜单的句柄并对其中的项进行操作。(模拟鼠标)我想用findwindow找句柄,找不着,里面的类名是通过spy++看到的:#32768 (PopupMenu)怎么做呀?
      

  4.   

    其实他说得很清楚了。
    我说过了,要进入到目标进程,你想对它干什么就干什么。
    如你所需,hook目标窗口的TrackPopupMenu或改变它的WindowProc处理它的消息。
      

  5.   

    再仔细说说:大家在右健点击窗口最下面的系统任务栏时,会出现一个popmemu(内容有“工具栏”“任务管理器”“锁定任务栏”“属性”“显示桌面”“层叠窗口”等),
    我的程序在向taskbar发一个消息后,桌面会出现这个popmenu,现在想得到这个popmenu的句柄,并对菜单里的项目进行一些动作,比如选定某项(打钩)、进入“工具栏”的子菜单等等操作。请问怎么实现?主要是模拟鼠标的一些操作。