THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/03/2004 at 05:04, xxxxxxxx wrote:
OK - I slogged my through it (is there any other way!)
Of the two problems I encountered, the first was that the camera FROMFRAME and TOFRAME attributes of the rdata BaseContainer seemed to have no effect. I went into the scene and changed Frame option in the "Output" section of the render dialog from "All Frames" to "Manual" and that seemed to do it. I guess that can also be set programatically with the RDATA_FRAMESEQUENCE container id.
The next problem of the crashing with the dual processor when it hit ShowBitmap was resolved as I went for the more sophisticated GeModalDialog subclass example that Mikael pointed to. Perhaps a separate thread was the necessary addition?
In any case it is all working now with the help of Mikael's ModalRenderer. Thanks Mikael!
There were a couple of things that had to be modified with the recent SDK. The original code is here:
http://www.plugincafe.com/forum_browse.asp?messageID=2884
and the modifications are:
The GeUserArea can now only be gotten by:
gadgetarea = AddUserArea(PREVIEW_AREA_ID, 0, m_bmp->GetBw(), m_bmp->GetBh());
if (gadgetarea) AttachUserArea(ua,gadgetarea);
and AttachImage(PREVIEW_AREA_ID, m_bmp, 0);
no longer works so you have to sublass GeUserArea and define the draw command to draw the bitmap:
void RenderPreviewUserArea::Draw(LONG x1,LONG y1,LONG x2,LONG y2)
{
LONG w = bmp->GetBw();
LONG h = bmp->GetBh();
DrawBitmap(bmp,0,0,w,h,0,0,w,h,0);
}
Where bmp is a member variable of the RenderPreviewUserArea subclass.
Finally, in the GeModalDialog subclass, GetUserArea is no longer valid but the user area is now a member of the dialog subclass (was set by AttachUserArea in the dialog layout). So the UpdatePreview becomes:
// Tell the preview to redraw itself
void UpdatePreview() {
// GeUserArea* ua = GetUserArea(PREVIEW_AREA_ID);
ua.Redraw(TRUE);
}