Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can I restrict a class not to have more than 2 objects? Pin
toxcct6-Dec-05 22:50
toxcct6-Dec-05 22:50 
GeneralRe: Can I restrict a class not to have more than 2 objects? Pin
G Haranadh6-Dec-05 22:56
G Haranadh6-Dec-05 22:56 
QuestionRe: Can I restrict a class not to have more than 2 objects? Pin
David Crow7-Dec-05 3:08
David Crow7-Dec-05 3:08 
QuestionAlphaBlend + TextBox = crash?? Pin
dy136-Dec-05 20:24
dy136-Dec-05 20:24 
QuestionUrgent : About SHGetValue() API used for Registry Pin
Supriya Tonape6-Dec-05 20:03
Supriya Tonape6-Dec-05 20:03 
AnswerRe: Urgent : About SHGetValue() API used for Registry Pin
kakan6-Dec-05 20:18
professionalkakan6-Dec-05 20:18 
GeneralRe: Urgent : About SHGetValue() API used for Registry Pin
Supriya Tonape6-Dec-05 21:39
Supriya Tonape6-Dec-05 21:39 
GeneralRe: Urgent : About SHGetValue() API used for Registry Pin
kakan7-Dec-05 0:34
professionalkakan7-Dec-05 0:34 
Hello again.
I'm pleased to be able to help you out.

About the buffer size, at some time or another you will have to allocate the buffer for the return value, hardcoded or not...

In general, the Windows functions that return buffers usually has a way to give the coder the size of buffer needed for a particular reply.:
1.
Set the buffer pointer to NULL, and allocated buffer size to 0.
2.
Call the function in question.
3.
The function returns the number of bytes/chars needed for the (real) response.
4.
Allocate that amount of memory för the buffer.
5.
Call the function again, this time with a valid buffer address and the number of allocated bytes.
6.
Obtain the result.

But I'm not sure if this goes for SHGetValue, though. I haven't checked.
But this principle goes for many Windows functions.

Kakan.

GeneralRe: Urgent : About SHGetValue() API used for Registry Pin
Supriya Tonape7-Dec-05 1:06
Supriya Tonape7-Dec-05 1:06 
QuestionChanging Font Size in MS Word Automated Document Created using VC++(MFC) Pin
Sachinpatole6-Dec-05 19:56
Sachinpatole6-Dec-05 19:56 
QuestionThanks for help and need further..... Pin
usha_dolly6-Dec-05 19:35
usha_dolly6-Dec-05 19:35 
AnswerRe: Thanks for help and need further..... Pin
ThatsAlok6-Dec-05 21:55
ThatsAlok6-Dec-05 21:55 
QuestionPlease HELP Me( Porting from Win32 to MAC) Pin
vishix16-Dec-05 19:31
vishix16-Dec-05 19:31 
QuestionLittle Question Pin
Ankush Mehta6-Dec-05 19:08
Ankush Mehta6-Dec-05 19:08 
AnswerRe: Little Question Pin
S Douglas7-Dec-05 1:13
professionalS Douglas7-Dec-05 1:13 
GeneralRe: Little Question Pin
Ankush Mehta7-Dec-05 1:46
Ankush Mehta7-Dec-05 1:46 
GeneralRe: Little Question Pin
S Douglas7-Dec-05 21:28
professionalS Douglas7-Dec-05 21:28 
GeneralRe: Little Question Pin
Ankush Mehta7-Dec-05 22:15
Ankush Mehta7-Dec-05 22:15 
GeneralRe: Little Question Pin
S Douglas7-Dec-05 22:33
professionalS Douglas7-Dec-05 22:33 
GeneralRe: Little Question Pin
Ankush Mehta7-Dec-05 23:11
Ankush Mehta7-Dec-05 23:11 
GeneralRe: Little Question Pin
S Douglas8-Dec-05 0:22
professionalS Douglas8-Dec-05 0:22 
GeneralRe: Little Question Pin
Ankush Mehta8-Dec-05 1:11
Ankush Mehta8-Dec-05 1:11 
GeneralRe: Little Question Pin
S Douglas8-Dec-05 1:18
professionalS Douglas8-Dec-05 1:18 
GeneralRe: Little Question Pin
S Douglas8-Dec-05 3:44
professionalS Douglas8-Dec-05 3:44 
QuestionHow to open recent files from file menu in MFC application? Pin
jayshml6-Dec-05 17:40
jayshml6-Dec-05 17:40 

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.