Getting the HWND's class

This is a discussion on Getting the HWND's class within the Windows Programming forums, part of the Platform Specific Boards category; Hi. How could I find out the class name of a window? This is how the window is created: Code: ...

  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,263
    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, 08: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
  5. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 01:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21