Cleanup usage of remaining Pre-Unicode interface usage of SetWindowLongPtrW, SetWindowLongPtrA -> SetWindowLongPtr; GetWindowLongPtrW -> GetWindowLongPtr
This commit is contained in:
parent
311c7d578e
commit
c3697d2055
@ -1422,7 +1422,7 @@ public:
|
||||
// if (percent == 255) then opacq
|
||||
void SetTransparent(HWND hwnd, int percent) {
|
||||
if (!_transparentFuncAddr) return;
|
||||
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, ::GetWindowLongPtrW(hwnd, GWL_EXSTYLE) | 0x00080000);
|
||||
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, ::GetWindowLongPtr(hwnd, GWL_EXSTYLE) | 0x00080000);
|
||||
if (percent > 255)
|
||||
percent = 255;
|
||||
if (percent < 0)
|
||||
|
@ -255,19 +255,9 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||
|
||||
_codepage = ::GetACP();
|
||||
|
||||
//Use either Unicode or ANSI setwindowlong, depending on environment
|
||||
if (::IsWindowUnicode(_hSelf))
|
||||
{
|
||||
::SetWindowLongPtrW(_hSelf, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
_callWindowProc = CallWindowProcW;
|
||||
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtrW(_hSelf, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(scintillaStatic_Proc)));
|
||||
}
|
||||
else
|
||||
{
|
||||
::SetWindowLongPtrA(_hSelf, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
_callWindowProc = CallWindowProcA;
|
||||
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtrA(_hSelf, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(scintillaStatic_Proc)));
|
||||
}
|
||||
::SetWindowLongPtr(_hSelf, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
_callWindowProc = CallWindowProcW;
|
||||
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_hSelf, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(scintillaStatic_Proc)));
|
||||
|
||||
//Get the startup document and make a buffer for it so it can be accessed like a file
|
||||
attachDefaultDoc();
|
||||
|
@ -440,7 +440,7 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
_viewZoneCanvas = ::GetDlgItem(_hSelf, IDC_VIEWZONECANVAS);
|
||||
::SetWindowLongPtrW(_viewZoneCanvas, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
::SetWindowLongPtr(_viewZoneCanvas, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
_canvasDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_viewZoneCanvas, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(canvasStaticProc)));
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user