
Mastering the EP_GET_MASK Command in EmEditor for Efficient Text Editing

Mastering the EP_GET_MASK Command in EmEditor for Efficient Text Editing
Viewing 3 posts - 1 through 3 (of 3 total)
- Author
Posts - January 7, 2010 at 9:45 am #8026
CaptainFlint
Participant
In developing a plugin I met a problem with the toolbar icon. I followed the instructions in the help file and for 256-color icons I decided to make RGB(1, 1, 1) a transparent color. So, I designed an icon with 4 pixels in corners with this color (to make it look a bit rounded), and in the code I wrote:
case EP_GET_MASK:
if ((wParam & BITMAP_COLOR_MASK) == BITMAP_24BIT_COLOR)
lResult = CLR_NONE;
else if ((wParam & BITMAP_COLOR_MASK) == BITMAP_256_COLOR)
lResult = RGB(1, 1, 1);
break;
However, when I try the plugin in 256-color mode, its toolbar icon becomes garbled. Here is the screenshot of how the icon looks as itself and when shown by EmEditor:
EE 9.07; OS Vista Business SP2 x32 working in true-color mode.
I performed some more experiments and found the following:
1. If I return CLR_NONE instead of RGB(…), the color with index 0 from the image’s index table is used for transparency.
2. The problem seems to lie in fact that my transparent color has index 0. When I move it further in the index table, the problem seems to be gone.
The questions are: what are the “official” recommendations on creating transparent images, and why is all this not described in the help?
January 7, 2010 at 6:17 pm #8033 Yutaka Emura
Keymaster
I think the issue is the color palette with 256-color mode. Even if your plug-in bitmap looks fine by itself, it becomes ugly with other plug-ins because the color palette must be adjusted with other bitmaps. For this reason, I would recommend you not adding 256-color bitmaps. Just use true-color bitmaps and 16-color bitmaps, and omit 256-color bitmaps. In most of my standard plug-ins, I don’t supply 256-color bitmaps any more for this reason. Most PCs now display true color, and 256-color mode is becoming obsolete. The 256-color mode feature might be taken out in the future.
January 10, 2010 at 11:25 pm #8040 CaptainFlint
Participant
I see, I’ll keep that in mind.
But even if the problem is in adjusting color palette, why simple repositioning of the transparent color fixes the problem completely? I don’t change the color itself, I don’t change colors of other pixels, I just move one color in the index table, and that’s all.
PS: Since I found how to eliminate the problem on the plugin’s side, it no longer bothers me as itself, but I’m concerned about possible bug in EmEditor which caused such strange behaviour.
- Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Also read:
- [New] Sustainable Screen Tech Best Picks Reviewed for 2024
- [New] Voice Over Techniques That Transform Video Storytelling for 2024
- 360 Hard Drive Capacity!
- Constraint A: Use only the C-Major Scale for Representation.
- Effiziente Methoden Zur Reparatur Einer Defekten Datenträgeroberfläche
- Gratis Online Converteren Van VIDEE Aan MKV - WijzenMOVavis
- In 2024, The Best 8 VPN Hardware Devices Reviewed On Oppo A1 5G | Dr.fone
- Iniciando El Recovery Mode en Windows 11: Una Guía Completa Para Técnicos Avanzados
- Problembehandlung: Nicht Vollständige Speicherkapazität Auf Festplatte in Windows 10 Erkennen
- Recuperación De Partición Olvidada: Técnicas Esenciales Con Pasos a Seguir Para Windows 11 Y Versiones Anteriores
- Règler Les Problèmes D'Incompatibilité Avec Windows 11 Installation Et Mise À Niveau Effortless Guide
- Unlocking Elusive Footage The Systematic Guide to YouTube Secrets
- Title: Mastering the EP_GET_MASK Command in EmEditor for Efficient Text Editing
- Author: Joseph
- Created at : 2025-01-22 23:13:23
- Updated at : 2025-01-26 21:16:13
- Link: https://win-hacks.techidaily.com/mastering-the-epgetmask-command-in-emeditor-for-efficient-text-editing/
- License: This work is licensed under CC BY-NC-SA 4.0.