Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want know possible make button with dynamic caption?
For example I have button with caption "Ok" and want this caption update and change.
Is it possible?
Any article or reference for that?
Regards,
Posted

Try a call of :) :
C++
BOOL WINAPI SetWindowText(
  _In_      HWND hButton,
  _In_opt_  LPCTSTR lpString
);
 
Share this answer
 
If you are working in Win32, you can use

C++
// IDC_BUTTON1 is the ID of Button
    // m_hWnd is the window( handle to the dialog) which holds the button.
    ::SetDlgItemText( m_hWnd, IDC_BUTTON1, "NewText"  );
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900