Fixed loading localised resources.
authorIain Patterson <me@iain.cx>
Sun, 29 Dec 2013 17:25:54 +0000 (17:25 +0000)
committerIain Patterson <me@iain.cx>
Sun, 29 Dec 2013 18:00:58 +0000 (18:00 +0000)
commit7aa403b0a0d8ecf1e59c9d4ab3709181941e2f4c
tree756bc8cebea9773f55199a13af3ecfe652c3e396
parent04368b24e449523614478537d12747e3ec778f00
Fixed loading localised resources.

We weren't loading the correct resources for non-English languages when
compiled as a Unicode application.

We now explicitly call FindResourceEx(), LoadResource() and
CreateDialogIndirectParam() to ensure the appropriate windows are shown.

We now explicitly pass GetUserDefaultLangID() to FormatMessage(),
falling back to language neutral if it fails.

Resources and messages are now explicitly UTF-16LE.  That means that git
will treat them as binary and refuse to diff them.  To work around that,
add the following to .git/info/attributes:

    *.mc diff=utf16
    *.rc diff=utf16

and the following to .git/config:

    [diff "utf16"]
     textconv = "iconv -f utf-16le -t utf-8"
event.cpp
gui.cpp
messages.mc
nssm.rc
nssm.vcproj