mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 05:14:41 +02:00
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
|
// if (percent == 255) then opacq
|
||||||
void SetTransparent(HWND hwnd, int percent) {
|
void SetTransparent(HWND hwnd, int percent) {
|
||||||
if (!_transparentFuncAddr) return;
|
if (!_transparentFuncAddr) return;
|
||||||
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, ::GetWindowLongPtrW(hwnd, GWL_EXSTYLE) | 0x00080000);
|
::SetWindowLongPtr(hwnd, GWL_EXSTYLE, ::GetWindowLongPtr(hwnd, GWL_EXSTYLE) | 0x00080000);
|
||||||
if (percent > 255)
|
if (percent > 255)
|
||||||
percent = 255;
|
percent = 255;
|
||||||
if (percent < 0)
|
if (percent < 0)
|
||||||
|
@ -255,19 +255,9 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
|||||||
|
|
||||||
_codepage = ::GetACP();
|
_codepage = ::GetACP();
|
||||||
|
|
||||||
//Use either Unicode or ANSI setwindowlong, depending on environment
|
::SetWindowLongPtr(_hSelf, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||||
if (::IsWindowUnicode(_hSelf))
|
_callWindowProc = CallWindowProcW;
|
||||||
{
|
_scintillaDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_hSelf, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(scintillaStatic_Proc)));
|
||||||
::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)));
|
|
||||||
}
|
|
||||||
|
|
||||||
//Get the startup document and make a buffer for it so it can be accessed like a file
|
//Get the startup document and make a buffer for it so it can be accessed like a file
|
||||||
attachDefaultDoc();
|
attachDefaultDoc();
|
||||||
|
@ -440,7 +440,7 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
|||||||
case WM_INITDIALOG :
|
case WM_INITDIALOG :
|
||||||
{
|
{
|
||||||
_viewZoneCanvas = ::GetDlgItem(_hSelf, IDC_VIEWZONECANVAS);
|
_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)));
|
_canvasDefaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_viewZoneCanvas, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(canvasStaticProc)));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user