We are working on converting the wiki to a static website controlled by markdown files in https://github.com/nsis-community. You can already see there how plug-ins will be posted. The end-user interface will still be a website but with a fresh coat of paint. Come meet us at Discord to talk about it.

Refreshing labels after color change

From NSIS Wiki
Jump to navigationJump to search
Author: Afrow UK (talk, contrib)


Description

Requires: inclusion of WinMessages.nsh header file.

When changing the text or color of a label, with transparent as the background color, you will find that the old text or color will still exist under the new one.

To fix this, you need to refresh the label. The easiest way to achieve this is by hiding the label and then showing it again.

Example

  GetDlgItem $R0 $HWND 1200
  ShowWindow $R0 ${SW_HIDE}
  SetCtlColors $R0 00FF00 transparent
  ShowWindow $R0 ${SW_SHOW}

-Stu