I've always wished that the style constants generated by the dialog editor would have the text constants and not the hex numbers -- "ABS_FLAT" as opposed to 0x00008000. If and until that happensÂÃ, ;) I will use the attached program to convert the hex numbers into something more readable. As the listing is long, I will upload (as a txt file).
Paste the hex number into the dialog's edit control, press convert. If you want the result put back into your code, press clipboard to get it there for pasting.
Edit: found the bug - reload if interested.
If I type in "0x80", select "Dialog", and click "Convert", it crashes. Otherwise it's a pretty cool program.
Also I wonder if Paul could make the forum accept .src files.
Ouch!
Well, it does do that, although typing in just "80" seems to work. Must be a problem with my string manipulations.
80 isn't the same as 0x80 ;)
Unless you're automatically converting it from hex, but 0x80 is 128 in decimal.
The program treats it as a hex character string which is then converted to an integer.
Still looking for the bug :-\
OK - found the bug. Was one-off in a string function. I'm not sure why it crashed -- as opposed to just giving the wrong result -- but it appears to work now.
Thanks for testing it.
Quote from: Parker on January 20, 2006, 05:24:36 PM
Also I wonder if Paul could make the forum accept .src files.
Done. Also accepts .inc too.
Another couple of bug fixes now uploaded as *.src file in the original post.