Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Child Dialog Pin
Richard MacCutchan31-Jul-10 21:23
mveRichard MacCutchan31-Jul-10 21:23 
GeneralRe: Child Dialog Pin
Gary R. Wheeler31-Jul-10 23:43
Gary R. Wheeler31-Jul-10 23:43 
AnswerRe: Child Dialog Pin
Sauro Viti31-Jul-10 22:25
professionalSauro Viti31-Jul-10 22:25 
QuestionBalloon notification in Vista Pin
rahul.kulshreshtha30-Jul-10 20:38
rahul.kulshreshtha30-Jul-10 20:38 
Questionhow does this macro work? Pin
Amrit Kshetri30-Jul-10 16:06
Amrit Kshetri30-Jul-10 16:06 
AnswerRe: how does this macro work? Pin
Paul M Watt30-Jul-10 17:17
mentorPaul M Watt30-Jul-10 17:17 
GeneralRe: how does this macro work? Pin
Amrit Kshetri30-Jul-10 18:46
Amrit Kshetri30-Jul-10 18:46 
GeneralRe: how does this macro work? Pin
Paul M Watt30-Jul-10 19:05
mentorPaul M Watt30-Jul-10 19:05 
~ is a bitwise NOT operation on a value.
So if you have x = binary 00110101, ~(00110101) => 11001010

if you use a bitwise & like this (x & (~x)) the result is 0

x: 00110101
~x: 11001010
------------
& 00000000

That would represent the case where the sizeof() returned 0.

To see how the macro will work with a different type:

(32-bit system)
sizeof(int) := 4
sizeof(short) := 2

VA_SIZE(short) =>

Start: ((2 + 4 - 1) & ~(4 - 1)) =>

Simplify: (5) & ~(3) =>

Convert To Binary: (101) & ~(011) =>

BitWise NOT: (101) & (100) =>

BitWise AND: (100) =>

Convert to Decimal: 4 bytes used on stack

The whole point of the macro is to round up the arguement to the size of stack entries, while returning 0 if the size of the parameter is 0 rather than automatically adding an empty stack item.
Questionheap corruption detected Pin
smengl30-Jul-10 8:38
smengl30-Jul-10 8:38 
AnswerRe: heap corruption detected Pin
Maximilien30-Jul-10 8:52
Maximilien30-Jul-10 8:52 
GeneralRe: heap corruption detected Pin
David Crow30-Jul-10 9:21
David Crow30-Jul-10 9:21 
AnswerRe: heap corruption detected Pin
Chuck O'Toole30-Jul-10 17:24
Chuck O'Toole30-Jul-10 17:24 
AnswerRe: heap corruption detected Pin
Aescleal30-Jul-10 21:03
Aescleal30-Jul-10 21:03 
QuestionAny interest in parallel programming 64-bit multi-core c++? Pin
rob Schultz30-Jul-10 8:35
rob Schultz30-Jul-10 8:35 
AnswerRe: Any interest in parallel programming 64-bit multi-core c++? [modified] Pin
SortaCore1-Aug-10 22:48
SortaCore1-Aug-10 22:48 
AnswerRe: Any interest in parallel programming 64-bit multi-core c++? Pin
rob Schultz6-Aug-10 19:45
rob Schultz6-Aug-10 19:45 
QuestionWAVEINCAPS help... Pin
AmbiguousName30-Jul-10 7:52
AmbiguousName30-Jul-10 7:52 
QuestionCMDIChildWndEx with its own menu Pin
SaintNeil30-Jul-10 5:17
SaintNeil30-Jul-10 5:17 
AnswerRe: CMDIChildWndEx with its own menu Pin
Richard MacCutchan30-Jul-10 6:35
mveRichard MacCutchan30-Jul-10 6:35 
AnswerRe: CMDIChildWndEx with its own menu Pin
Eugen Podsypalnikov30-Jul-10 11:02
Eugen Podsypalnikov30-Jul-10 11:02 
QuestionDisconnect from server in vc++ Pin
dilara semerci30-Jul-10 3:45
dilara semerci30-Jul-10 3:45 
AnswerRe: Disconnect from server in vc++ Pin
Moak30-Jul-10 4:21
Moak30-Jul-10 4:21 
AnswerRe: Disconnect from server in vc++ Pin
Cool_Dev30-Jul-10 4:33
Cool_Dev30-Jul-10 4:33 
QuestionRe: Disconnect from server in vc++ Pin
dilara semerci2-Aug-10 4:38
dilara semerci2-Aug-10 4:38 
AnswerRe: Disconnect from server in vc++ Pin
Cool_Dev2-Aug-10 18:01
Cool_Dev2-Aug-10 18: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.