45 #error The pre-processor macro QWIN_GUI must be defined
48#define WIN32_LEAN_AND_MEAN
57 WNDPROC lpfnWndProc, LPCTSTR lpWndClass);
77 HBITMAP hBitmapUp, HBITMAP hBitmapDwn,
82 LPDRAWITEMSTRUCT lpdis);
104 UINT width, UINT height,
105 UINT itemID, BYTE
const bgColor[3]);
109#define GraphicDisplay_setPixel(me_, x_, y_, color_) do { \
110 BYTE *pixelRGB = &(me_)->bits[3*((x_) \
111 + (me_)->src_width * ((me_)->src_height - 1U - (y_)))]; \
112 pixelRGB[0] = (color_)[0]; \
113 pixelRGB[1] = (color_)[1]; \
114 pixelRGB[2] = (color_)[2]; \
117#define GraphicDisplay_clearPixel(me_, x_, y_) do { \
118 BYTE *pixelRGB = &(me_)->bits[3*((x_) \
119 + (me_)->src_width * ((me_)->src_height - 1U - (y_)))]; \
120 pixelRGB[0] = (me_)->bgColor[0]; \
121 pixelRGB[1] = (me_)->bgColor[1]; \
122 pixelRGB[2] = (me_)->bgColor[2]; \
134 UINT segNum, UINT bitmapNum);
137 UINT segmentNum, UINT segmentID);
139 UINT bitmapNum, HBITMAP hBitmap);
141 UINT segmentNum, UINT bitmapNum);
144void DrawBitmap(HDC hdc, HBITMAP hBitmap,
int xStart,
int yStart);
void OwnerDrawnButton_xtor(OwnerDrawnButton *const me)
void OwnerDrawnButton_set(OwnerDrawnButton *const me, int isDepressed)
enum OwnerDrawnButtonAction OwnerDrawnButton_draw(OwnerDrawnButton *const me, LPDRAWITEMSTRUCT lpdis)
void DrawBitmap(HDC hdc, HBITMAP hBitmap, int xStart, int yStart)
void OwnerDrawnButton_init(OwnerDrawnButton *const me, UINT itemID, HBITMAP hBitmapUp, HBITMAP hBitmapDwn, HCURSOR hCursor)
void GraphicDisplay_redraw(GraphicDisplay *const me)
void SegmentDisplay_xtor(SegmentDisplay *const me)
void GraphicDisplay_xtor(GraphicDisplay *const me)
BOOL SegmentDisplay_initBitmap(SegmentDisplay *const me, UINT bitmapNum, HBITMAP hBitmap)
void SegmentDisplay_init(SegmentDisplay *const me, UINT segNum, UINT bitmapNum)
BOOL SegmentDisplay_initSegment(SegmentDisplay *const me, UINT segmentNum, UINT segmentID)
BOOL OwnerDrawnButton_isDepressed(OwnerDrawnButton const *const me)
void GraphicDisplay_clear(GraphicDisplay *const me)
void GraphicDisplay_init(GraphicDisplay *const me, UINT width, UINT height, UINT itemID, BYTE const bgColor[3])
BOOL SegmentDisplay_setSegment(SegmentDisplay *const me, UINT segmentNum, UINT bitmapNum)
HWND CreateCustDialog(HINSTANCE hInst, int iDlg, HWND hParent, WNDPROC lpfnWndProc, LPCTSTR lpWndClass)