Old 8th March 2019, 18:18   #1
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 342
Problem in EM_SETBKGNDCOLOR

hi
i have problem with change the RichEdit color:

In principle Color 0x008899 a range of blue, but when i set RichEdit color to 0x008899 i see the yellow color.



HTML Code:
!include "MUI2.nsh"

!insertmacro MUI_LANGUAGE English
Page Custom nsDialogsPage



Function nsDialogsPage

	  nsDialogs::Create 1018
	  Pop $0
	  ${IF} $0 == error
		Abort
	  ${EndIF}


	${NSD_CreateRichEdit} 0 0 753 340 "" 
	Pop $0
	SendMessage $0 ${EM_SETBKGNDCOLOR} 0 0x008899
	# Color 008899 is Blue but show yellow

	nsDialogs::Show
FunctionEnd


Section
SectionEnd

but if i Reverse color From the last to the first: 0x008899 to 0x998800
and set that i see the blue color
what is the problem?
r2du-soft is offline   Reply With Quote
Old 8th March 2019, 18:30   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,263
No problem, the parameter is a COLORREF, not just hex RGB.

Quote:
When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form:

0x00bbggrr

The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump