Click here to Skip to main content
15,889,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: simple program Pin
mpapeo20-Mar-05 10:59
mpapeo20-Mar-05 10:59 
GeneralRe: simple program Pin
marinme20-Mar-05 11:25
marinme20-Mar-05 11:25 
GeneralRe: simple program Pin
mpapeo20-Mar-05 11:43
mpapeo20-Mar-05 11:43 
GeneralRe: simple program Pin
David Crow21-Mar-05 4:30
David Crow21-Mar-05 4:30 
GeneralRe: simple program Pin
mpapeo21-Mar-05 8:45
mpapeo21-Mar-05 8:45 
GeneralCSocket & closed connection Pin
pand_pl20-Mar-05 3:34
pand_pl20-Mar-05 3:34 
GeneralRe: CSocket & closed connection Pin
eli1502197920-Mar-05 4:40
eli1502197920-Mar-05 4:40 
GeneralRe: CSocket & closed connection Pin
pand_pl20-Mar-05 5:23
pand_pl20-Mar-05 5:23 
GeneralRe: CSocket & closed connection Pin
eli1502197920-Mar-05 21:04
eli1502197920-Mar-05 21:04 
GeneralRe: CSocket & closed connection Pin
pand_pl21-Mar-05 1:57
pand_pl21-Mar-05 1:57 

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.