| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 15079 | 2002-01-28 06:26:00 | Toolbar masking using Win32 API | Guest (0) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 33210 | 2002-01-28 06:26:00 | I'm working on a piece of non-commercial software written in C++ using the Win32 API (rather than MFC). This uses a rebar and 3 imagelists (disabled, enabled and 'hot') to create a flat toolbar. These are created using ImageList_Create with the ILC_MASK and ILC_COLOR32 flags set. The toolbar images are added as follows: hBitmap = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_TOOLBAR3)); ImageList_AddMasked(himlTBDisabled, hBitmap, RGB(192,192,192)); However, although this works just fine under Win 2000, I tried the .exe out on a Win95 PC (with IE 5.5, so the version of Comctl32.dll is greater than 4.70) and noticed a square grey area around the toolbar button images. That is, the masking wasn't working. I tried changing the masking from RGB(192,192,192) to GetSysColor(COLOR_BTNFACE) (and various others) but to no avail. I am using 24-bit bitmaps for the 3 toolbars (this makes anti-aliasing of edges etc. easy). I also noted my 256 colour .exe icon came out in blue and grey. Does Win95 expect 16 colour icons only? Although these are only aesthetic concerns any guidance would be much appreciated. Thanks in advance, Andrew. |
Guest (0) | ||
| 33211 | 2002-01-28 07:20:00 | What is the colour depth of the machine you're trying it out on? It sounds like it may be running in 256 colours. If so, when you change to 16 bit colour, does the problem go away? :-) |
Guest (0) | ||
| 33212 | 2002-01-28 08:50:00 | Good point, I will check this the next time I get to use the machine. However, masking RGB(192,192,192) shouldn't be an issue as this is part of the basic 16 colour (4 bit)palette (it's the standard light grey). Furthermore, the flat toolbar on Internet Explorer 5.5 on the Win95 PC looked just fine. | Guest (0) | ||
| 1 | |||||