- Icon and bitmap controls were being passed the file name string on creation which the control would interpret as the name of a resource, and fail.

- Now passes hInstance to LoadImage call which seems to solve a bizarre sporadic possible Windows bug where the LR_LOADFROMFILE parameter seems to be ignored.


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3078 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
eccles 2003-10-30 23:51:44 +00:00
parent f9c8fd6682
commit a7ed10087c
2 changed files with 6 additions and 2 deletions

View file

@ -689,7 +689,7 @@ LRESULT WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) {
ShellExecute(hMainWindow, NULL, pFields[nIdx].pszState, NULL, NULL, SW_SHOWDEFAULT);
}
}
break;
break;
}
return 0;
}
@ -1043,6 +1043,10 @@ int createCfgDlg()
char *title = pFields[nIdx].pszText;
switch (nType) {
case FIELD_ICON:
case FIELD_BITMAP:
title = NULL; // otherwise it is treated as the name of a resource
break;
case FIELD_CHECKBOX:
case FIELD_RADIOBUTTON:
if (pFields[nIdx].nFlags & FLAG_RIGHT)
@ -1184,7 +1188,7 @@ int createCfgDlg()
LPARAM nImage = 0;
if (pFields[nIdx].pszText) {
pFields[nIdx].hImage = LoadImage(
0,
m_hInstance,
pFields[nIdx].pszText,
nImageType,
(pFields[nIdx].nFlags & FLAG_RESIZETOFIT)