Click here to Skip to main content
15,921,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Artist / Album on Audio CD Pin
Alexander M.,25-Apr-05 3:22
Alexander M.,25-Apr-05 3:22 
GeneralRe: Artist / Album on Audio CD Pin
Maximilien25-Apr-05 3:27
Maximilien25-Apr-05 3:27 
GeneralRe: Artist / Album on Audio CD Pin
Anorexic Tribble25-Apr-05 3:47
Anorexic Tribble25-Apr-05 3:47 
GeneralRe: Artist / Album on Audio CD Pin
Michael Dunn25-Apr-05 6:27
sitebuilderMichael Dunn25-Apr-05 6:27 
GeneralSurface using C++ or .NET Pin
Majid Shahabfar25-Apr-05 0:16
Majid Shahabfar25-Apr-05 0:16 
GeneralRe: Surface using C++ or .NET Pin
deldeep25-Apr-05 1:04
deldeep25-Apr-05 1:04 
GeneralHelp Problem Running Vedio in VC++ Pin
Ezhil Nilavan A25-Apr-05 0:06
Ezhil Nilavan A25-Apr-05 0:06 
GeneralDWORD Pin
fardak24-Apr-05 23:52
fardak24-Apr-05 23:52 
To get the value (as a decimal)between two bits in a DWORD,this is what I wrote:
////////////////////////////////////
DWORD CMyBitsDlg::RevealBitsInDW(DWORD theNb,unsigned int lowBit,unsigned int highBit)
{ DWORD valueOfBits=theNb;
valueOfBits &=0xFFFFFFFF << (DWORD)lowBit;
valueOfBits &=0xFFFFFFFF >> (DWORD)(31-highBit);

return valueOfBits;
}
///////////////////////
The DWORD is input as a CString of valid Hex chars.
To format it as a DWORD,I tried:
GetDlgItemText(IDC_MYHEX,hexNb);
sscanf(hexNb, "%08X", &GivenHex);
and:
sscanf("0x"+hexNb, "%I32i", &GivenHex);
Both seem be a wrong formatting.
//////// To display the result:
DWORD value=RevealBitsInDW(GivenHex,lbit,hbit);
strResult.Format("%u",value);
GetDlgItem(IDC_MYRESULT)->SetWindowText(strResult);
////////////// Theresult displayed is not correct.
Where is my error ?
Thanks for any help.
GeneralLocalization API (exists?) Pin
zopiro24-Apr-05 23:47
zopiro24-Apr-05 23:47 
GeneralActiveX Controls in Dialogbar Pin
azprivat24-Apr-05 23:40
azprivat24-Apr-05 23:40 
Generalsearch current folder for file Pin
Stirfie24-Apr-05 21:28
Stirfie24-Apr-05 21:28 
GeneralRe: search current folder for file Pin
P-Rex24-Apr-05 22:24
P-Rex24-Apr-05 22:24 
GeneralHardware information Pin
sunit524-Apr-05 21:16
sunit524-Apr-05 21:16 
GeneralRe: Hardware information Pin
ThatsAlok25-Apr-05 1:31
ThatsAlok25-Apr-05 1:31 
GeneralRe: Hardware information Pin
sunit525-Apr-05 1:57
sunit525-Apr-05 1:57 
GeneralRe: Hardware information Pin
Alexander M.,25-Apr-05 3:16
Alexander M.,25-Apr-05 3:16 
GeneralRe: Hardware information Pin
ThatsAlok25-Apr-05 3:20
ThatsAlok25-Apr-05 3:20 
Generalplease help it's urgent Pin
sandy13455424-Apr-05 20:31
susssandy13455424-Apr-05 20:31 
GeneralRe: please help it's urgent Pin
toxcct24-Apr-05 20:39
toxcct24-Apr-05 20:39 
GeneralCFindFile doesn't find all files on the network directory Pin
GeloSoft24-Apr-05 20:29
GeloSoft24-Apr-05 20:29 
GeneralCode Count Tool Pin
Sarath C24-Apr-05 19:59
Sarath C24-Apr-05 19:59 
GeneralRe: Code Count Tool Pin
Zdeslav Vojkovic25-Apr-05 0:48
Zdeslav Vojkovic25-Apr-05 0:48 
GeneralCode Count Tool Pin
Sarath C24-Apr-05 19:54
Sarath C24-Apr-05 19:54 
GeneralRe: Code Count Tool Pin
22491724-Apr-05 20:04
22491724-Apr-05 20:04 
GeneralRe: Code Count Tool Pin
Sarath C24-Apr-05 21:01
Sarath C24-Apr-05 21:01 

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.