c++builder-2009

Implement IDropTarget

可紊 提交于 2019-12-23 03:20:11
问题 I would like to drag and drop files from windows explorer onto my application which is being built in Codegear RAD studio 2009. Then I would like to be able to access data from the object I am dragging and dropping. I believe I have to implement IDropTarget. Can someone please provide an example of how I might implement IDropTarget to achieve this? 回答1: There is a nice example written by Michael Dunn over at codeproject.com which shows how to implement IDropTarget and access data from inside

Are redundant include guards necessary?

江枫思渺然 提交于 2019-12-18 06:56:25
问题 Are 'redundant include guards' necessary in Codegear RAD Studio 2009? Is the compiler smart enough to deal with this on it's own? For example, I might have the following 'include guard' in foo.h: #ifndef fooH #define fooH // ... declaration here #endif and the following 'redundant include guard' in use_foo.h: #ifndef fooH #include "foo.h" #endif Additionally, if the compiler is not smart enough, are 'redundant include guards' necesarry if they are being included in a source file. e.g. use_foo

What happened to TBitBtn and TButton inheritance chain?

吃可爱长大的小学妹 提交于 2019-12-07 07:05:16
问题 I've recently began to upgrade my RAD Studio 2007 project to RAD Studio 2009. One thing I noticed is when seemingly simple code all of a sudden failed to compile. Example Code: class CButtonPopupMenu { // Snip public: void Init( TButton* SrcButton ) { SrcButton->OnClick = OnButtonClick; } private: void __fastcall OnButtonClick( TObject* Sender ) { // Do some button click stuff } }; // Snip TButton button = new TButton( this ); TBitBtn bitBtn = new TBitBtn( this ); CButtonPopupMenu popupButton

Implement IDropTarget

点点圈 提交于 2019-12-06 16:06:58
I would like to drag and drop files from windows explorer onto my application which is being built in Codegear RAD studio 2009. Then I would like to be able to access data from the object I am dragging and dropping. I believe I have to implement IDropTarget. Can someone please provide an example of how I might implement IDropTarget to achieve this? There is a nice example written by Michael Dunn over at codeproject.com which shows how to implement IDropTarget and access data from inside a IDataObject which is used to store data during the drag and drop operation. 来源: https://stackoverflow.com

What happened to TBitBtn and TButton inheritance chain?

旧街凉风 提交于 2019-12-05 12:29:58
I've recently began to upgrade my RAD Studio 2007 project to RAD Studio 2009. One thing I noticed is when seemingly simple code all of a sudden failed to compile. Example Code: class CButtonPopupMenu { // Snip public: void Init( TButton* SrcButton ) { SrcButton->OnClick = OnButtonClick; } private: void __fastcall OnButtonClick( TObject* Sender ) { // Do some button click stuff } }; // Snip TButton button = new TButton( this ); TBitBtn bitBtn = new TBitBtn( this ); CButtonPopupMenu popupButton = new CButtonPopupMenu( button ); CButtonPopupMenu popupBitBtn = new CButtonPopupMenu( bitBtn ); This