Skip to content
⌘ NSIS Forum Archive

EDIT control background color

6 posts

Guest#

EDIT control background color

I know this is not directly related to NSIS, but...

I am making plugin for NSIS what uses makensis and prints the output to it's own console window. The control what gets the output, is a disabled EDIT control and I want to change this EDIT controls background color to the default (non disabled) color. I manage to do this with my limited C/C++ skills, but theres a problem when using the scrollbar *check the attachment*, the text gets all messed up?

I can also post the plugin and the source if necessary.
Guest#
Hmm it is already using ES_READONLY. That changes the EDIT controls background to gray and I want to use the normal background color.
Takhir#
You can use SetClassLong for GCL_HBRBACKGROUND using System plug-in. I not used this, but in one of my projects I had WS_EX_TRANSPARENT RichEdit and it used underlaying window background color (mixed with image 🙂 ), but this looks too complex for NSIS scriprs.
Guest#
Aargh! As usual the solution was so simple that I didn't even think about it (and I spend hours to find the answer 🙁 ).

Instead of using transparent background color for the text...
SetBkMode(hdcStatic, TRANSPARENT);
I should have used the "real color"
SetBkColor(hdcStatic, GetSysColor(COLOR_WINDOW));
Thanks for helping anyway.