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] 2024 Approved Simple Steps to Document Online Meetings on OS X/Windows
- [Updated] In 2024, Sculpt the Subject Mastering the Art of Background Takedown
- Befreit Ihre Gelöschten Dateien Auf Externen Speichern Mit Diesen Sechs Restaurierungsmethoden
- Comment Restaurer Efficacement L’image Du Système Sous Windows 10, 8 Ou 7 Sur Un Autre Ordinateur
- Easy Fixes for When You Can't Locate Nsprnsp4.dll - User Manual
- Evaluating the Cost of Producing a Music Video for 2024
- Four Techniques for Bootstrapping Windows 11 Home Edition on New Hardware without Linked Microsoft ID
- Free Conversion of OGV Video Files: Easy Online Tools by Movavi
- Free Download: Latest Drivers for MSI Z370-A Pro Motherboard
- How to Repair a Non-Functional Mic on SteelSeries Arctis Prime Headset
- Top 6 Apps/Services to Trace Any Apple iPhone 6s Location By Mobile Number | Dr.fone
- Top Rated BitLocker Recovery Software Compatible with Windows 10/8/7 and Future Versions
- Updated 2024 Approved Unlock Free Vocal Manipulation Expertise with In-Depth Guide to Voice Editing via Filmora
- Title: Mastering the EP_GET_MASK Command in EmEditor for Efficient Text Editing
- Author: Joseph
- Created at : 2024-11-07 00:42:45
- Updated at : 2024-11-13 01:21:26
- 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.