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)
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
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 UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define CHARACTER_BOX_WIDTH
#define FONT_BOXES_WND_HEIGHT
struct _EDIT_GLYPH_INFO * PEDIT_GLYPH_INFO
static VOID DrawProc(IN PFONT_WND_INFO Info, IN PAINTSTRUCT *ps)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
INT_PTR CALLBACK EditGlyphDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
GLint GLint GLint GLint GLint x
HWND WINAPI SetFocus(_In_opt_ HWND)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define GetWindowLongPtrW
PEDIT_GLYPH_INFO LastEditGlyphWnd
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
PEDIT_GLYPH_INFO NextEditGlyphWnd
VOID EditCurrentGlyph(PFONT_WND_INFO FontWndInfo)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
PEDIT_GLYPH_INFO PrevEditGlyphWnd
static VOID SetSelectedCharacter(IN PFONT_WND_INFO Info, IN UINT uNewCharacter, OPTIONAL IN LPRECT NewCharacterRect)
PEDIT_GLYPH_INFO FirstEditGlyphWnd
static VOID DrawCharacterPixel(IN PAINTSTRUCT *ps, IN UINT uCharacter, IN UCHAR uRow, IN UCHAR uColumn, IN UCHAR uBit, IN COLORREF clBackground)
#define CHARACTER_INFO_BOX_HEIGHT
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static __inline VOID GetCharacterPosition(IN UINT uCharacter, OUT PUINT uFontRow, OUT PUINT uFontColumn)
#define HITTEST_SEPARATOR
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
static INT FontBoxesHitTest(IN UINT xPos, IN UINT yPos, OUT LPRECT CharacterRect)
PFONT_WND_INFO FontWndInfo
VOID CreateFontBoxesWindow(IN PFONT_WND_INFO FontWndInfo)
VOID GetCharacterRect(IN UINT uFontRow, IN UINT uFontColumn, OUT LPRECT CharacterRect)
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)
static LRESULT CALLBACK FontBoxesWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL InitFontBoxesWndClass(VOID)
BOOL WINAPI DeleteDC(_In_ HDC)
struct _FONT_WND_INFO * PFONT_WND_INFO
#define CHARACTER_BOX_HEIGHT
#define CHARACTER_BOX_PADDING
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
GLint GLint GLint GLint GLint GLint y
static const WCHAR szFontBoxesWndClass[]
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
VOID UnInitFontBoxesWndClass(VOID)
#define FONT_BOXES_WND_WIDTH
HWND WINAPI CreateDialogParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define RtlCopyMemory(Destination, Source, Length)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
#define MAKEINTRESOURCEW(i)
#define HeapFree(x, y, z)
static VOID NTAPI 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 WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
PULONG MinorVersion OPTIONAL