SetWindowLongPtr needs to use LP defines, not L
This commit is contained in:
parent
2396d1c702
commit
339ba7c923
|
@ -312,14 +312,14 @@ void CWin32InputBox::InitDialog()
|
||||||
// Message handler for about box.
|
// Message handler for about box.
|
||||||
INT_PTR CALLBACK CWin32InputBox::DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
INT_PTR CALLBACK CWin32InputBox::DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
CWin32InputBox *_this = (CWin32InputBox *) ::GetWindowLong(hDlg, GWL_USERDATA);
|
CWin32InputBox *_this = (CWin32InputBox *) ::GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||||
WIN32INPUTBOX_PARAM *param = _this ? _this->GetParam() : 0;
|
WIN32INPUTBOX_PARAM *param = _this ? _this->GetParam() : 0;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
::SetWindowLongPtr(hDlg, GWL_USERDATA, lParam);
|
::SetWindowLongPtr(hDlg, GWLP_USERDATA, lParam);
|
||||||
|
|
||||||
_this = (CWin32InputBox *) lParam;
|
_this = (CWin32InputBox *) lParam;
|
||||||
_this->_param->hDlg = hDlg;
|
_this->_param->hDlg = hDlg;
|
||||||
|
|
|
@ -1526,7 +1526,7 @@ INT_PTR CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
{
|
{
|
||||||
case NM_CUSTOMDRAW:
|
case NM_CUSTOMDRAW:
|
||||||
{
|
{
|
||||||
SetWindowLongPtr(hDlg, DWL_MSGRESULT, CustomDraw(lParam));
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CustomDraw(lParam));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1180,7 +1180,7 @@ INT_PTR CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||||
// disable search by keyboard typing,
|
// disable search by keyboard typing,
|
||||||
// because it interferes with some of the accelerators
|
// because it interferes with some of the accelerators
|
||||||
// and it isn't very useful here anyway
|
// and it isn't very useful here anyway
|
||||||
SetWindowLongPtr(hDlg, DWL_MSGRESULT, ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST)));
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, ListView_GetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST)));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case NM_SETFOCUS:
|
case NM_SETFOCUS:
|
||||||
|
@ -1197,12 +1197,12 @@ INT_PTR CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||||
switch (nmcd->dwDrawStage)
|
switch (nmcd->dwDrawStage)
|
||||||
{
|
{
|
||||||
case CDDS_PREPAINT:
|
case CDDS_PREPAINT:
|
||||||
SetWindowLongPtr(hDlg, DWL_MSGRESULT, CDRF_NOTIFYITEMDRAW);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_NOTIFYITEMDRAW);
|
||||||
break;
|
break;
|
||||||
case CDDS_ITEMPREPAINT:
|
case CDDS_ITEMPREPAINT:
|
||||||
if (rswatches[nmcd->dwItemSpec].Type == 'S')
|
if (rswatches[nmcd->dwItemSpec].Type == 'S')
|
||||||
// A separator looks very different from normal watches, it should be drawn in another space while I want to use the highlight bar and the focus frame from the system.
|
// A separator looks very different from normal watches, it should be drawn in another space while I want to use the highlight bar and the focus frame from the system.
|
||||||
SetWindowLongPtr(hDlg, DWL_MSGRESULT, CDRF_NOTIFYPOSTPAINT);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_NOTIFYPOSTPAINT);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NMLVCUSTOMDRAW* lplvcd = (NMLVCUSTOMDRAW*)lParam;
|
NMLVCUSTOMDRAW* lplvcd = (NMLVCUSTOMDRAW*)lParam;
|
||||||
|
@ -1210,7 +1210,7 @@ INT_PTR CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
SetWindowLongPtr(hDlg, DWL_MSGRESULT, CDRF_DODEFAULT);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_DODEFAULT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case 1:
|
case 1:
|
||||||
lplvcd->clrTextBk = RGB(216, 203, 253); break;
|
lplvcd->clrTextBk = RGB(216, 203, 253); break;
|
||||||
|
@ -1222,7 +1222,7 @@ INT_PTR CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||||
lplvcd->clrTextBk = RGB(175, 94, 253);
|
lplvcd->clrTextBk = RGB(175, 94, 253);
|
||||||
lplvcd->clrText = RGB(255, 255, 255); break; // use a more visual color in dark background
|
lplvcd->clrText = RGB(255, 255, 255); break; // use a more visual color in dark background
|
||||||
}
|
}
|
||||||
SetWindowLongPtr(hDlg, DWL_MSGRESULT, CDRF_NEWFONT);
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, CDRF_NEWFONT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CDDS_ITEMPOSTPAINT:
|
case CDDS_ITEMPOSTPAINT:
|
||||||
|
|
|
@ -833,7 +833,7 @@ INT_PTR CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
switch(((LPNMHDR)lParam)->code)
|
switch(((LPNMHDR)lParam)->code)
|
||||||
{
|
{
|
||||||
case NM_CUSTOMDRAW:
|
case NM_CUSTOMDRAW:
|
||||||
SetWindowLongPtr(hWnd, DWL_MSGRESULT, pianoRoll.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
SetWindowLongPtr(hWnd, DWLP_MSGRESULT, pianoRoll.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case LVN_GETDISPINFO:
|
case LVN_GETDISPINFO:
|
||||||
pianoRoll.getDispInfo((NMLVDISPINFO*)lParam);
|
pianoRoll.getDispInfo((NMLVDISPINFO*)lParam);
|
||||||
|
@ -854,7 +854,7 @@ INT_PTR CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
switch(((LPNMHDR)lParam)->code)
|
switch(((LPNMHDR)lParam)->code)
|
||||||
{
|
{
|
||||||
case NM_CUSTOMDRAW:
|
case NM_CUSTOMDRAW:
|
||||||
SetWindowLongPtr(hWnd, DWL_MSGRESULT, bookmarks.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
SetWindowLongPtr(hWnd, DWLP_MSGRESULT, bookmarks.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case LVN_GETDISPINFO:
|
case LVN_GETDISPINFO:
|
||||||
bookmarks.getDispInfo((NMLVDISPINFO*)lParam);
|
bookmarks.getDispInfo((NMLVDISPINFO*)lParam);
|
||||||
|
@ -865,7 +865,7 @@ INT_PTR CALLBACK TASEditorWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
switch(((LPNMHDR)lParam)->code)
|
switch(((LPNMHDR)lParam)->code)
|
||||||
{
|
{
|
||||||
case NM_CUSTOMDRAW:
|
case NM_CUSTOMDRAW:
|
||||||
SetWindowLongPtr(hWnd, DWL_MSGRESULT, history.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
SetWindowLongPtr(hWnd, DWLP_MSGRESULT, history.handleCustomDraw((NMLVCUSTOMDRAW*)lParam));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case LVN_GETDISPINFO:
|
case LVN_GETDISPINFO:
|
||||||
history.getDispInfo((NMLVDISPINFO*)lParam);
|
history.getDispInfo((NMLVDISPINFO*)lParam);
|
||||||
|
|
Loading…
Reference in New Issue