Archive: MUI2 and NSD_CreateIPaddress font blow-up


MUI2 and NSD_CreateIPaddress font blow-up
Hi,
Usisng NSIS 2.44.

When I create a custom page that uses NSD_CreateIPaddress while traversing the usual sequence of MUI2 pages, the fonts in the headers and buttons get set to a different size, which of course means that things no longer fit. To emphasis, this change occurs when the custom page is displayed, and is sticky, backing through the pages keeps the new value.

I have a custom onGuiInit inserted, using:
!define MUI_CUSTOMFUNCTION_GUIINIT myGUIInit

Function myGUIInit
${NSD_InitIPaddress}
Pop $0
IntCmp $0 0 0 +3 +3
MessageBox MB_OK "IPaddress control borked"
Abort
FunctionEnd
essentially copied from the wiki.

If I replace NSD_CreateIPaddress with another NSD_Create* function, it all works fine.

Suggestions?

Or should I not use NSD_CreateIPaddress, and instead use a simple text entry and check that for validity?


( for reference, the WiKi page: http://nsis.sourceforge.net/NsDialogs_CreateIPaddress )

hm.. can't say I've seen anything of the sort happening, but I suppose it's possible that *something* in the init routines...


System::Call "*$1(i 8, i ${ICC_INTERNET_CLASSES})"
System::Call 'comctl32::InitCommonControlsEx(i r1) i .r0'

...causes issues.. but I have no idea how.

the alternative - creating your own IP validation bits - is entirely possible but a bit of a PITA to setup.. i.e. checking whether it's a valid IP address, not being able to easily limit user input, etc.

Originally posted by Animaether
the alternative - creating your own IP validation bits - is entirely possible but a bit of a PITA to setup.. i.e. checking whether it's a valid IP address, not being able to easily limit user input, etc.
Yes, I've given up on it, I was going to have an either/or enter name or IP address, but now I will just use a single entry, if it starts with an alpha it's assumed to be a name, and I'll use ValidateIP from http://nsis.sourceforge.net/Validate_IP_function for anything else.