ISnapShooterEvents Interface Reference
[HtmlCapture ActiveX Control]

Event interface of HtmlCapture. More...

List of all members.

Public Member Functions

void OnComplete (HtmlCaptureResult nCode)
 This event will be fired once the snapshot process complete (succeeded or failed).
void OnError (long nErrorCode, string strErrorMsg, bool *bCancel)
 This event will be fired once an error occurs.
void OnStatusTextChange (string statusText)
 This event will be fired once the status text of the hidden Web Browser changed.
void OnProgressChange (long nProgress)
 This event will be fired once the progress of the hidden Web Browser changed.
void OnDraw (long hDC, long nWidth, long nHeight)
 This event will be fired when generating the resulting image.


Detailed Description

Event interface of HtmlCapture.

Member Function Documentation

void OnComplete ( HtmlCaptureResult  nCode  ) 

This event will be fired once the snapshot process complete (succeeded or failed).

The param nCode indicates the status of the snap.

Parameters:
nCode A HtmlCaptureResult value indicates the status of the snap. The value equals the return value of ISnapShooter.SnapUrl.
See also:
ISnapShooter.SnapUrl, HtmlCaptureResult

void OnError ( long  nErrorCode,
string  strErrorMsg,
bool *  bCancel 
)

This event will be fired once an error occurs.

Set the param bCancel to FALSE, will ignore the error.

Parameters:
nErrorCode an integer value indicates the error code.
strErrorMsg Error message string corresponding to nErrorCode
bCancel Ignore the error or not.

void OnStatusTextChange ( string  statusText  ) 

This event will be fired once the status text of the hidden Web Browser changed.

Parameters:
statusText The changed status text.

void OnProgressChange ( long  nProgress  ) 

This event will be fired once the progress of the hidden Web Browser changed.

Parameters:
nProgress The progress value within 0 - 100.

void OnDraw ( long  hDC,
long  nWidth,
long  nHeight 
)

This event will be fired when generating the resulting image.

You can use this event to draw your custom items to the resulting image.

Parameters:
hDC The handle of WIN32 device context. Use it as a HDC.
nWidth The width of the resulting image in pixels.
nHeight The height of the resulting image in pixels.
The following pseudo codes show how to use this event. (The pseudo codes draw a rectangle to each resulting image.)
 void OnDrawHandler(long dc, long nWidth, long nHeight)
 {
     HDC hdc = (HDC)dc;
     Rectangle(hdc, 10, 10, nWidth-10, nHeight-10);
 }





Copyright © 2006-2008 Polestar Soft, Inc. All rights reserved.