Thread: How To Change Caption's On A Button When It Is Click ?

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    13

    Question How To Change Caption's On A Button When It Is Click ?

    Good day !

    Let say if I have a button with captions "OK" on it

    What should I do to change to captions to others when I click on it ? Let say "KO" ?

    Thanks a lot !

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    You can either use

    SetDlgItemText(YourDlgHandle,YourButtonID,"KO");

    or you can get the handle of your button using GetDlgItem() and set the text with SetWindowText().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with C program
    By ChrisH in forum C Programming
    Replies: 38
    Last Post: 11-13-2004, 01:11 AM
  2. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  3. disabling button in another prog
    By timmygax in forum Windows Programming
    Replies: 11
    Last Post: 10-29-2001, 03:40 PM
  4. Unselecting a selected button in C++Builder 5
    By Frozen_solid in forum Windows Programming
    Replies: 4
    Last Post: 09-25-2001, 07:57 PM
  5. Replies: 2
    Last Post: 09-04-2001, 02:12 PM