|
HDC as unsigned long
Description
READ ONLY
Provides access to the hDC handle of flash movie. You can draw on the HDC using WinAPI GDI functions directly and then place drawn objects using PlaceFromHDC method as sprites (movieclips). Almost all WinGDI functions (DrawText etc..) including bitmaps and other objects are supported.
To get highest quality rendering that is required for complex metafiles and drawings (reports with many objects and gradients, metafiles made by virtual printers etc) you should set HDC_HighQuality and HDC_HighQuality_UseBuffer to True (usage of high quality EMF2SWF mode requires additional "EMF2SWF High Quality License" in registered version of library)
Method converts EMF metafiles into the sprite (movieclip) and places this new sprite(movieclip) to the given depth on the scene.
See also:
Example:
Visual Basic / VBScript / ASP:
W = 640
H = 480
Set Movie = CreateObject("SWFScout.FlashMovie")
Movie.InitLibrary "demo", "demo"
' Movie creating and setting parameters
Movie.BeginMovie 0,0,W,H,1,12,6
Movie.Compressed = true
Movie.SetBackgroundColor 255,255,255
Movie.PlayMetaFileToHDC "PrintedHTML.emf", 0,0,0.25,0.25
Movie.PlaceFromHDC 1
Movie.ShowFrame 1
Movie.EndMovie
Movie.SaveToFile "Metafile.swf"
C#:
C++:
// initialize library
Movie->InitLibrary("demo", "demo");
// start movie generation
Movie->BeginMovie(0,0,640,480,sscTwips, 12,6);
// drawing on a rectangle via WinAPI GDI functions
RECT rRect;
rRect.top = 0; rRect.left= 0; rRect.right= 640; rRect.bottom=480;
long SymbolsCount = 42; // number of symbols in "Hello! Test using .hDC and WinGDI's DrawText" string
DrawText((HDC)Movie->HDC,"Hello! Test using .hDC and WinGDI DrawText",SymbolsCount,&rRect,DT_CENTER);
Movie->PlaceFromHDC(1); // place shape into current depth
Movie->ShowFrame(1); // show 10 frames
Movie->EndMovie(); // end movie generation
Movie->SaveToFile("c:\\Hello_WithhDC.swf"); // save generated SWF into file
Also Check Examples
|