LordNemesis Master


Registrado: 31 Dic 2003Mensajes: 340Ubicación: México
|
Publicado: Mie 01 Jun, 2005 3:04 am Asunto: |
|
|
Prueba esto:
| Código: |
int MessageDlgX(String Msg, TMsgDlgType DlgType,
TMsgDlgButtons Buttons, int HelpCtx=0)
{
TForm* dlg = CreateMessageDialog(Msg, DlgType, Buttons);
const String sIngles[11] = { "Yes", "No", "OK", "Cancel",
"Abort", "Retry", "Ignore", "All", "NoToAll",
"YesToAll", "Help" };
const String sEspanyol[11] = { "&Si", "&No", "Aceptar",
"Cancelar", "&Abortar", "&Reintentar", "&Ignorar",
"&Todo", "N&o a todo", "Si a &todo", "Ay&uda" };
for (int i=0; i<11; i++)
{
TButton* btn = static_cast<TButton*>(
dlg->FindComponent(sIngles[i]) );
if (btn)
btn->Caption = sEspanyol[i];
}
TLabel *label = reinterpret_cast<TLabel*>(dlg->FindComponent("message"));
if(label)
{
label->Font->Size=22;//Aqui puedes meter todo lo que quieras hacer con el Label...
}
switch(DlgType)
{
case mtWarning: dlg->Caption = "Precaución";
case mtError: dlg->Caption = "Error";
case mtInformation: dlg->Caption = "Información";
case mtConfirmation: dlg->Caption = "Confirmación";
case mtCustom: dlg->Caption = Application->Name;
}
int iRet = dlg->ShowModal();
delete dlg;
}
|
Y para probarlo:
| Código: |
MessageDlgX("Mensaje",mtInformation, TMsgDlgButtons()<<mbOK);
|
Espero te haya servido de algo, saludos... _________________ Dirección Municipal de Informática
H. Ayuntamiento de Tijuana
Arriba Lopez Obrador !!!
Los Mexicanos Merecemos Respeto !!! |
|