I tried the following snippet but it doesn't show up:
HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ICON1));
myeditcontrol.SetIcon(hIcon, FALSE);
I tried the following snippet but it doesn't show up:
HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ICON1));
myeditcontrol.SetIcon(hIcon, FALSE);
The icon associated with a window shows up in the taskbar button, the caption bar, and the Alt+Tab dialog. It is only meaningful for a top-level window.
Calling CWnd::SetIcon for a non top-level window (like a CEdit control) has no effect. If you want to display graphics in an Edit control, you'll have to go with something more capable, like a Rich Edit control (see CRichEditCtrl for an MFC wrapper).