mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Window title with non-english characters (fixes #1442)
(cherry picked from commit 33078fd3dc)
This commit is contained in:
parent
12dd546b6b
commit
4b8c0e59bc
4 changed files with 9 additions and 9 deletions
|
|
@ -339,7 +339,7 @@ var
|
|||
AEntries: TSHChangeNotifyEntry;
|
||||
begin
|
||||
{$PUSH}{$HINTS OFF}
|
||||
OldWProc := WNDPROC(SetWindowLongPtr(Handle, GWL_WNDPROC, LONG_PTR(@MyWndProc)));
|
||||
OldWProc := WNDPROC(SetWindowLongPtrW(Handle, GWL_WNDPROC, LONG_PTR(@MyWndProc)));
|
||||
{$POP}
|
||||
if Assigned(SHChangeNotifyRegister) then
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ function MyWndProc(hWnd: HWND; uiMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRE
|
|||
begin
|
||||
case uiMsg of
|
||||
WM_MENUSELECT:
|
||||
Result := DefWindowProc(hWnd, uiMsg, wParam, lParam);
|
||||
Result := DefWindowProcW(hWnd, uiMsg, wParam, lParam);
|
||||
(* For working with submenu of context menu *)
|
||||
WM_INITMENUPOPUP,
|
||||
WM_DRAWITEM,
|
||||
|
|
@ -541,7 +541,7 @@ begin
|
|||
FParent:= GetControlHandle(Parent);
|
||||
// Replace window procedure
|
||||
{$PUSH}{$HINTS OFF}
|
||||
OldWProc := WNDPROC(SetWindowLongPtr(FParent, GWL_WNDPROC, LONG_PTR(@MyWndProc)));
|
||||
OldWProc := WNDPROC(SetWindowLongPtrW(FParent, GWL_WNDPROC, LONG_PTR(@MyWndProc)));
|
||||
{$POP}
|
||||
FFiles := Files;
|
||||
FBackground := Background;
|
||||
|
|
@ -580,7 +580,7 @@ destructor TShellContextMenu.Destroy;
|
|||
begin
|
||||
// Restore window procedure
|
||||
{$PUSH}{$HINTS OFF}
|
||||
SetWindowLongPtr(FParent, GWL_WNDPROC, LONG_PTR(@OldWProc));
|
||||
SetWindowLongPtrW(FParent, GWL_WNDPROC, LONG_PTR(@OldWProc));
|
||||
{$POP}
|
||||
// Free global variables
|
||||
ShellMenu2 := nil;
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ begin
|
|||
|
||||
Info^.DefWndProc:= @WindowProc;
|
||||
|
||||
CustomFormWndProc:= Windows.WNDPROC(SetWindowLongPtr(Result, GWL_WNDPROC, LONG_PTR(@FormWndProc2)));
|
||||
CustomFormWndProc:= Windows.WNDPROC(SetWindowLongPtrW(Result, GWL_WNDPROC, LONG_PTR(@FormWndProc2)));
|
||||
|
||||
AWinControl.Color:= SysColor[COLOR_BTNFACE];
|
||||
AWinControl.Font.Color:= SysColor[COLOR_BTNTEXT];
|
||||
|
|
@ -1361,7 +1361,7 @@ begin
|
|||
Result:= CallWindowProc(@WindowProc, Window, Msg, WParam, LParam);
|
||||
Exit;
|
||||
end;
|
||||
Result:= DefWindowProc(Window, Msg, WParam, LParam);
|
||||
Result:= DefWindowProcW(Window, Msg, WParam, LParam);
|
||||
end;
|
||||
|
||||
var
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ begin
|
|||
if Assigned(WindowProc) then
|
||||
Result := CallWindowProc(WindowProc, hWnd, Msg, wParam, lParam)
|
||||
else begin
|
||||
Result := DefWindowProc(hWnd, Msg, wParam, lParam);
|
||||
Result := DefWindowProcW(hWnd, Msg, wParam, lParam);
|
||||
end;
|
||||
if (Result = 0) and (Msg = WM_COMMAND) and (lParam <> 0) then
|
||||
begin
|
||||
|
|
@ -369,7 +369,7 @@ begin
|
|||
if FPluginWindow <> 0 then
|
||||
begin
|
||||
// Subclass viewer window to catch WM_COMMAND message.
|
||||
Result:= HWND(SetWindowLongPtr(ParentWin, GWL_WNDPROC, LONG_PTR(@ListerProc)));
|
||||
Result:= HWND(SetWindowLongPtrW(ParentWin, GWL_WNDPROC, LONG_PTR(@ListerProc)));
|
||||
Windows.SetPropW(ParentWin, WindowProcAtom, Result);
|
||||
// Subclass plugin window to catch some hotkeys like 'n' or 'p'.
|
||||
Result := HWND(SetWindowLongPtr(FPluginWindow, GWL_WNDPROC, LONG_PTR(@PluginProc)));
|
||||
|
|
@ -413,7 +413,7 @@ begin
|
|||
try
|
||||
{$IF DEFINED(LCLWIN32)}
|
||||
SetWindowLongPtr(FPluginWindow, GWL_WNDPROC, LONG_PTR(RemovePropW(FPluginWindow, WindowProcAtom)));
|
||||
SetWindowLongPtr(GetParent(FPluginWindow), GWL_WNDPROC, LONG_PTR(RemovePropW(GetParent(FPluginWindow), WindowProcAtom)));
|
||||
SetWindowLongPtrW(GetParent(FPluginWindow), GWL_WNDPROC, LONG_PTR(RemovePropW(GetParent(FPluginWindow), WindowProcAtom)));
|
||||
{$ENDIF}
|
||||
if Assigned(ListCloseWindow) then
|
||||
ListCloseWindow(FPluginWindow)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue