المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Is it possible to get individual properties from a specific Flag value in VC++?



C++ Programming
04-04-2009, 11:21 AM
I must admit the title is NOT clear at all. http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif

As you know, using spy++ you can inspect messages sent to a specific widow in a human-favor manner. Now suppose you have a program being debugged and there's a variable representing a few properties. See the following variable contains BOLD, ITALIC and UNDERLINE status of a character:

DWORD dwFlags;

...

if (dwFlags & BOLD)
{
// do some thing
}

...

dwFlags |= ITALIC;

...


But my problem is this variable looks like some thing like 0x2F284A08 in the debug window and it's difficult to say which flags are set at the moment. Could you show a better way to consider this kind of variables?

Thank you masters!