Click here to Skip to main content
15,920,675 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows NT Service won't run on 2000 Pin
Anonymous8-Nov-02 7:18
Anonymous8-Nov-02 7:18 
GeneralPass a socket handle between apps.. Pin
Anonymous8-Nov-02 5:27
Anonymous8-Nov-02 5:27 
GeneralRe: Pass a socket handle between apps.. Pin
valikac8-Nov-02 5:43
valikac8-Nov-02 5:43 
GeneralRe: Pass a socket handle between apps.. Pin
Anonymous8-Nov-02 5:46
Anonymous8-Nov-02 5:46 
GeneralRe: Pass a socket handle between apps.. Pin
valikac8-Nov-02 6:02
valikac8-Nov-02 6:02 
GeneralReading certain bits Pin
ISIS558-Nov-02 4:37
ISIS558-Nov-02 4:37 
GeneralRe: Reading certain bits Pin
benjymous8-Nov-02 4:52
benjymous8-Nov-02 4:52 
GeneralRe: Reading certain bits Pin
Iain Clarke, Warrior Programmer8-Nov-02 4:58
Iain Clarke, Warrior Programmer8-Nov-02 4:58 
BOOL IsBitOn (UINT uOriginal, UINT nBit)<br />
{<br />
    uOriginal >>= nBit; // Shift right, aka divide by 2^n<br />
    uOriginal &= 1; // Just get the (now) bottom bit<br />
    return (uOriginal == 1);<br />
}


and for the concisists...
#define IsBitOn (x,n)  ((x>>n)&1)<code><br />
<br />
Or if you just want to mask out the other bits,<br />
<br />
<code>uOriginal &= 0x03fc;  // &= 0000 0011 1111 1100 in binary.


I hope that helped,

Iain.
Questionhow to see preprocesor generated files? Pin
Rene De La Garza8-Nov-02 4:35
Rene De La Garza8-Nov-02 4:35 
AnswerRe: how to see preprocesor generated files? Pin
Stephane Rodriguez.8-Nov-02 4:57
Stephane Rodriguez.8-Nov-02 4:57 
GeneralRe: how to see preprocesor generated files? Pin
Rene De La Garza8-Nov-02 5:05
Rene De La Garza8-Nov-02 5:05 
GeneralOnEnterIdle and HTMLDialog Pin
Emmanuel Derriey8-Nov-02 4:09
Emmanuel Derriey8-Nov-02 4:09 
GeneralRe: OnEnterIdle and HTMLDialog Pin
includeh108-Nov-02 4:37
includeh108-Nov-02 4:37 
GeneralRe: OnEnterIdle and HTMLDialog Pin
Stephane Rodriguez.8-Nov-02 4:55
Stephane Rodriguez.8-Nov-02 4:55 
Generaltypedef struct Pin
Hugo Hallman8-Nov-02 2:45
Hugo Hallman8-Nov-02 2:45 
GeneralRe: typedef struct Pin
jhwurmbach8-Nov-02 2:53
jhwurmbach8-Nov-02 2:53 
GeneralRe: typedef struct Pin
includeh108-Nov-02 3:41
includeh108-Nov-02 3:41 
GeneralRe: typedef struct Pin
jhwurmbach8-Nov-02 3:50
jhwurmbach8-Nov-02 3:50 
GeneralError when change CString data to CString data(in Hex format) Pin
ooosawaddee38-Nov-02 2:44
ooosawaddee38-Nov-02 2:44 
GeneralRe: Error when change CString data to CString data(in Hex format) Pin
jmkhael8-Nov-02 4:00
jmkhael8-Nov-02 4:00 
GeneralWindow coords and toolbar buttons Pin
S O S8-Nov-02 2:26
S O S8-Nov-02 2:26 
GeneralRe: Window coords and toolbar buttons Pin
benjymous8-Nov-02 3:57
benjymous8-Nov-02 3:57 
GeneralRe: Window coords and toolbar buttons Pin
S O S8-Nov-02 5:32
S O S8-Nov-02 5:32 
GeneralRe: Window coords and toolbar buttons Pin
Iain Clarke, Warrior Programmer8-Nov-02 5:29
Iain Clarke, Warrior Programmer8-Nov-02 5:29 
GeneralRe: Window coords and toolbar buttons Pin
S O S8-Nov-02 5:33
S O S8-Nov-02 5:33 

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.