| 146 | static void LogMessage(const TCHAR *pStr, BOOL bOEM) { |
| 147 | #else |
| 148 | static void LogMessage(TCHAR *pStr, BOOL bOEM) { |
| 149 | #endif |
| 150 | LVITEM item; |
| 151 | int nItemCount; |
| 152 | if (!g_hwndList) return; |
| 153 | //if (!*pStr) return; |
| 154 | #ifndef UNICODE |
| 155 | if (bOEM == TRUE) OemToCharBuff(pStr, pStr, lstrlen(pStr)); |
| 156 | #endif |
| 157 | nItemCount=(int) SendMessage(g_hwndList, LVM_GETITEMCOUNT, 0, 0); |
| 158 | item.mask=LVIF_TEXT; |
| 159 | item.pszText=(TCHAR *)pStr; |
| 160 | item.cchTextMax=0; |
| 161 | item.iItem=nItemCount, item.iSubItem=0; |
| 162 | ListView_InsertItem(g_hwndList, &item); |
| 163 | ListView_EnsureVisible(g_hwndList, item.iItem, 0); |
| 164 | } |
| 165 | |
| 166 | |
| 167 | void ExecScript(int mode) { |