LInet::SetImageWindow
#include "ltwrappr.h"
L_VOID LInet::SetImageWindow(hWnd)
|
HWND hWnd; |
/* image window handle */ |
Sets the window used to display a received image.
|
Parameter |
Description |
|
hWnd |
Handle of the window used to display a received image. |
Returns
None.
Comments
This function can be used to display received images.
Required DLLs and Libraries
|
LTNET For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
|
Functions: |
Example
// a user defined class derived from LInet should be used to support the
// OnImageReceived callback function
// suppose it was named as LUserInet
class LUserInet : public LInet
{
protected:
virtual L_INT OnImageReceived(LInet *plConnection, L_INT nError, LBitmapBase *pBitmap);
};
L_INT LInet__SetImageWindowExample(HWND hWnd)
{
L_INT nRet;
LUserInet UserInet;
LInet* plRemote;
LBitmapBase Bitmap;
// First side will send a bitmap.
// connect to LEAD
nRet = UserInet.Connect("207.238.49.190", 1000);
if(nRet != SUCCESS)
return nRet;
plRemote = UserInet.GetFirstItem();
nRet = UserInet.SendBitmap(plRemote, Bitmap.GetHandle(), FILE_CMP, 24, 2, NULL);
if(nRet != SUCCESS)
return nRet;
// Other side to receive the image
// other operations
UserInet.SetImageWindow(hWnd);
// other operations
return SUCCESS;
}
L_INT LUserInet::OnImageReceived(LInet *plConnection, L_INT nError, LBitmapBase *pBitmap)
{
// to let the callback display the image.
LInet::OnImageReceived(plConnection, nError, pBitmap);
return SUCCESS;
}