diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-19 08:02:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-19 08:02:41 +0000 |
commit | 08dc125be616458112368e7154b29d5d23f1126e (patch) | |
tree | 1c27ef9b8525f45913c19bb6f4c18a31b6593749 /plugins/StatusPlugins/confirmdialog.cpp | |
parent | a63798c1b60eeb77352323ad4545630cdc5458f2 (diff) |
Unicode in status message plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@1033 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/confirmdialog.cpp')
-rw-r--r-- | plugins/StatusPlugins/confirmdialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 2d93e181fc..da3f428062 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -33,7 +33,7 @@ struct TConfirmSetting : public PROTOCOLSETTINGEX {
memcpy( this, &x, sizeof(PROTOCOLSETTINGEX));
if ( szMsg )
- szMsg = _strdup( szMsg );
+ szMsg = _tcsdup( szMsg );
}
~TConfirmSetting()
@@ -64,7 +64,7 @@ static INT_PTR CALLBACK StatusMessageDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam mir_free(smsg);
}
}
- else SetDlgItemTextA(hwndDlg, IDC_STSMSG, protoSetting->szMsg);
+ else SetDlgItemText(hwndDlg, IDC_STSMSG, protoSetting->szMsg);
{
TCHAR desc[ 512 ];
@@ -82,9 +82,9 @@ static INT_PTR CALLBACK StatusMessageDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam {
int len = SendMessage(GetDlgItem(hwndDlg, IDC_STSMSG), WM_GETTEXTLENGTH, 0, 0);
if (len > 0) {
- protoSetting->szMsg = ( char* )realloc(protoSetting->szMsg, len+1);
+ protoSetting->szMsg = ( TCHAR* )realloc(protoSetting->szMsg, sizeof(TCHAR)*(len+1));
if (protoSetting->szMsg != NULL)
- GetDlgItemTextA(hwndDlg, IDC_STSMSG, protoSetting->szMsg, len+1);
+ GetDlgItemText(hwndDlg, IDC_STSMSG, protoSetting->szMsg, len+1);
}
SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, (WPARAM)TRUE, 0);
EndDialog(hwndDlg, IDC_OK);
@@ -247,7 +247,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l CallService(MS_SS_GETPROFILE, (WPARAM)profile, (LPARAM)&confirmSettings);
for ( i=0; i < confirmSettings.getCount(); i++ )
if (confirmSettings[i].szMsg != NULL) // we free this later, copy to our memory space
- confirmSettings[i].szMsg = _strdup(confirmSettings[i].szMsg);
+ confirmSettings[i].szMsg = _tcsdup(confirmSettings[i].szMsg);
SetStatusList(hwndDlg);
}
|