Link to home
Start Free TrialLog in
Avatar of cjbezant
cjbezant

asked on

Getting data from RegEnumValue

In Visual C++ v5 I am looping through registry entries picking up the subgroups using RegEnumKey and I now wish to extract the data from an entry in the subgroup eg Title in HKEY_LOCAL_MACHINE\software\microsoft\browser\CurrentVersion\Title.
My RegEnumValue reads a couple of entries then gives RC 234 (ERROR_MORE_DATA I think) My result string is 1000 bytes.
What am I doing wrong? I am so close but can't figure it out.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cjbezant
cjbezant

ASKER

Many thanks nietod, this indeed has solved my problem.

There are a acouple of other things I need to crack. I need to put a bitmap as the background to my dialog boxes and I need to increase the text size of my static text that form the heading for a listbox. In VB this was easy-peasy but in VC++ I can't find how to do it.

Do you have any book recommendations to help me learn VC++ MFC and would include these topics?

Thanks again for your help. The registry was a major stumbling block for me. None of the online help explains it.
These really should be asked as seperate questions, but briefly,

>>bitmap as the background to my dialog boxes
Draw the bitmap with BitBlt(0 (or one of its related procedures) during the dialog's WM_PAINT message.

>> increase the text size of my static text
Send the control a WM_SETFONT message.

>> book recommendations to help me learn VC++ MFC
I recommend you learn the basics of windows programming BEFORE learning MFC.  MFC makes it easier by hiding lots of details, but that is not necessarly the best way to start out, first you should learn about those details, then you will be better prepared to handle probkems.  I would start with the charles Petzold book "Programming Windows" (I believe its called).  Then try one of the many MFC books.

I wasn't trying to short circuit the system, just a drowniong man clasping at a straw!

Thanks again.
Just ask another qeustion or two to keep the DB well organized.  (all questions are saved for posterify).  If you run low on points, as a low point value question and let the experts know you are running low, they will usually still answer