diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-07-30 07:58:04 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-07-30 07:58:04 +0000 |
commit | 17dfe10ea01cbf95c6697aff6040733e86ae376a (patch) | |
tree | 4087adca58061b9e96844f31496ec77dbf723087 /plugins/Msg_Export/src | |
parent | e270295e45b14cd3405d94b1184f4242737c5cf3 (diff) |
cleaner fix for revision 1266
git-svn-id: http://svn.miranda-ng.org/main/trunk@1272 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Msg_Export/src')
-rwxr-xr-x | plugins/Msg_Export/src/FileViewer.cpp | 14 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/main.cpp | 6 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 20 |
3 files changed, 20 insertions, 20 deletions
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 32f7d23f58..35d3c24df7 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -876,7 +876,7 @@ bool bAdvancedCopy(HWND hwnd) LRESULT CALLBACK EditSubclassProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLongPtr(hwnd, -21);
+ CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch( msg )
{
case WM_CONTEXTMENU:
@@ -1073,15 +1073,15 @@ void SetRichEditFont(HWND hRichEdit, bool bUseSyntaxHL ) // Developer : KN
/////////////////////////////////////////////////////////////////////
-static BOOL CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLongPtr(hwndDlg,-21);
+ CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
switch (msg)
{
case WM_INITDIALOG:
{
- SetWindowLongPtr(hwndDlg,-21,lParam);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lParam);
CLHistoryDlg * pclDlg = (CLHistoryDlg *)lParam;
#ifdef _UNICODE
EnableWindow( GetDlgItem( hwndDlg , IDC_FV_FIND ) , FALSE );
@@ -1090,7 +1090,7 @@ static BOOL CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LP (LPARAM)LoadIcon( hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE)));
HWND hRichEdit = GetDlgItem( hwndDlg , IDC_RICHEDIT );
- pclDlg->wpOrigEditProc = (WNDPROC) SetWindowLongPtr( hRichEdit, -4, (LONG) EditSubclassProc);
+ pclDlg->wpOrigEditProc = (WNDPROC) SetWindowLongPtr( hRichEdit, GWLP_WNDPROC, (LONG) EditSubclassProc);
SetWindowLongPtr( hRichEdit, GWLP_USERDATA, (LONG) pclDlg );
@@ -1180,7 +1180,7 @@ static BOOL CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LP LeaveCriticalSection( &csHistoryList );
delete pclDlg;
- SetWindowLongPtr(hwndDlg,-21,NULL);
+ SetWindowLongPtr(hwndDlg,GWLP_USERDATA,NULL);
return 0;
}
case WM_DESTROY:
@@ -1403,7 +1403,7 @@ static BOOL CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LP bool bShowFileViewer( HANDLE hContact )
{
CLHistoryDlg * pcl = new CLHistoryDlg( hContact );
- pcl->hWnd = CreateDialogParam( hInstance,MAKEINTRESOURCE(IDD_FILE_VIEWER),NULL,(DLGPROC)DlgProcFileViewer,(LPARAM)pcl);
+ pcl->hWnd = CreateDialogParam( hInstance,MAKEINTRESOURCE(IDD_FILE_VIEWER),NULL,DlgProcFileViewer,(LPARAM)pcl);
if( pcl->hWnd )
{
EnterCriticalSection( &csHistoryList );
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index d7854d6d36..53489fb0fc 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -78,7 +78,7 @@ PLUGININFOEX pluginInfo = { // Developer : KN
/////////////////////////////////////////////////////////////////////
-static int ShowExportHistory(WPARAM wParam,LPARAM /*lParam*/)
+static INT_PTR ShowExportHistory(WPARAM wParam,LPARAM /*lParam*/)
{
if( bUseInternalViewer() )
{
@@ -339,7 +339,7 @@ int __declspec(dllexport)Load() if( bReplaceHistory )
{
- hServiceFunc = CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY,(MIRANDASERVICE)ShowExportHistory); //this need new code
+ hServiceFunc = CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY,ShowExportHistory); //this need new code
/* if( hServiceFunc )
{
int *disableDefaultModule=(int*)CallService(MS_PLUGINS_GETDISABLEDEFAULTARRAY,0,0);
@@ -360,7 +360,7 @@ int __declspec(dllexport)Load() if( ! hServiceFunc )
{
- hServiceFunc = CreateServiceFunction(MS_SHOW_EXPORT_HISTORY,(MIRANDASERVICE)ShowExportHistory);
+ hServiceFunc = CreateServiceFunction(MS_SHOW_EXPORT_HISTORY,ShowExportHistory);
}
if( ! hServiceFunc )
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 81eae0979b..029a21fc45 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -668,7 +668,7 @@ void OpenHelp(HWND hwndDlg) // Developer : KN
/////////////////////////////////////////////////////////////////////
-static BOOL CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
// Used to prevent sending the PSM_CHANGED to miranda
// when initilizing
@@ -1158,7 +1158,7 @@ static BOOL CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, {
case CDDS_PREPAINT:
{
- SetWindowLongPtr(hwndDlg, 0, CDRF_NOTIFYITEMDRAW);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CDRF_NOTIFYITEMDRAW);
return true;
}
case CDDS_ITEMPREPAINT:
@@ -1167,7 +1167,7 @@ static BOOL CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, {
lplvcd->clrText = RGB( 0 , 0 , 255 );
}
- SetWindowLongPtr(hwndDlg, 0, CDRF_NEWFONT);
+ SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CDRF_NEWFONT);
return true;
}
}
@@ -1272,7 +1272,7 @@ BOOL bApplyChanges2( HWND hwndDlg ) // Developer : KN
/////////////////////////////////////////////////////////////////////
-static BOOL CALLBACK DlgProcMsgExportOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK DlgProcMsgExportOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static BOOL bWindowTextSet = FALSE;
@@ -1466,18 +1466,18 @@ int OptionsInitialize(WPARAM wParam,LPARAM /*lParam*/) odp.position = 100000000;
odp.hInstance = hInstance;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGEXPORT);
- odp.flags = ODPF_BOLDGROUPS;
- odp.pszTitle = LPGEN("Message export");
- odp.pszGroup = LPGEN("Plugins");
+ odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.ptszTitle = LPGENT("Message export");
+ odp.ptszGroup = LPGENT("Plugins");
odp.groupPosition = 100000000;
- odp.pfnDlgProc = (DLGPROC)DlgProcMsgExportOpts;
+ odp.pfnDlgProc = DlgProcMsgExportOpts;
Options_AddPage(wParam,&odp);
odp.position = 100000001;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSGEXPORT2);
- odp.pszTitle = LPGEN("Message export2");
- odp.pfnDlgProc = (DLGPROC)DlgProcMsgExportOpts2;
+ odp.ptszTitle = LPGENT("Message export2");
+ odp.pfnDlgProc = DlgProcMsgExportOpts2;
Options_AddPage(wParam,&odp);
return 0;
}
|