Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   EDIT control background color (http://forums.winamp.com/showthread.php?t=232742)

{_trueparu^} 7th December 2005 17:03

EDIT control background color
 
1 Attachment(s)
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.

Afrow UK 7th December 2005 17:11

You could just make it read only with ES_READONLY.

-Stu

{_trueparu}^ 7th December 2005 17:20

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 7th December 2005 18:24

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.

Afrow UK 7th December 2005 18:27

Have you tried using:
SendMessage(hCtl, EM_SETBKGNDCOLOR, 1, 0);

-Stu

{_^trueparu} 7th December 2005 21:22

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...
code:
SetBkMode(hdcStatic, TRANSPARENT);
I should have used the "real color"
code:
SetBkColor(hdcStatic, GetSysColor(COLOR_WINDOW));


Thanks for helping anyway.


All times are GMT. The time now is 05:50.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.