Update Caption on command button

Started by Dwight Scoles, January 08, 2007, 12:46:51 AM

Previous topic - Next topic

Dwight Scoles

Can anyone tell me if there is a Fire Fly command to update the Caption on a command button?  I have tried to use the following code but do not notice any change being applied to the button:

FF_Control_SetText (HWND_FRMMAIN_CMDNEW, "Save")

I don't see any specific commands under the F8 list so seem to be at a dead end.

Regards,
Dwight

TechSupport

Quote from: Dwight Scoles
FF_Control_SetText (HWND_FRMMAIN_CMDNEW, "Save")

You have chosen the correct function. Are you sure that HWND_FRMMAIN_CMDNEW is a valid handle? Are you using the button on an MDI Child form? If so, then you can not trust the handle to be correct - you need to retrieve it via GetDlgItem, for example:

GetDlgItem(hWndForm, IDC_FORM1_COMMAND1)

Dwight Scoles

Thank you Paul.  I hope your move has gone well!  The boxes are piled high in the pantry with care?  I'm sure it's a different kind of Christmas this year.

I will try your suggestion.  Although the form is a MDI form, this application controls the form generation so only one instance is ever created and that is during application start-up.  There is only one button with the name -- HWND_FRMMAIN_CMDNEW -- and that name was chosen from the F4 object list.  Perhaps I still need to aquire is true handle.

Dwight