Click here to Skip to main content
15,903,385 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IPC - win32 Pin
shiraztk21-Mar-05 19:03
shiraztk21-Mar-05 19:03 
Questionfgets?? Pin
Larsson20-Mar-05 10:23
Larsson20-Mar-05 10:23 
AnswerRe: fgets?? Pin
John R. Shaw20-Mar-05 10:57
John R. Shaw20-Mar-05 10:57 
AnswerRe: fgets?? Pin
hauptman20-Mar-05 11:21
hauptman20-Mar-05 11:21 
GeneralRe: fgets?? Pin
David Crow21-Mar-05 4:21
David Crow21-Mar-05 4:21 
AnswerRe: fgets?? Pin
Christian Graus20-Mar-05 11:58
protectorChristian Graus20-Mar-05 11:58 
AnswerRe: fgets?? Pin
Aamir Butt21-Mar-05 0:18
Aamir Butt21-Mar-05 0:18 
QuestionHow do I call a Child window from a Dialog? Pin
TMaxwell8620-Mar-05 10:21
TMaxwell8620-Mar-05 10:21 
AnswerRe: How do I call a Child window from a Dialog? Pin
Renjith Ramachandran20-Mar-05 15:57
Renjith Ramachandran20-Mar-05 15:57 
GeneralAccessing the gui controls of other applications Pin
modshah_one20-Mar-05 7:08
modshah_one20-Mar-05 7:08 
GeneralRe: Accessing the gui controls of other applications Pin
David Crow21-Mar-05 4:26
David Crow21-Mar-05 4:26 
GeneralRe: Accessing the gui controls of other applications Pin
modshah_one21-Mar-05 7:12
modshah_one21-Mar-05 7:12 
GeneralRe: Accessing the gui controls of other applications Pin
David Crow21-Mar-05 7:21
David Crow21-Mar-05 7:21 
GeneralPLBYTE to int * Pin
samhwang20-Mar-05 6:41
samhwang20-Mar-05 6:41 
GeneralRe: PLBYTE to int * Pin
John R. Shaw20-Mar-05 11:10
John R. Shaw20-Mar-05 11:10 
GeneralRe: PLBYTE to int * Pin
samhwang20-Mar-05 14:45
samhwang20-Mar-05 14:45 
GeneralRe: PLBYTE to int * Pin
David Crow21-Mar-05 4:28
David Crow21-Mar-05 4:28 
GeneralRe: PLBYTE to int * Pin
John R. Shaw30-Mar-05 6:00
John R. Shaw30-Mar-05 6:00 
Sorry, I've been away!

1) "PLBYTE" is not a defined type it should be "LPBYTE" or "BYTE*".
2) I made a mistake: "LPBYTE *pByte" should be "LPBYTE pByte" or "BYTE* pByte".

sizeof examples:
BYTE b;
int i;
BYTE ba[10];
int ia[10];
BYTE* pba = ba;
int* pia = ia;
//sizeof(b) = sizeof(BYTE) = 1
//sizeof(i) = sizeof(int) = 4 (on 32-bit compilers)
//sizeof(ba) = 10*sizeof(ba[0] = 10*sizeof(BYTE) = 10
//sizeof(ia) = 10*sizeof(ia[0] = 10*sizeof(int) = 10*4 (on 32-bit compilers)
//sizeof(pba) = sizeof(BYTE*) = 4 (on 32-bit compilers)
//sizeof(pia) = sizeof(BYTE*) = 4 (on 32-bit compilers)

Notes:
1) sizeof(int) is the size of a machine word.
2) A machine word is the maximum number of bytes that can fit into one machine register.
3) Reality: What the size of an int is depends on the compiler you are using;
16-bit -> sizeof(int) = 2,
32-bit -> sizeof(int) = 4,
64-bit -> sizeof(int) = 8.

Well, I hope that answers all your questions.

Good Luck!

INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
Generalamstream.h Pin
Verolix20-Mar-05 6:15
Verolix20-Mar-05 6:15 
GeneralRe: amstream.h Pin
Christian Graus20-Mar-05 12:01
protectorChristian Graus20-Mar-05 12:01 
Generalsimple program Pin
mpapeo20-Mar-05 4:05
mpapeo20-Mar-05 4:05 
GeneralRe: simple program Pin
Chris Losinger20-Mar-05 4:26
professionalChris Losinger20-Mar-05 4:26 
GeneralRe: simple program Pin
eli1502197920-Mar-05 4:30
eli1502197920-Mar-05 4:30 
GeneralRe: simple program Pin
Ravi Bhavnani20-Mar-05 5:39
professionalRavi Bhavnani20-Mar-05 5:39 
GeneralRe: simple program Pin
eli1502197920-Mar-05 20:26
eli1502197920-Mar-05 20:26 

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.