Board index » cppbuilder » Changing Button Caption of a TSaveDialog Dialog?
SVC
![]() CBuilder Developer |
SVC
![]() CBuilder Developer |
Changing Button Caption of a TSaveDialog Dialog?2006-07-11 03:35:05 AM cppbuilder4 Is there a way to change the default button captions of a TSaveDialog dialog (i.e., instead of Save/Cancel say Ok/Cancel)? Tx, S. |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2006-07-11 05:44:00 AM
Re:Changing Button Caption of a TSaveDialog Dialog?
"SVC" < XXXX@XXXXX.COM >wrote in message
QuoteIs there a way to change the default button captions of a void __fastcall TForm1::SaveDialog1Show(TObject *Sender) { CommDlg_OpenSave_SetControlText(::GetParent(SaveDialog1->Handle), IDOK, "OK"); } Gambit |
SVC
![]() CBuilder Developer |
2006-07-11 10:48:56 PM
Re:Changing Button Caption of a TSaveDialog Dialog?
Thanks. Your suggestion works.
To get a better understanding: 1) How do I figure out the identifier of control in a dialog box? 2) CommDlg_OpenSave_SetControlText function cannot be found in the help unlike the SetDlgItemText function, which is described in the help. What is the difference between these two functions? The former works with the "Save" button while the latter works only with the "cancel" button?!? TIA, S. "Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message Quote
{smallsort} |
Remy Lebeau (TeamB)
![]() CBuilder Developer |
2006-07-12 12:59:23 AM
Re:Changing Button Caption of a TSaveDialog Dialog?
"SVC" < XXXX@XXXXX.COM >wrote in message
QuoteHow do I figure out the identifier of control in a dialog box? QuoteCommDlg_OpenSave_SetControlText function cannot be found in the help // wParam = ID of control to change // return = not used #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004) #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \ (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text) Most macros are not documented by themselves. You have to look at the documentation for the associated message instead, ie: CDM_SETCONTROLTEXT Message msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxmessages/cdm_setcontroltext.asp Quoteunlike the SetDlgItemText function, which is described in the help. QuoteWhat is the difference between these two functions? another. The messages help maintain consistency across versions without applications having to care what the changes are. Gambit |
Timothy H. Buchman
![]() CBuilder Developer |
2006-07-16 03:03:57 AM
Re:Changing Button Caption of a TSaveDialog Dialog?Quote1) How do I figure out the identifier of control in a dialog box? particularly home.att.net/~secondcut/opdlgvcl.htm Note that there's an available header, dlgs.h, used in the latter page, which is helpful. But you also need the frequently-moved MSDN document called "Explorer-Style Control Identifiers" Tim |