Click here to Skip to main content
15,900,108 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: (Different) Question About Declarations Pin
Brian Delahunty19-Jun-03 10:14
Brian Delahunty19-Jun-03 10:14 
GeneralRe: (Different) Question About Declarations Pin
Michael Dunn19-Jun-03 12:06
sitebuilderMichael Dunn19-Jun-03 12:06 
GeneralRegistry/String Questions Pin
yashraj121519-Jun-03 8:01
yashraj121519-Jun-03 8:01 
GeneralRe: Registry/String Questions Pin
AlexO19-Jun-03 8:09
AlexO19-Jun-03 8:09 
GeneralRe: Registry/String Questions Pin
yashraj121519-Jun-03 8:28
yashraj121519-Jun-03 8:28 
GeneralRe: Registry/String Questions Pin
David Crow19-Jun-03 9:06
David Crow19-Jun-03 9:06 
GeneralRe: Registry/String Questions Pin
AlexO20-Jun-03 4:14
AlexO20-Jun-03 4:14 
GeneralRe: Registry/String Questions Pin
David Crow19-Jun-03 9:19
David Crow19-Jun-03 9:19 
yashraj1215 wrote:
I do not understand what purpose "(LPBYTE)" serves in this code; the code will not compile without it. I found "(LPBYTE)" in the MSDN library, but it never explained what it does or what it means... does anyone know?

While you did not indicate, I would imagine you have mycaption defined as a char, rather than a BYTE. For example, using:

LPBYTE mycaption = "Some Caption Here";
or
BYTE mycaption[32] = "Some Caption Here";

you could have called RegSetValueEx() like:

RegSetValueEx(hKey, TEXT("LegalNoticeCaption"), 0, REG_SZ, mycaption, _tcslen(mycaption) * sizeof(TCHAR));

yashraj1215 wrote:
The last parameter of the RegSetValueEx function is supposed to be the size of the buffer. Is the buffer size equal to one byte per character?

Yes, unless you are dealing with DBCS (i.e., Unicode). In that case, every character uses two bytes.

yashraj1215 wrote:
What is the difference between a signed char, an unsigned char, and a char? What are their individual purposes?

A char and signed char are the same thing (i.e., they use the sign bit). If a type does not have the unsigned qualifier, it is assumed signed.

yashraj1215 wrote:
What are their individual purposes?

It actually depends on what you are storing. ASCII characters (0-127) can be stored in a char, whereas extended ASCII (0-255) must use an unsigned char.
GeneralFirewall question Pin
Kuniva19-Jun-03 7:28
Kuniva19-Jun-03 7:28 
GeneralRe: Firewall question Pin
Joel Lucsy19-Jun-03 7:51
Joel Lucsy19-Jun-03 7:51 
GeneralRe: Firewall question Pin
basementman19-Jun-03 7:57
basementman19-Jun-03 7:57 
GeneralRe: Firewall question Pin
Kuniva19-Jun-03 11:36
Kuniva19-Jun-03 11:36 
GeneralRe: Firewall question Pin
Joel Lucsy19-Jun-03 14:34
Joel Lucsy19-Jun-03 14:34 
GeneralRe: Firewall question Pin
Robert Little19-Jun-03 8:04
Robert Little19-Jun-03 8:04 
Generalcapture wm_char message Pin
lucy19-Jun-03 7:19
lucy19-Jun-03 7:19 
GeneralRe: capture wm_char message Pin
Kuniva19-Jun-03 7:38
Kuniva19-Jun-03 7:38 
GeneralRe: capture wm_char message Pin
lucy19-Jun-03 8:00
lucy19-Jun-03 8:00 
Questionverify packets sent over com port? Pin
pramodastro19-Jun-03 7:05
pramodastro19-Jun-03 7:05 
GeneralPixel to inch conversion (just some basic maths) Pin
User 665819-Jun-03 7:04
User 665819-Jun-03 7:04 
GeneralRe: Pixel to inch conversion (just some basic maths) Pin
Anonymous19-Jun-03 7:15
Anonymous19-Jun-03 7:15 
GeneralRe: Pixel to inch conversion (just some basic maths) Pin
Ryan Binns19-Jun-03 17:49
Ryan Binns19-Jun-03 17:49 
GeneralEXE's ICON Pin
Eldon Zacek19-Jun-03 6:14
Eldon Zacek19-Jun-03 6:14 
GeneralRe: EXE's ICON Pin
Anonymous19-Jun-03 6:49
Anonymous19-Jun-03 6:49 
GeneralRe: EXE's ICON Pin
Anonymous19-Jun-03 6:51
Anonymous19-Jun-03 6:51 
GeneralRe: EXE's ICON Pin
Brian Delahunty19-Jun-03 7:22
Brian Delahunty19-Jun-03 7:22 

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.