Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

anna mathew

@anna mathew
About
Posts
42
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using wxWidgets....
    A anna mathew

    hi.... im new to widgets.... i downloaded wxWidgets 2.8.9..... i BUILD the wx.dsw file in all configurations.... but it failed in 4 configurations....namely DEBUG DLL, RELEASE DLL, UNICODE DEBUG DLL AND UNICODE RELEASE DLL.... I DOWNLOADED THE SAMPLE "HELLO WORLD" wxWidgets program from this site...... when i build it.... i get the error..... ...HelloWorld fatal error LNK1181: cannot open input file 'zlib.lib' now what is the problem???? somebody please help me

    C / C++ / MFC help question debugging announcement

  • Registry Vs Ini
    A anna mathew

    I have an MFC application that reads/writes the address and phone nos of employees of a company to INI file... YOU have only FEW LINES OF CODE FOR THIS... You need to use only GetPrivateProfileString() and WritePrivateProfileString().... What IF I USE REGISTRY TO STORE THIS??? ............WILL IT BE DIFFICULT?

    C / C++ / MFC c++ visual-studio windows-admin question

  • ERROR in _stricmp ..... prevent duplicate section names [modified]
    A anna mathew

    thanks.... i had initialized the flag... but i dint give break..... .....that was the ERROR

    C / C++ / MFC help question

  • ERROR in _stricmp ..... prevent duplicate section names [modified]
    A anna mathew

    Please help me..... my sectionname is same as the name entered.... my code: void CFileINIDlg::OnBnClickedInsert() { const CString szINIFILE = ("C:\\FileINI.ini"); //Accept name , address and phone no from edit box m_Name.GetWindowText(Name); m_Ad.GetWindowText(Address); m_Phone.GetWindowText(Phoneno); CT2A sectn = Name; int cmp; int cmpflag=0; char message[4096]; strcpy (message, "Entries :\n\n"); //Initialize LPTSTR lpszReturnBuffer; lpszReturnBuffer = new TCHAR[MAX_PATH]; char* pNextSection = NULL; GetPrivateProfileSectionNames(lpszReturnBuffer,MAX_PATH,szINIFILE); pNextSection = lpszReturnBuffer; strcat(message, pNextSection); while (*pNextSection != NULL) { //to avoid overwriting entries with same section name cmp = _stricmp(sectn, pNextSection); if(cmp==0) cmpflag= 1; else cmpflag=0; pNextSection = pNextSection + strle(pNextSection) + 1; if(*pNextSection != NULL) { strcat(message, "\n"); strcat(message, pNextSection); } } sprintf(message,"%s\n CMP %d\n FLAG %d \n", message, cmp, cmpflag); MessageBox(message); if(cmpflag==1) MessageBox("ERROR - DUPLICATE"); else if(cmpflag==0) { WritePrivateProfileString(Name, "Name", Name, szINIFILE); WritePrivateProfileString(Name, "Address", Address, szINIFILE); WritePrivateProfileString(Name, "Phone", Phoneno, szINIFILE); } } Im writing the values entered to the INI file..... I want to prevent overwritng an entry ...that has the same section name....... if sectionname is same....i reject the entries insertion to INI file... my code compiles..... but strcmp() is not working..... it always returns 1..... how do i correct it?

    modified on Wednesday, November 5, 2008 3:35 AM

    C / C++ / MFC help question

  • how to use WriteProfileString and GetProfileString MFC functions???
    A anna mathew

    how can i prevent overwriting to INI file....?? I mean Is There Any WAY TO CHECK IF THE SECTION NAME... [section name] already exists???

    C / C++ / MFC c++ tutorial question

  • how to use WriteProfileString and GetProfileString MFC functions???
    A anna mathew

    Ya,... now i know.... thanks...

    C / C++ / MFC c++ tutorial question

  • How to create Ini file and enter/retrieve data from it VC++ MFC [modified]
    A anna mathew

    Thank you

    C / C++ / MFC c++ question tutorial

  • how to use WriteProfileString and GetProfileString MFC functions???
    A anna mathew

    Can someone tell me how to use WriteProfileString and GetProfileString mFC functions???? this is my CODE... it executes....But Data not getting WRITTEN to INI file.... why????????? code: void CFileApp::OnView() { free((void*)m_pszProfileName); m_pszProfileName=_strdup(_T("C:\\MyFile.ini")); WriteProfileString("1", "Name", "MATHEW"); }

    C / C++ / MFC c++ tutorial question

  • How to create Ini file and enter/retrieve data from it VC++ MFC [modified]
    A anna mathew

    Thanks.... this works.... but i put the same lines of code in my MFC application.... still it works.... can u explain how? WriteProfileString...... is a console function... then how come it work with MFC?

    C / C++ / MFC c++ question tutorial

  • How to create Ini file and enter/retrieve data from it VC++ MFC [modified]
    A anna mathew

    No... Im not using INI File to store confiq info... IM USING INI FILE TO CREATE A PHONE DIRECTORY... i know there r better methods... BUT ITS MY ASSIGNMENT.... ..........N ITS SAID THAT I USE ONLY INI FILE

    C / C++ / MFC c++ question tutorial

  • How to create Ini file and enter/retrieve data from it VC++ MFC [modified]
    A anna mathew

    This is the code i used ..........To CREATE a File and enter a default string.. ...........Ive TO USE VC++ MFC void CFileApp::OnInsert() { HANDLE hFile = CreateFile(_T("C:\\Documents and Settings\\MyFile.ini"), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) AfxMessageBox(_T("Couldn't create the file!")); else { // Attach a CFile object to the handle we have. CFile myFile(hFile); static const char sz[] = "Hockey is best!"; // write string, without null-terminator myFile.Write(sz, lstrlen(sz)); myFile.Close(); } } This works..... BUt For INI I want to ENTER DATA SECTIN-WISE.... ........... Here Data is written just like in Text files... I need to use ...GetProfileString.... WriteProfileString..... n so on... how do i do it?? I NEED TO MAKE A PHONE DIRECTORY USING INI FILE......

    C / C++ / MFC c++ question tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    Yes... i can... Ive done MFC database programming too....

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    Yes i read abt it..... thank you.... I got the right answer that i was looking for

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    Ok ..thank u

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    Yes i did check all those links.... thanks..it was helpful... but it all tells abt WIN32 CONSOLE Application... whereas i need.... MFC Application

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    Why cant i use registry???? can u tell me please.... im quite IGNORANT abt all these

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    i need to find the BEST and EASIEST method to CREATE/READ/WRITE INI file

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    Is it easier to create INI file in REGISTRY then READ/WRITE TO it?

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    I went through all the codes and sites.... BUt its all WIN32 CONSOLE application... what i want is MFC Application... The other programs i got is MFC Application.........but... It just reads an INI file...thats already created... Im using Visual Studio 2003..... Visual Studio 2008 supports CIniFile.... but the lower versions dont.... so is there any direct....or easy way to READ/WRITE INI file... Other than using the CIniFile code availabe in this forum????

    C / C++ / MFC c++ tutorial

  • VC++ code to read and write to an INI file
    A anna mathew

    IVe to do it using MFC

    C / C++ / MFC c++ tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups