Location:
Search - hbitmap file
Search list
Description: 一种向CBitmap对象读取“*.bmp”文件的快捷方式。
1、建立自己的CBitmap派生类。
2、增加一个“Load from bitmap”的函数:
BOOL CMyBitmap::LoadBitmap(LPCTSTR szFileName)
{
DeleteObject()
HBITMAP hBitmap=NULL
hBitmap=(HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION|LR_DEFAULTSIZE)
return Attach(hBitmap)
}-CBitmap object to a reading of "*. bmp" file shortcuts. One, to build their own CBitmap derived class. 2, add a "Load from bitmap" function : BOOL CMyBitmap : : LoadBitmap (LPCTSTR szFileName) (DeleteObje ct () HBITMAP hBitmap = NULL hBitmap = (HBITMAP) LoadImage (NULL, szFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_D EFAULTSIZE) return Attach (hBitmap);)
Platform: |
Size: 5411 |
Author: 李明 |
Hits:
Description: 一种向CBitmap对象读取“*.bmp”文件的快捷方式。
1、建立自己的CBitmap派生类。
2、增加一个“Load from bitmap”的函数:
BOOL CMyBitmap::LoadBitmap(LPCTSTR szFileName)
{
DeleteObject()
HBITMAP hBitmap=NULL
hBitmap=(HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION|LR_DEFAULTSIZE)
return Attach(hBitmap)
}-CBitmap object to a reading of "*. bmp" file shortcuts. One, to build their own CBitmap derived class. 2, add a "Load from bitmap" function : BOOL CMyBitmap : : LoadBitmap (LPCTSTR szFileName) (DeleteObje ct () HBITMAP hBitmap = NULL hBitmap = (HBITMAP) LoadImage (NULL, szFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION | LR_D EFAULTSIZE) return Attach (hBitmap);)
Platform: |
Size: 5120 |
Author: 李明 |
Hits:
Description: MiniGUI应用例子。
* 使用LoadBitmapFromFile函数装载一个BMP文件,然后使用
* FillBoxWithBitmap函数在主窗口上显示该图片。-MiniGUI application examples.* Use LoadBitmapFromFile function loading a BMP file, then use* FillBoxWithBitmap function in the main window to display the picture.
Platform: |
Size: 203776 |
Author: forrestyu |
Hits:
Description: 从一个.bmp文件中读取数据(包括BITMAPINFOHEADER,调色板和实际图象数据)将其存储在一个全局内存句柄hImgData中,这个hImgData将在以后的图象处理程序中用到。同时填写一个类型为HBITMAP的全局变量hBitmap和一个类型为HPALETTE的全局变量hPalette。这两个变量将在处理WM_PAINT消息时用到,用来显示出位图。-From a. Bmp file to read data (including the BITMAPINFOHEADER, palette and the actual image data) to its stored in a global memory handle hImgData, this hImgData will in future image processing procedures used. At the same time, fill out a type of global variable HBITMAP HBITMAP HPALETTE and a type of global variable hPalette. These two variables will handle WM_PAINT message used to show a bitmap.
Platform: |
Size: 12288 |
Author: 郭宏阳 |
Hits:
Description: 下面的函数LoadBmpFile,其功能是从一个.bmp文件中读取数据(包括BITMAPINFOHEADER,调色板和实际图象数据),将其存储在一个全局内存句柄hImgData中,这个hImgData将在以后的图象处理程序中用到。同时填写一个类型为HBITMAP的全局变量hBitmap和一个类型为HPALETTE的全局变量hPalette。这两个变量将在处理WM_PAINT消息时用到,用来显示位图。该函数的两个参数分别是用来显示位图的窗口句柄,和.bmp文件名(全路径)。当函数成功时,返回TRUE,否则返回FALSE。-The following function LoadBmpFile, its function is from a. Bmp file to read data (including the BITMAPINFOHEADER, palette and the actual image data), its stored in a global memory handle hImgData, this hImgData will in the future plans used as treatment procedures. At the same time, fill out a type of global variable HBITMAP HBITMAP HPALETTE and a type of global variable hPalette. These two variables will be used for treatment WM_PAINT message, used to display bitmaps. The function of two parameters are used to display the bitmap handle of the window, and. Bmp file name (full path). When the function is successful, return TRUE, otherwise return FALSE.
Platform: |
Size: 7168 |
Author: 李战斌 |
Hits:
Description: 项目中用的一个图像处理类 CCooImage,支持以下方法:
BOOL CompareWithBMPFile(LPCTSTR file)
void SetImage(Image* pImage)
BOOL IsCreated()
BOOL SetImage (LPCTSTR strImageFile)
INT GetHeight()
INT GetWidth()
static void DrawTransparentBitmap(HDC hdc, HBITMAP hBitmap, short xStart, short yStart, COLORREF cTransparentColor)
static int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
static BOOL SaveTargetToBMPFile(LPCTSTR szFile, HDC hDC)
BOOL SaveToBMPFile(LPCTSTR szFile)
void TileImage (CRect& rect, UINT nAlphaBlend=100, CDC *drawDC=NULL)
void StretchImage(int actualWidth, int actualHeight,UINT nAlphaBlend=100, CDC *drawDC=NULL)
void ShowImage(INT x=0, INT y=0, UINT nAlphaBlend=100, CDC *drawDC=NULL) -A image process class, have below methods:
BOOL CompareWithBMPFile(LPCTSTR file)
void SetImage(Image* pImage)
BOOL IsCreated()
BOOL SetImage (LPCTSTR strImageFile)
INT GetHeight()
INT GetWidth()
static void DrawTransparentBitmap(HDC hdc, HBITMAP hBitmap, short xStart, short yStart, COLORREF cTransparentColor)
static int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
static BOOL SaveTargetToBMPFile(LPCTSTR szFile, HDC hDC)
BOOL SaveToBMPFile(LPCTSTR szFile)
void TileImage (CRect& rect, UINT nAlphaBlend=100, CDC*drawDC=NULL)
void StretchImage(int actualWidth, int actualHeight,UINT nAlphaBlend=100, CDC*drawDC=NULL)
void ShowImage(INT x=0, INT y=0, UINT nAlphaBlend=100, CDC*drawDC=NULL)
Platform: |
Size: 5120 |
Author: Jack |
Hits:
Description: CDialogSK从MFC的CDialog继承而来,支持如下特征:
1、运行于win2000或者winxp平台上,可以使用任何透明色以透视对话框的区域。
2、运行于win2000或者winxp平台上,可以使得整个对话框透明。
3、使用位图背景。位图可以来自资源文件、bmp或者HBITMAP
4、设置背景类型:标题、中心、伸缩;设置对话框的大小适合位图的大小
5、可以点击对话框的任何部分允许/禁止移动对话框
此程序就是用该类实现了Dialog的外观的改变。-CDialogSK inherited from CDialog of MFC, supports the following features:
1, running on win2000 or winxp platform, you can use any transparent color to the area Perspective dialog box.
2, running on win2000 or winxp platform, you can make the dialog transparent.
3, using the bitmap background. Can come from the resource file bitmap, bmp or HBITMAP
4, set the background type: header, center, stretching size of the dialog for setting the size of the bitmap
5, you can click on any part of the dialog box enable/disable move the dialog box
This procedure is to use the class to achieve a change in the appearance of Dialog.
Platform: |
Size: 68608 |
Author: Doun |
Hits:
Description: 把3D位图模式应用于文本或其他图形的实现源码。EmbossPattern()思路与Emboss()函数相似。-//prototype for default arguments- add this to your header file HBITMAP EmbossPattern( HBITMAP hBitmap, HBITMAP hbmPattern, HPALETTE hPal, BOOL bRaised = TRUE, COLORREF clrHighlight = GetSysColor( COLOR_BTNHIGHLIGHT ), COLORREF clrShadow = GetSysColor( COLOR_BTNSHADOW ) )
Platform: |
Size: 18432 |
Author: yi |
Hits:
Description: 从一个.bmp文件中读取数据(包括BITMAPINFOHEADER,调色板和实际图象数据),将其存储在一个全局内存句柄hImgData中,这个hImgData将在以后的图象处理程序中用到。同时填写一个类型为HBITMAP的全局变量hBitmap和一个类型为HPALETTE的全局变量hPalette。这两个变量将在处理WM_PAINT消息时用到,用来显示位图。该函数的两个参数分别是用来显示位图的窗口句柄,和.bmp文件名(全路径)。当函数成功时,返回TRUE,否则返回FALSE。-From a. Bmp file to read data (including BITMAPINFOHEADER, palette and the actual image data), store it in a global memory handle hImgData, this hImgData in later image processing procedures used. Also fill in a global variable of type HBITMAP hBitmap and a global variable of type HPALETTE hPalette. These two variables will be used when handling the WM_PAINT message, used to display bitmap. The function of the two parameters are used to display the bitmap window handle, and a. Bmp file name (full path). When the function is successful, returns TRUE, otherwise returns FALSE.
Platform: |
Size: 1024 |
Author: 刘旭 |
Hits:
Description: 获取 保存BMP,把内存中的HBITMAP对象保存为本地文件,实现存储当前客户区为图片-Acquisition, preservation BMP. To save memory HBITMAP object to a local file, you can achieve the client area to store the current picture.
Platform: |
Size: 3608576 |
Author: 刘彪 |
Hits: