From 4bb40702b9c275af3fb6b3ff0ced699d518e8355 Mon Sep 17 00:00:00 2001 From: Alexander Gluzsky Date: Sun, 29 Jul 2012 22:55:05 +0000 Subject: dirty hacks for 64bit compilation (this may nto work at all, but can be compiled) git-svn-id: http://svn.miranda-ng.org/main/trunk@1266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Msg_Export/src/FileViewer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/Msg_Export/src/FileViewer.cpp') diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 191f744571..89925a48f4 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -880,8 +880,7 @@ bool bAdvancedCopy(HWND hwnd) LRESULT CALLBACK EditSubclassProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLong(hwnd,GWL_USERDATA); - + CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLongPtr(hwnd, -21); switch( msg ) { case WM_CONTEXTMENU: @@ -1080,13 +1079,13 @@ void SetRichEditFont(HWND hRichEdit, bool bUseSyntaxHL ) static BOOL CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLong(hwndDlg,GWL_USERDATA); + CLHistoryDlg * pclDlg = (CLHistoryDlg *)GetWindowLongPtr(hwndDlg,-21); switch (msg) { case WM_INITDIALOG: { - SetWindowLong(hwndDlg,GWL_USERDATA,lParam); + SetWindowLongPtr(hwndDlg,-21,lParam); CLHistoryDlg * pclDlg = (CLHistoryDlg *)lParam; #ifdef _UNICODE EnableWindow( GetDlgItem( hwndDlg , IDC_FV_FIND ) , FALSE ); @@ -1095,7 +1094,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, GWL_WNDPROC, (LONG) EditSubclassProc); + pclDlg->wpOrigEditProc = (WNDPROC) SetWindowLongPtr( hRichEdit, -4, (LONG) EditSubclassProc); SetWindowLongPtr( hRichEdit, GWLP_USERDATA, (LONG) pclDlg ); @@ -1185,7 +1184,7 @@ static BOOL CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, LP LeaveCriticalSection( &csHistoryList ); delete pclDlg; - SetWindowLong(hwndDlg,GWL_USERDATA,NULL); + SetWindowLongPtr(hwndDlg,-21,NULL); return 0; } case WM_DESTROY: @@ -1408,7 +1407,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,DlgProcFileViewer,(LPARAM)pcl); + pcl->hWnd = CreateDialogParam( hInstance,MAKEINTRESOURCE(IDD_FILE_VIEWER),NULL,(DLGPROC)DlgProcFileViewer,(LPARAM)pcl); if( pcl->hWnd ) { EnterCriticalSection( &csHistoryList ); -- cgit v1.2.3