⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myheader.h

📁 caro program is written by VC++ and AI
💻 H
字号:
#ifndef __MYHEADER_H__
#define __MYHEADER_H__


#ifdef __cplusplus
extern "C" {
#endif

#define _WIN32_WINNT 0x0501

#include <windows.h>
#include <Mmsystem.h>

// Need for void SetWindowTransparent
#define WS_EX_LAYERED 0x80000 
#define LWA_COLORKEY	0x01
#define LWA_ALPHA	0x02 
// end

////////////////////////////////////////////////////////////////////////////////
// Draw My Rectangle
// HDC, left , top, right, bottom, Color Pen, Color Brush
void MyRectangle(HDC hDC,int a,int b,int c,int d,COLORREF crPen,COLORREF crBrush);

////////////////////////////////////////////////////////////////////////////////
// Draw My Rectangle Extended
// HDC, left , top, right, bottom, Pen Style, Pen Width, Color Pen, Color Brush
void MyRectangleEx(HDC hDC,int a,int b,int c,int d,int iPenStyle, int iPenWidth,COLORREF crPen,COLORREF crBrush);

////////////////////////////////////////////////////////////////////////////////
// Draw My Frame
// HDC, left , top, right, bottom, Color Pen
void MyFrame(HDC hDC,int a,int b,int c,int d,COLORREF crPen) ;

////////////////////////////////////////////////////////////////////////////////
// Draw My Frame Extended
// HDC, left , top, right, bottom, Pen Style, Pen Width, Color Pen
void MyFrameEx(HDC hDC,int a,int b,int c,int d,int iPenStyle, int iPenWidth,COLORREF crPen) ;

////////////////////////////////////////////////////////////////////////////////
// Draw My Line
// HDC, left , top, right, bottom, Color Pen, Color Brush
void MyLine(HDC hDC,int a,int b,int c,int d,COLORREF crPen);

////////////////////////////////////////////////////////////////////////////////
// Draw My Line Extended
// HDC, left , top, right, bottom, Color Pen, Color Brush
void MyLineEx(HDC hDC,int a,int b,int c,int d,int iPenStyle, int iPenWidth, COLORREF crPen) ;

////////////////////////////////////////////////////////////////////////////////
// Draw My Ellipse
// HDC, left , top, right, bottom, Color Pen, Color Brush
void MyEllipse(HDC hDC,int a,int b,int c,int d,COLORREF crPen,COLORREF crBrush);

////////////////////////////////////////////////////////////////////////////////
// Draw My Ellipse Extended
// HDC, left , top, right, bottom, Pen Style, Pen Width, Color Pen, Color Brush
void MyEllipseEx(HDC hDC,int a,int b,int c,int d,int iPenStyle, int iPenWidth,COLORREF crPen,COLORREF crBrush);
////////////////////////////////////////////////////////////////////////////////
// Set Window Transparent
// hwnd : handle of window ; factor : transparent percent
// Note : Need #define WINVER 0x0500 before call #include <myheader.h>
void SetWindowTransparent(HWND hwnd,char factor);

////////////////////////////////////////////////////////////////////////////////
// Init Open Common Dialog 
BOOL OpenFileDlg (HWND hwnd, PTSTR pstrFilter, PTSTR pstrFileName);

////////////////////////////////////////////////////////////////////////////////
// Init Save Common Dialog 
BOOL SaveFileDlg (HWND hwnd, PTSTR pstrFilter, PTSTR pstrFileName);

////////////////////////////////////////////////////////////////////////////////
// Init Color Common Dialog 
CHOOSECOLOR ChooseColorDlg (HWND hwnd, COLORREF crResult);

/////////////////////////////////////////////////////////////////////////////////
// Track Mouse Event ( Need for WM_MOUSELEAVE -- This function send this message when mouse leave hWnd )
BOOL CheckMouseLeave(HWND hWnd) ;

////////////////////////////////////////////////////////////////////
// Rotate Point ( Center , Radius, Angle )
POINT RotatePoint(POINT pCenter, int iRadius, int iAngle);


#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -