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. | |
| 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.
| nCode | A HtmlCaptureResult value indicates the status of the snap. The value equals the return value of ISnapShooter.SnapUrl. |
| 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.
| 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.
| statusText | The changed status text. |
| void OnProgressChange | ( | long | nProgress | ) |
This event will be fired once the progress of the hidden Web Browser changed.
| 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.
| 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. |
void OnDrawHandler(long dc, long nWidth, long nHeight) { HDC hdc = (HDC)dc; Rectangle(hdc, 10, 10, nWidth-10, nHeight-10); }