21 SetPixel( ps->hdc,
x,
y, (uBit ? 0 : clBackground) );
43 if(xPos > (
UINT)CharacterRect->right || yPos > (
UINT)CharacterRect->bottom)
48 return (uFontRow * 16 + uFontColumn);
55 RECT OldCharacterRect;
66 pCharacterRect = NewCharacterRect;
75 Info->uSelectedCharacter = uNewCharacter;
99 UCHAR uCharacterColumn;
109 hFont =
CreateFontW(13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
L"Tahoma");
120 for(uFontRow = uStartRow; uFontRow <= uEndRow; uFontRow++)
122 for(uFontColumn = uStartColumn; uFontColumn <= uEndColumn; uFontColumn++)
125 uCharacter = uFontRow * 16 + uFontColumn;
139 wsprintfW(szInfoText,
L"%02u = %02X", uCharacter, uCharacter);
143 if(
Info->uSelectedCharacter == uCharacter)
145 clBackground =
RGB(255, 255, 0);
151 clBackground =
RGB(255, 255, 255);
162 for(uCharacterRow = 0; uCharacterRow < 8; uCharacterRow++)
164 for(uCharacterColumn = 0; uCharacterColumn < 8; uCharacterColumn++)
166 uBit =
Info->Font->Bits[uCharacter * 8 + uCharacterRow] << uCharacterColumn & 0x80;
167 DrawCharacterPixel(ps, uCharacter, uCharacterRow, uCharacterColumn, uBit, clBackground);
268 if(
Info->uSelectedCharacter < 239)
273 if(
Info->uSelectedCharacter)
282 if(
Info->uSelectedCharacter < 255)
287 if(
Info->uSelectedCharacter > 15)
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
#define HeapFree(x, y, z)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
INT_PTR CALLBACK EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static const WCHAR szFontBoxesWndClass[]
static VOID SetSelectedCharacter(IN PFONT_WND_INFO Info, IN UINT uNewCharacter, OPTIONAL IN LPRECT NewCharacterRect)
VOID UnInitFontBoxesWndClass(VOID)
BOOL InitFontBoxesWndClass(VOID)
static LRESULT CALLBACK FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect)
VOID CreateFontBoxesWindow(IN PFONT_WND_INFO FontWndInfo)
VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo)
static VOID DrawCharacterPixel(IN PAINTSTRUCT *ps, IN UINT uCharacter, IN UCHAR uRow, IN UCHAR uColumn, IN UCHAR uBit, IN COLORREF clBackground)
static INT FontBoxesHitTest(IN UINT xPos, IN UINT yPos, OUT LPRECT CharacterRect)
static VOID DrawProc(IN PFONT_WND_INFO Info, IN PAINTSTRUCT *ps)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
#define FONT_BOXES_WND_HEIGHT
struct _FONT_WND_INFO * PFONT_WND_INFO
static __inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
#define FONT_BOXES_WND_WIDTH
#define CHARACTER_BOX_PADDING
#define HITTEST_SEPARATOR
#define CHARACTER_BOX_WIDTH
struct _EDIT_GLYPH_INFO * PEDIT_GLYPH_INFO
#define CHARACTER_INFO_BOX_HEIGHT
#define CHARACTER_BOX_HEIGHT
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
PULONG MinorVersion OPTIONAL
PFONT_WND_INFO FontWndInfo
PEDIT_GLYPH_INFO PrevEditGlyphWnd
PEDIT_GLYPH_INFO NextEditGlyphWnd
PEDIT_GLYPH_INFO FirstEditGlyphWnd
PEDIT_GLYPH_INFO LastEditGlyphWnd
#define RtlCopyMemory(Destination, Source, Length)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
HGDIOBJ WINAPI GetStockObject(_In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HFONT WINAPI CreateFontW(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCWSTR)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HWND WINAPI SetFocus(_In_opt_ HWND)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define SetWindowLongPtrW