Can any body tell me how to change a Cancel button to Ok button after a process finished?
(maybe just change the caption of the button? I guess)

Thank you in advance!

Member Avatar for jencas

Put one of the buttons on top of the other and use ShowWindow(SW_SHOW/SW_HIDE)
to show/hide the appropriate button.

(maybe just change the caption of the button? I guess)

Use
SetWindowText()

Member Avatar for jencas

Use
SetWindowText()

This can be dangerous, if OnOK() and OnCancel() do different things...

This can be dangerous, if OnOK() and OnCancel() do different things...

It was sort of assumed that there is only one button and its handler, only the caption changes and the program is aware of the 'state'.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.