关于delphi的inherited转换成C++ 的问题
代码如下:TJTCustomButton : public TCustomControl
- Delphi(Pascal) code
procedure TJTCustomButton.SetTransparent(const Value: Boolean);begin inherited; m_Transparent := Value; TransparentChanged(); Repaint();end;
这里inherited转成啥语句呢?
[解决办法]
如果父类没有这个方法,忽略掉这一句。
[解决办法]
KeyDataToShiftState(Message.KeyData) = []
转为cb的写法为
- C/C++ code
KeyDataToShiftState(Message.KeyData) == TShiftState()
[解决办法]
集合类型,不建议直接去比较。
KeyDataToShiftState(Message.KeyData) = []
翻译成:
KeyDataToShiftState(Message.KeyData).Empty()
比较合适。