各位大侠,怎么才能把一个窗口的类名给提取出来啊或者把WNDCLASS能取出来也行,高手们帮忙小弟急着用.

解决方案 »

  1.   

    get window handle first ,then use
    int GetClassName(
      HWND hWnd,           // handle to window
      LPTSTR lpClassName,  // class name
      int nMaxCount        // size of class name buffer
    );
      

  2.   


    GetClassName(HWND hWnd,LPTSTR lpClassName,int nMaxCount);
    //find the class name of the window;
    //hWnd: the handle of the window;
    //lpClassName: pointer to a char buffer to receive the class name;
    //nMaxCount: byte count of the buffer;See also:
    GetClassInfo
    GetClassInfoEx
    GetClassLong
    GetWindowLong
    ...