user63898
user63898

Reputation: 30885

win32 api c++ :How can i color only some text in color?

i have edit text control with text that im loading to it , i want some of the text to be in color x and some in color y , how can it be done? also can i make clickble link inside of the edittext?

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG1 DIALOG 0, 0, 369, 318
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Win32 demo"
FONT 8, "Ms Shell Dlg"
{

    EDITTEXT        IDC_EDIT2, 8, 1, 353, 86, NOT WS_BORDER | ES_AUTOHSCROLL | ES_MULTILINE | ES_READONLY
}

Upvotes: 0

Views: 515

Answers (1)

David Heffernan
David Heffernan

Reputation: 612894

You can't do that in a standard edit control. You need a rich edit control for that. Based on your previous question I do wonder if what you really need is a hyperlink which you can do with the SysLink control.

Upvotes: 3

Related Questions