Delphi to C++

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
aby
Posts: 81
Joined: 21 May 2007, 13:02
Location: Turkey

Delphi to C++

Post by aby » 10 Jan 2008, 17:01

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:

aby
Posts: 81
Joined: 21 May 2007, 13:02
Location: Turkey

Post by aby » 10 Jan 2008, 23:12

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:

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 11 Jan 2008, 13:27

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

Post Reply