Hi Anon,

I've just been over all your code again, because it seems like the nearest to a solution so far.

I got to the same point as you, crashing on preview. It's the line my $state = $frame->Show(1);.

I picked out your other bits and pieces and used them selectively, but I got no further than before where I could get the preview to show, but I have to capture the preview EVT_COSE command on exit and handle it manually.

However, two more clues are:

  1. The Printing demonstration command in the demo also uses Wx::PreviewFrame (actually PlPreviewFrame but that doesn't work with this code either) and has no code at all to handle the exit - but it exits perfectly and returns control to the calling window.
  2. The $i_RTC_panel->{printout}->GetDC; which I put in for a test, doesn't fail with a "no such method" style error, but it doesn't return anything (which it should). Just a null instead of the pointer to the MemoryDC associated with the preview.

So I wonder if the two are linked.

Regards

Steve.


In reply to Re^2: wxPreviewFrame error on closing by Steve_BZ
in thread wxPreviewFrame error on closing by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.