Has anyone used this control before?
Ive got one loaded on a dialog (non MFC) and im trying to change the colour and font as a test. Here is the code, it returns successfully, but doesnt appear to change anything:
CHARFORMAT2 cfTitle;
cfTitle.cbSize = sizeof(CHARFORMAT2);
cfTitle.crTextColor = RGB(255, 100, 100);
cfTitle.dwMask = CFM_COLOR | CFM_FACE;
strcpy(cfTitle.szFaceName, "Verdana"
;
if (SendMessage(GetDlgItem(g_hWnd, IDC_OUTPUT), EM_SETCHARFORMAT, (WPARAM)SCF_ALL, (LPARAM)&cfTitle) == 0)
MessageBox(g_hWnd, "Failed to set character format!", "SETCHARFORMAT", MB_ICONEXCLAMATION | MB_OK);
Anyone see what im doing wrong? Ive loaded the library, the edit box is displayed, there is text in it, its just that function doesnt do anything for me.
Thanks
Ive got one loaded on a dialog (non MFC) and im trying to change the colour and font as a test. Here is the code, it returns successfully, but doesnt appear to change anything:
CHARFORMAT2 cfTitle;
cfTitle.cbSize = sizeof(CHARFORMAT2);
cfTitle.crTextColor = RGB(255, 100, 100);
cfTitle.dwMask = CFM_COLOR | CFM_FACE;
strcpy(cfTitle.szFaceName, "Verdana"
if (SendMessage(GetDlgItem(g_hWnd, IDC_OUTPUT), EM_SETCHARFORMAT, (WPARAM)SCF_ALL, (LPARAM)&cfTitle) == 0)
MessageBox(g_hWnd, "Failed to set character format!", "SETCHARFORMAT", MB_ICONEXCLAMATION | MB_OK);
Anyone see what im doing wrong? Ive loaded the library, the edit box is displayed, there is text in it, its just that function doesnt do anything for me.
Thanks