Click here to Skip to main content
15,881,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Enable MFC in Win32 DLL Pin
«_Superman_»1-Mar-09 21:51
professional«_Superman_»1-Mar-09 21:51 
GeneralRe: Enable MFC in Win32 DLL Pin
PankajB1-Mar-09 21:56
PankajB1-Mar-09 21:56 
Questionstring to hex number Pin
lune121-Mar-09 20:50
lune121-Mar-09 20:50 
AnswerRe: string to hex number Pin
grassrootkit1-Mar-09 21:13
grassrootkit1-Mar-09 21:13 
AnswerRe: string to hex number Pin
Cedric Moonen1-Mar-09 21:22
Cedric Moonen1-Mar-09 21:22 
AnswerRe: string to hex number Pin
Stuart Dootson1-Mar-09 21:26
professionalStuart Dootson1-Mar-09 21:26 
AnswerRe: string to hex number Pin
CPallini1-Mar-09 22:49
mveCPallini1-Mar-09 22:49 
AnswerRe: string to hex number Pin
cmk2-Mar-09 8:46
cmk2-Mar-09 8:46 
typedef  unsigned char   byte;
typedef  wchar_t         charw;
typedef  const charw    ccharw;
 
ccharw  *CharHexL (L"0123456789abcdef");
 
byte  HexToByte( charw C )
{
	C = towlower(C);
	if( C >= CharHexL[ 0] && C <= CharHexL[ 9] )  return( byte(C-CharHexL[ 0]) );
	if( C >= CharHexL[10] && C <= CharHexL[15] )  return( byte(C-CharHexL[10]) + 10 );
	return(0);
}
 
inline  byte  HexToByte( charw C1, charw C2 )
{
	return( (HexToByte(C1)<<4) + HexToByte(C2) );
}


If the string has an odd number of characters pass the first char to HexToByte(C) to get the values for the first byte. Walk the rest of the string two characters at a time using HexToByte(C1, C2) to convert the pairs to bytes.

...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

QuestionCut the wmv movie Using Directshow editing services Pin
raj15761-Mar-09 19:37
raj15761-Mar-09 19:37 
Questionmultilingual support Pin
Varun Bhatt1-Mar-09 19:30
Varun Bhatt1-Mar-09 19:30 
AnswerRe: multilingual support Pin
Hamid_RT1-Mar-09 19:57
Hamid_RT1-Mar-09 19:57 
Question2 Doc & 2 Views. Pin
grassrootkit1-Mar-09 19:26
grassrootkit1-Mar-09 19:26 
AnswerRe: 2 Doc & 2 Views. Pin
Stuart Dootson1-Mar-09 21:37
professionalStuart Dootson1-Mar-09 21:37 
GeneralRe: 2 Doc & 2 Views. Pin
grassrootkit1-Mar-09 22:40
grassrootkit1-Mar-09 22:40 
GeneralRe: 2 Doc & 2 Views. Pin
Stuart Dootson1-Mar-09 23:12
professionalStuart Dootson1-Mar-09 23:12 
GeneralRe: 2 Doc & 2 Views. Pin
grassrootkit1-Mar-09 23:38
grassrootkit1-Mar-09 23:38 
QuestionC question about Split and remove substring Pin
nyc_6801-Mar-09 19:04
nyc_6801-Mar-09 19:04 
AnswerRe: C question about Split and remove substring Pin
Nishad S1-Mar-09 19:16
Nishad S1-Mar-09 19:16 
GeneralRe: C question about Split and remove substring Pin
nyc_6801-Mar-09 19:45
nyc_6801-Mar-09 19:45 
AnswerRe: C question about Split and remove substring Pin
sam_psycho1-Mar-09 20:01
sam_psycho1-Mar-09 20:01 
QuestionUnable to create SAFEARRAY Pin
pandit841-Mar-09 18:56
pandit841-Mar-09 18:56 
AnswerRe: Unable to create SAFEARRAY Pin
Stuart Dootson1-Mar-09 21:48
professionalStuart Dootson1-Mar-09 21:48 
GeneralRe: Unable to create SAFEARRAY Pin
pandit841-Mar-09 23:04
pandit841-Mar-09 23:04 
Questionreading audio file properties like artist,genre,album etc using VC++ 6 Pin
punav1-Mar-09 18:08
punav1-Mar-09 18:08 
AnswerRe: reading audio file properties like artist,genre,album etc using VC++ 6 Pin
«_Superman_»1-Mar-09 18:19
professional«_Superman_»1-Mar-09 18:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.