Red de conocimiento informático - Material del sitio web - Cómo usar MFC para hacer un visor de imágenes de Windows Solicitar instrucciones en vídeo y código fuente Paso a paso

Cómo usar MFC para hacer un visor de imágenes de Windows Solicitar instrucciones en vídeo y código fuente Paso a paso

Prototipo:

int WINAPI icePub_dispImg(HWND hWnd, char *strImgFilename, int x, int y)

Entrada: hWnd Ventana o controlador de control

strImgFilename para mostrar El nombre del archivo de la imagen

coordenadas x x

coordenadas y y

Salida:

{

typedef int ( WINAPI ICEPUB_DISPIMG)(HWND hWnd, char *strImgFilename, int x, int y);

ICEPUB _DISPIMG *icePub_dispImg = 0

HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll" ) ;

if(hDLLDrv)

{

icePub_dispImg = (ICEPUB_DISPIMG *)GetProcAddress(hDLLDrv, "icePub_dispImg");

}

if(icePub_dispImg != NULL)

icePub_dispImg(m_hWnd, "b.png", 10, 10);

// icePub_dispImg(m_ctrlText. m_hWnd , "b.jpg", 0, 0);

if(hDLLDrv)

FreeLibrary(hDLLDrv

}