If you want a C++ solution then consider using a stringstream and the std::hex manipulator.
For example to convert a string of hex digits into a number:
std::string hex( "6a204687" );
std::stringstream str( hex );
unsigned number = 0;
str >> std::hex >> number;
One other thought, you might like to implement a DDX_hex function to complement the other DDX_ functions MFC gives you for exchanging hex numbers with controls in a dialogue box.
Edited to get rid of a spurious word in the code.