Cast from Variant to TfrxPictureView

edited 2:34AM in FastReport 4.0
I'm trying to cast a Variant parameter received on the OnUserFunction event into a TfrxPictureView object but with no chance. Any help will be highly appreciated.

Regards

Variant __fastcall THarbourFR::frxReportUserFunction(const UnicodeString MethodName, Variant &Params)
{

Variant Picture = Params.GetElement(1);
TfrxPictureView *Object;

// How to pass Picture to Object? TIA.
}

Comments

  • edited 2:34AM
    iozuniga wrote: »
    I'm trying to cast a Variant parameter received on the OnUserFunction event into a TfrxPictureView object but with no chance. Any help will be highly appreciated.

    Regards

    Variant __fastcall THarbourFR::frxReportUserFunction(const UnicodeString MethodName, Variant &Params)
    {

    Variant Picture = Params.GetElement(1);
    TfrxPictureView *Object;

    // How to pass Picture to Object? TIA.
    }

    Found!!

    int pointer = Params.GetElement(1);
    TfrxPictureView *Pic=reinterpret_cast<TfrxPictureView *>(pointer);

    Regards,

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.