a while ago I released a little utility for creating a popup menu color selector. Well, I have been in need of a much more flexible version... and here it is!
This one allows you to embed the color selector within any popup menu. The only restriction is that the color items must NOT reside within a submenu.
The class only has 4 methods and the the demo program shows all of them in action!
The DisplayColorPicker() method now returns a quad value.
In the case that the operation was cancelled without anything being selected then -1 is returned.
In the case that a color value was selected, this value is returned 'as is'.
Otherwise, if one of the other menu items was selected, then the appropriate menuitemID is placed in the upper 32-bits of the return value. The lower 32-bits are set to zero.
This means that you can differentiate between all the various options and you can avoid having to use a callback etc. to obtain the selected menuitemID.
I may look like a mule, but I'm not a complete ass.
If you change the two SetWindowLong_() to SetWindowLongPtr_() it works
on 64-Bit.
greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.