Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Implement an NM_CUSTOMDRAW Message Handler Pin
Software_Developer13-Oct-11 6:36
Software_Developer13-Oct-11 6:36 
GeneralRe: Implement an NM_CUSTOMDRAW Message Handler Pin
csrss13-Oct-11 6:51
csrss13-Oct-11 6:51 
AnswerRe: [mfc, custom control] Default Button Pin
Richard MacCutchan13-Oct-11 7:48
mveRichard MacCutchan13-Oct-11 7:48 
GeneralRe: [mfc, custom control] Default Button Pin
csrss13-Oct-11 7:58
csrss13-Oct-11 7:58 
AnswerRe: [mfc, custom control] Default Button Pin
André Kraak13-Oct-11 8:41
André Kraak13-Oct-11 8:41 
GeneralRe: [mfc, custom control] Default Button Pin
csrss13-Oct-11 9:06
csrss13-Oct-11 9:06 
GeneralRe: [mfc, custom control] Default Button Pin
André Kraak13-Oct-11 9:12
André Kraak13-Oct-11 9:12 
QuestionRegistry - basic questions - read / write in MFC VC++ Pin
Vaclav_13-Oct-11 5:25
Vaclav_13-Oct-11 5:25 
I am trying to use registry to store some common application data.
Here is my test code
SetRegistryKey(_T("*CCC*"));
{
CString strSection = "1234";
CString strStringItem = "My String Item";
CString strIntItem = "My Int Item";
CWinApp* pApp = AfxGetApp();
pApp->WriteProfileString(strSection, strStringItem, "test");
CString strValue;
strValue = pApp->GetProfileString(strSection, strStringItem);
ASSERT(strValue == "test");
pApp->WriteProfileInt(strSection, strIntItem, 1234);
int nValue;
nValue = pApp->GetProfileInt(strSection, strIntItem, 0);
ASSERT(nValue == 1234);
}
The "problem" is - I cannot see the *CCC* in the registry until the WriteProfileString is executed and application name .ini file is build in c:\windows directory.
Even then the GetProfileString reads the data from ini file and not the registry.
And in registry I have a application name key added.
How did it get there ?
I found lots of registry wrappers here , but I need just basic API explanations, not a wrapper class.
Ideally I do not want to build ini file, so how do I do that?
I need a better description , than MSDN, for SetRegistryKey.
I do not get MSDN explanations about working in either ini or registry.
Sample code to write / read to / from registry without building ini file would be nice ( in VC++ not VB ) .
Any constructive help will be as always appreciated.
Thanks Vaclav
QuestionRe: Registry - basic questions - read / write in MFC VC++ Pin
David Crow13-Oct-11 5:36
David Crow13-Oct-11 5:36 
AnswerRe: Registry - basic questions - read / write in MFC VC++ Pin
Vaclav_13-Oct-11 7:13
Vaclav_13-Oct-11 7:13 
AnswerRe: Registry - basic questions - read / write in MFC VC++ Pin
Richard MacCutchan13-Oct-11 5:53
mveRichard MacCutchan13-Oct-11 5:53 
QuestionTo ask the user information via keyboard Pin
antonio34312-Oct-11 11:40
antonio34312-Oct-11 11:40 
AnswerRe: To ask the user information via keyboard Pin
Maximilien12-Oct-11 14:04
Maximilien12-Oct-11 14:04 
GeneralRe: To ask the user information via keyboard Pin
Madhu Nair12-Oct-11 18:26
Madhu Nair12-Oct-11 18:26 
GeneralRe: To ask the user information via keyboard Pin
antonio34313-Oct-11 7:10
antonio34313-Oct-11 7:10 
GeneralRe: To ask the user information via keyboard Pin
Maximilien13-Oct-11 7:41
Maximilien13-Oct-11 7:41 
GeneralRe: To ask the user information via keyboard Pin
antonio34313-Oct-11 9:05
antonio34313-Oct-11 9:05 
GeneralRe: To ask the user information via keyboard Pin
antonio34313-Oct-11 9:10
antonio34313-Oct-11 9:10 
GeneralRe: To ask the user information via keyboard Pin
Maximilien13-Oct-11 9:25
Maximilien13-Oct-11 9:25 
GeneralRe: To ask the user information via keyboard Pin
antonio34313-Oct-11 14:38
antonio34313-Oct-11 14:38 
GeneralRe: To ask the user information via keyboard Pin
antonio34314-Oct-11 23:10
antonio34314-Oct-11 23:10 
QuestionIdea of Activation of software Pin
002comp12-Oct-11 2:02
002comp12-Oct-11 2:02 
AnswerRe: Idea of Activation of software Pin
Rajesh R Subramanian12-Oct-11 3:01
professionalRajesh R Subramanian12-Oct-11 3:01 
AnswerRe: Idea of Activation of software Pin
Chuck O'Toole12-Oct-11 4:33
Chuck O'Toole12-Oct-11 4:33 
AnswerRe: software protection and activation Pin
Software_Developer12-Oct-11 21:38
Software_Developer12-Oct-11 21:38 

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.