Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Custom draw not working in TreeView controls inside plugins #15077

Closed
1 task done
oviradoi opened this issue May 3, 2024 · 2 comments
Closed
1 task done

[BUG] Custom draw not working in TreeView controls inside plugins #15077

oviradoi opened this issue May 3, 2024 · 2 comments
Assignees

Comments

@oviradoi
Copy link
Contributor

oviradoi commented May 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

The subclass that is added by the Dark Mode code to will handle the NM_CUSTOMDRAW message sent by TreeView controls.

This subclass will return CDRF_DODEFAULT and this will block any plugins trying to handle this message themselves.

The result will be that the customizations made by the plugins will not be applied.

This will only happen if the plugin is not using the DWS_USEOWNDARKMODE flag.

Steps To Reproduce

  1. Install the Explorer plugin in the plugin manager.
  2. Open the Favorites panel and add a currently opened file to the Favorites list.

Current Behavior

If the file is open, the entry in the Favorites tree should be underlined to indicate the file is open.

Because the subclass overrides the custom draw messages, the entry is not underlined.

Expected Behavior

The entry in the Favorites panel should be underlined if the file is open in Notepad++

Debug Information

Notepad++ v8.6.5   (64-bit)
Build time : Mar 29 2024 - 17:04:43
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 10 Pro (64-bit
OS Version : 22H2
OS Build : 19045.4291
Current ANSI codepage : 1252
Plugins : 
    Explorer (1.9.9)
    JSMinNPP (1.2205)
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)
    NppXmlTreeviewPlugin (2)
    XMLTools (3.1.1.13)

Anything else?

No response

@donho
Copy link
Member

donho commented May 13, 2024

@oviradoi

I don't see any unusual stuff:

image

@oviradoi
Copy link
Contributor Author

@donho
If a file is open in Notepad++, the item in the TreeView should be underlined.

The Explorer plugin has code that handles the NM_CUSTOMDRAW message and sets an underlined font if the file is open. But since Notepad++ does not call DefSubclassProc, this code is not called, and the underlined font is not set for the files that are open.

Here is how it should look:
image

@donho donho closed this as completed in 8055b56 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants