If you useVBProgrammers must displayJPGOrGIFImages are as easy as they are, dragging the image controlFormIn minutes. HoweverC ++If programmers want to display the same image but it is not that easy, do they need to write it by themselves?JPGHow about decompressing the code? Of course not that complicated! This article will discuss howMFCShowJPGOrGIFImage.
UseVBThe reason why the image display program is so easy is that it uses a wide array of image processing controls to get everything you want to do. WhileC ++Programmers have to spend half a day to implement the same functions. In fact,C/C ++Programmers can also use thoseVBThe (or almost identical) image controls used by programmers.VBThe image controls used are actually based on a system-levelCOMClass --IPicture. Below are IPictureMethod description:
Method
Description
Get_Handle
ReturnsWindows GDIHandle
Get_Hpal
Returns the current palette copy of the image object.
Get_Type
Returns the image type of the current image object.
Get_Width
Returns the image width of the current image object.
Get_Height
Returns the Image Height of the current image object.
Render
Draw the specified image part at the specified position and device context
Set_Hpal