| View previous topic :: View next topic |
| Author |
Message |
Sabetay Toros Guest
|
Posted: Sat Apr 14, 2007 12:18 am Post subject: Delphi to C++ |
|
|
I'll appreciate very much if someone can translate the following Delphi
code to C++.
Thanks
Sabetay
var
TBXTheme: TTBXTheme;
M: TMessage;
begin
TBXTheme := GetTBXTheme('SpectrumXP');
with TTBXSpectrumXPTheme(TBXTheme) do
begin
WindowCl := clGreen;
HighlightCl := clLime;
BtnFaceCl := clGreen;
BtnShadowCl := clGreen;
BtnHighlightCl := clGreen;
HighlightTextCl := clGreen;
BtnTextCl := clLime;
GrayTextCl := clLime;
MenuTextCl := clLime;
WindowFrameCl := clTeal;
WindowTextCl := clLime;
end;
M.Msg := TBX_SYSCOMMAND;
M.WParam := TSC_VIEWCHANGE;
M.LParam := 0;
M.Result := 0;
TBXTheme.Dispatch(M);
TBXSetTheme('SpectrumXP'); |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Apr 14, 2007 12:32 am Post subject: Re: Delphi to C++ |
|
|
"Sabetay Toros" <bilsarbiz (AT) ttnet (DOT) net.tr> wrote in message
news:461fd7e9$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I'll appreciate very much if someone can translate the
following Delphi code to C++.
|
{
TTBXTheme *TBXTheme = GetTBXTheme("SpectrumXP");
TTBXSpectrumXPTheme *XPTheme =
static_cast<TTBXSpectrumXPTheme*>(TBXTheme);
XPTheme->WindowCl = clGreen;
XPTheme->HighlightCl = clLime;
XPTheme->BtnFaceCl = clGreen;
XPTheme->BtnShadowCl = clGreen;
XPTheme->BtnHighlightCl = clGreen;
XPTheme->HighlightTextCl = clGreen;
XPTheme->BtnTextCl = clLime;
XPTheme->GrayTextCl = clLime;
XPTheme->MenuTextCl = clLime;
XPTheme->WindowFrameCl = clTeal;
XPTheme->WindowTextCl = clLime;
TMessage M;
M.Msg = TBX_SYSCOMMAND;
M.WParam = TSC_VIEWCHANGE;
M.LParam = 0;
M.Result = 0;
TBXTheme->Dispatch(&M);
TBXSetTheme("SpectrumXP");
}
Gambit |
|
| Back to top |
|
 |
Clayton Arends Guest
|
Posted: Sat Apr 14, 2007 12:34 am Post subject: Re: Delphi to C++ |
|
|
This is a literal translation:
TTBXTheme* TBXTheme = GetTBXTheme("SpectrumXP");
TTBXSpectrumXPTheme* spectrumTheme =
static_cast <TTBXSpectrumXPTheme*> (TBXTheme);
spectrumTheme->WindowCl = clGreen;
spectrumTheme->HighlightCl = clLime;
spectrumTheme->BtnFaceCl = clGreen;
spectrumTheme->BtnShadowCl = clGreen;
spectrumTheme->BtnHighlightCl = clGreen;
spectrumTheme->HighlightTextCl = clGreen;
spectrumTheme->BtnTextCl = clLime;
spectrumTheme->GrayTextCl = clLime;
spectrumTheme->MenuTextCl = clLime;
spectrumTheme->WindowFrameCl = clTeal;
spectrumTheme->WindowTextCl = clLime;
TMessage M;
M.Msg = TBX_SYSCOMMAND;
M.WParam = TSC_VIEWCHANGE;
M.LParam = 0;
M.Result = 0;
TBXTheme->Dispatch(M);
TBXSetTheme("SpectrumXP");
You can optionally change the first two lines to this one line:
TTBXSpectrumXPTheme* spectrumTheme =
static_cast <TTBXSpectrumXPTheme*> (GetTBXTheme("SpectrumXP"));
.... and then change the dispatch line to:
spectrumTheme->Dispatch(M);
- Clayton |
|
| Back to top |
|
 |
Clayton Arends Guest
|
Posted: Sat Apr 14, 2007 12:35 am Post subject: Re: Delphi to C++ |
|
|
| Quote: | TBXTheme->Dispatch(M);
|
Whoops, this line should have been:
TBXTheme->Dispatch(&M);
- Clayton |
|
| Back to top |
|
 |
|