Emmanuel Caradec
-
2012-09-05
Here is a patch to add left, center and right alignement on nsDialogs links. I only tested it with windows 7 and I'm not sure how it behave with rtl window. It works well for my purpose though.
Here is how to use it. This code can be added to example.nsi :
${NSD_CreateLink} 300 60 95 22 "Hello there"
pop $R0
System::Call "user32::GetWindowLong(i $R0, i ${GWL_STYLE}) i .r0"
IntOp $0 $0 & 0xFFFFFCFF
IntOp $0 $0 | ${BS_RIGHT}
System::Call "user32::SetWindowLong(i $R0, i ${GWL_STYLE}, i $0)"
As links are buttons, the styles to use are BS_LEFT,BS_CENTER and BS_RIGHT.