I have a button(How do I get it's identifier)

This is a discussion on I have a button(How do I get it's identifier) within the Windows Programming forums, part of the Platform Specific Boards category; I have a button. How would I get a button's identifier so I can use BN_CLICKED?...

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question I have a button(How do I get it's identifier)

    I have a button. How would I get a button's identifier so I can use BN_CLICKED?
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    How did you get the button?

    Create it in the resource editor?
    if so you should have its ID. (You created its ID when you created it)

    Coded it on the fly with CreateWindow ect?
    The HMENU of CreateWindow should be set as the ID
    eg (HMENU)ID_MYBUTTON

    This is in WIN32 API with DevStudio (VC)

  3. #3
    Former Member
    Join Date
    Oct 2001
    Posts
    955
    adn if you want the hWnd, you can get it after you call CreateWindow, or its equivalent in MFC

    Oskilian

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  4. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 09:23 PM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM

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