Click here to Skip to main content
15,897,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Plugin Abstract Interface idea Pin
saiyuk6=71-Aug-10 22:43
saiyuk6=71-Aug-10 22:43 
QuestionChild Dialog Pin
john563231-Jul-10 0:31
john563231-Jul-10 0:31 
AnswerRe: Child Dialog Pin
Cool_Dev31-Jul-10 0:54
Cool_Dev31-Jul-10 0:54 
AnswerRe: Child Dialog Pin
Richard MacCutchan31-Jul-10 0:55
mveRichard MacCutchan31-Jul-10 0:55 
GeneralRe: Child Dialog Pin
Cool_Dev31-Jul-10 1:11
Cool_Dev31-Jul-10 1:11 
GeneralRe: Child Dialog Pin
Richard MacCutchan31-Jul-10 1:57
mveRichard MacCutchan31-Jul-10 1:57 
GeneralRe: Child Dialog Pin
Cool_Dev31-Jul-10 2:06
Cool_Dev31-Jul-10 2:06 
GeneralRe: Child Dialog Pin
Richard MacCutchan31-Jul-10 3:06
mveRichard MacCutchan31-Jul-10 3:06 
GeneralRe: Child Dialog Pin
Gary R. Wheeler31-Jul-10 10:25
Gary R. Wheeler31-Jul-10 10:25 
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 

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.