Page 1 of 1

Delphi to C++

Posted: 10 Jan 2008, 17:01
by aby
Hi,
I'm trying to convert the Edirot Delphi example to C++.
I couldn't find where TWMCommand is defined. I couldn't write Delphi equivalent snippet.

1) Could you give the details of TWMCommand.

2) Could you write the following Delphi Code in C++.

Thanks.

Sabetay

procedure TfmEntityInspector.ComboBoxWndProc(var Message: TMessage);
begin
case TWMCommand(Message).NotifyCode of
CBN_CLOSEUP:

Posted: 10 Jan 2008, 23:12
by aby
Hi,

I have converted it like the following. But where did you defined TWMCommand Message.

Thanks

Sabetay

void TfmEntityInspector::ComboBoxWndProc(TMessage &Message)
{
TWMCommand *Cmd = dynamic_cast< TWMCommand *> (&Message);
switch (Cmd->NotifyCode ) {
case CBN_CLOSEUP:

Posted: 11 Jan 2008, 13:27
by support
This property was added for compatibility with previous Delphi versions. We recommend to replace it by the following:

TComboBox - class(TComboBoX)
...
published
...
property OnCloseUp: TNotifyEvent;
...
end;

Sergey.

Please post questions to the forum or write to support@cadsofttools.com