Monday, February 1, 2016

How to draw a picture on the smartphone




            


ImageList_Draw how to use this function?
Reply:
Or how to add a background image dialog box, in the smartphone
Reply:
void DrawImage (HDC hdc, RECT rc, TCHAR szFileImage [])
{
IImagingFactory * pImgFactory = NULL;
IImage * pImage = NULL;

CoInitializeEx (NULL, COINIT_MULTITHREADED);

// Create the imaging factory.
if (SUCCEEDED (CoCreateInstance (CLSID_ImagingFactory,
NULL,
CLSCTX_INPROC_SERVER,
IID_IImagingFactory,
(Void **) & amp; pImgFactory)))
{
// Load the image from the JPG file.
if (SUCCEEDED (pImgFactory- & gt; CreateImageFromFile (
szFileImage,
& Amp; pImage)))
{
// Draw the image.
pImage- & gt; Draw (hdc, & amp; rc, NULL);
pImage- & gt; Release ();
}

pImgFactory- & gt; Release ();
}
CoUninitialize ();
}
Reply:
3q

No comments:

Post a Comment