Board index » cppbuilder » EInvalidOperation

EInvalidOperation

I have a dll quick report that is returning the following error.

Project TestTransrpt.exe raised exception class EInvalid Operation with
message 'control TrInvRpt has no parent window'. Process stopped`

I Create the control with the following;

TTrInvRpt* TrInvRpt = new TTrInvRpt(TrRptDm, pTrCrit,NULL):
then
TrInvRpt->PreviewModal();
delete TrInvRpt;   it never reaches this line

All help appreciated

Marci

 

Re:EInvalidOperation


Quote
> message 'control TrInvRpt has no parent window'. Process stopped`

I don't think you can get more explicit than that.  Your Tr-something
control is a visual component, which means that is has to be placed
somewhere -- on a parent window.  Make sure to put "TrInvRpt->Parent =
blah", blah being usually your form or a panel.

Good luck!

--
Yoto Yotov

Other Threads