Thread: Getting the HWND's class

  1. #1
    Registered User
    Join Date
    Jan 2006
    Location
    Latvia
    Posts
    102

    Getting the HWND's class

    Hi.

    How could I find out the class name of a window?

    This is how the window is created:
    Code:
    hEdit=CreateWindowEx(NULL, WC_EDIT, "", WS_CHILD|WS_VISIBLE|WS_BORDER, 2, 35, 100, 15, hwnd, (HMENU)3, HINST, NULL);
    In this case the value I want to get from the given hwnd is WC_EDIT or "Edit". None of the GetWindowLong parameters seem to do this.

    Thanks.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    This may be one hell of a stretch but have you thought about the GetClassName function?

  3. #3
    Registered User
    Join Date
    Jan 2006
    Location
    Latvia
    Posts
    102
    No, I hadn't, but it works.

    Thank you very much.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Class design problem
    By h3ro in forum C++ Programming
    Replies: 10
    Last Post: 12-19-2008, 09:10 AM
  2. Specializing class
    By Elysia in forum C++ Programming
    Replies: 6
    Last Post: 09-28-2008, 04:30 AM
  3. Defining derivated class problem
    By mikahell in forum C++ Programming
    Replies: 9
    Last Post: 08-22-2007, 02:46 PM
  4. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM