Archive: [nsdialogs] Text control border


[nsdialogs] Text control border
  Hello,
Have a problem creating text control using nsDialogs.
I want to have a border, like on the screenshot. Have no idea what style I need to use. Someone knows?

I use this code to create control... but there is no border... WS_BORDER doeasnt work in nsis...

   Var /Global SN_Edit1

${NSD_CreateText} 20u 50u 45u 12u "1234"
Pop $SN_Edit1
${NSD_SetTextLimit} $SN_Edit1 "4"
${NSD_AddStyle} $SN_Edit1 ${WS_CHILD}|${WS_VISIBLE}|${WS_TABSTOP}|${ES_CENTER}
-Pawel

think you can use WS_BORDER, don't think there's something like BS_FLAT for text inputs. however, i'm not sure if you can specify the thickness of the border.

http://msdn.microsoft.com/en-us/libr...8VS.80%29.aspx


WS_BORDER and _not_ WS_EX_CLIENTEDGE


hi, thanks.

${NSD_AddStyle} $SN_Edit1 ${WS_CHILD}|${WS_VISIBLE}|${WS_TABSTOP}|${ES_CENTER}|${WS_BORDER} 
NSIS says that ${WS_BORDER} is unknown variable/constant...
What should I include to script?
I use:
   !include "MUI2.nsh"

!include "Sections.nsh"
!include "nsDialogs.nsh"
!include "WordFunc.nsh"
!include "FileFunc.nsh"
-Pawel

!define WS_BORDER 0x00800000


NSIS compiles code properly, with that definition.
But, the result is not what I want. Control has no black (dark) border...

Thank you guys.
-Pawel


I thought you were a programmer Pawel?

Something like this maybe:

${NSD_CreateText} 20u 50u 45u 12u "1234"
pop $1
System::Call "user32::GetWindowLong(i r1, i ${GWL_EXSTYLE}) i .r0"
IntOp $2 ${WS_EX_CLIENTEDGE} !
IntOp $0 $0 & $2
System::Call "user32::SetWindowLong(i r1, i ${GWL_EXSTYLE}, i $0)"
${NSD_AddStyle} $1 0x00800000

Thanks Anders,
It is something I wanted to see...
Regards,
-Pawel

Ps: I am not a programmer :p (I am an engineer, but not IT)