Board index » cppbuilder » trying to use a TDragImageList object generates a CodeGuard error

trying to use a TDragImageList object generates a CodeGuard error


2007-03-09 08:53:45 PM
cppbuilder110
In Borland Builder C++ version 6 enterprise, when I execute following code:
TDragImageList* test = new TDragImageList(10,10);
CodeGuard generates following error:
Method called on illegally casted object"
Attempt to access 128 bytes at 0x014682ac. The 'this' pointer points to heap
block 0x014682ac which is 124 bytes long"
What's wrong?
To me it seems that the .hpp file where TDragImageList is defined does not
match the actual implementation in the library.
Any idea?
 
 

Re:trying to use a TDragImageList object generates a CodeGuard error

"Alessandro Cipriano" < XXXX@XXXXX.COM >wrote:
Quote

[...] TDragImageList* test = new TDragImageList(10,10);
Are you trying to create a TDragImage while using Drag & Drop?
If so, that is the wrong approach. Search the archives for one
of several posts by me where I illustrate using a TDragObject.
www.tamaracka.com/search.htm
~ JD
 

Re:trying to use a TDragImageList object generates a CodeGuard error

The question was "why the indicated command generates the error?", I am
quite sure it is not dependent on where it is used.
"JD" < XXXX@XXXXX.COM >ha scritto nel messaggio
Quote

"Alessandro Cipriano" < XXXX@XXXXX.COM >wrote:
>
>[...] TDragImageList* test = new TDragImageList(10,10);

Are you trying to create a TDragImage while using Drag & Drop?

If so, that is the wrong approach. Search the archives for one
of several posts by me where I illustrate using a TDragObject.

www.tamaracka.com/search.htm

~ JD

 

{smallsort}

Re:trying to use a TDragImageList object generates a CodeGuard error

Anyway Mr. JD, thank you for the answer, I have checked the posts you
indicated.
BTW I have used a procedure that works perfectly in Delphi and I simply
translated it in C++.
And it works perfectly in C++ as well, except for the mentioned CodeGuard
error.
"Alessandro Cipriano" < XXXX@XXXXX.COM >ha scritto nel messaggio
Quote
The question was "why the indicated command generates the error?", I am
quite sure it is not dependent on where it is used.

"JD" < XXXX@XXXXX.COM >ha scritto nel messaggio
news:45f363e1$ XXXX@XXXXX.COM ...
>
>"Alessandro Cipriano" < XXXX@XXXXX.COM >wrote:
>>
>>[...] TDragImageList* test = new TDragImageList(10,10);
>
>Are you trying to create a TDragImage while using Drag & Drop?
>
>If so, that is the wrong approach. Search the archives for one
>of several posts by me where I illustrate using a TDragObject.
>
>www.tamaracka.com/search.htm
>
>~ JD
>