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
L

lbc

@lbc
About
Posts
15
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • what's in the EXE?
    L lbc

    Hello i am wondering about the following things because i'd like to get an idea about a source code is related to the final EXE Let's say we have a class (i am working with VC7, assuming no optimizations at all) class CMyDlg : public CDialog { // Construction public: CMyDlg(CWnd* pParent = NULL); // standard constructor ... // data int d1, d2, d3; CString s1, s2, s3; ... ... //methods void method1 (int v1); void method2 (int v2); ... }; // Implementation for the CMyDlg Class ... CMyDlg::CMyDlg(CWnd* pParent /* = NULL*/) : CDialog(CMyDlg::IDD, pParent) { d1=100; d2=200; d3=300; s1="default"; s2=""; s3="hello"; } void CMyDlg::method1( int v1) { // do something ... } void CMyDlg::method2( int v2) { // do something ... } well, imagine to compile and get the EXE. Some questions: 1) If, for refactoring purposes i decide to rename the class into something like CMyOtherDlg, and leave everything else unchanged (data and methods), the resulting compiled code inside the EXE will be exactly the same? 2) What about changing also the members and methods names? 3) If i change (just for example) the declaration order and/or the inizialization order for the variables, will this 'matter' something or will have completely no influence on the final EXE? 4) Do the names used inside the source code mean 'something special' in the final EXE? Why, for example, if i examine the resulting EXE code, with an HEX editor i am able to find some MFC or API functions names and not the names of my functions/classes (at least it seems so to me)? Any info about the above will be greatly appreciated, as well as any web links helpful to understand (even from a general point of view, let's say an overview) about how the VC compiler 'translates' the source code, links it and finally produces the EXE. thanks in advance! best regards

    C / C++ / MFC c++ json tutorial question lounge

  • how to attach the htmlhelp to an exisiting application
    L lbc

    thank you very much I actually found helpful documentation at the following page: http://www.codeguru.com/help/index.shtml best regards

    C / C++ / MFC question html help tutorial

  • how to attach the htmlhelp to an exisiting application
    L lbc

    Hello all i have created a dialog application by means of the application wizard (VC7) without the html help support (when I started i didn't enable that option in the wizard). Now How can I attach it to the existing application? Infact i'd wish, if possibile, to not recreate my application again as i have added many sources and resources to it. I have tried also to create from scratch another similar dialog application to watch what code was added for the help hooking purpose but it seems a little bit too complicated to track down all the changes needed. I have already created the .hhp .hhk, and .hhc help files with the html workshop. thanks for any info/tip about best regards

    C / C++ / MFC question html help tutorial

  • Dynamically adding items to a combo box
    L lbc

    Hello, thank you with reference to your example i'd wish adding just only 'January', I mean when the user has entered a new complete item thanks again for any tip best regards

    C / C++ / MFC

  • Dynamically adding items to a combo box
    L lbc

    Hello everybody I have a normal combobox in a dialog, and besides the initial items loaded from a file I want the item shown in the editbox area of the combobox to be automatically updated when the user writes something inside it. I also wuld like this string to be "stored", so that next time he/she pulls down the combobox this string is still there. I actually tried to implement notification handlers for: ON_CBN_SELENDOK , ON_CBN_EDITCHANGE and ON_CBN_EDITUPDATE but I couldn't exactly get what i need. Any info/tip will be greatly appreciated thank you best regards

    C / C++ / MFC

  • Parsing a CSV file - problem
    L lbc

    thank you very much Nitron! i have just downloaded your excellent code and i'll give it a try as soon as possible anyway i would be really interested in finding the reasons why the code above form Wrox book doesn't work as expected I have tried to debug it and follow all the steps to figure out why the last field isn't parsed but so far i could'f find an answer so i would appreciate very much if anybody could point me towards the solution thanks again! best regards

    C / C++ / MFC c++ help debugging json tutorial

  • Parsing a CSV file - problem
    L lbc

    Hello everybody, i am trying to parse a simple CSV file (see a little file sample below) using the functions found in the book 'PROFESSIONAL MFC with VC++6' by M. Blaszczak, Wrox. I am working with VC7. The functions work fine but unfortunately i can get only the first, say, N-1 values parsed instead of all the N wished ones. for example in the sample below i get parsed only: label0 .. label5 as labels row (missing label6) field0,f1,f2,f3,f4,f5 as first row of values (missing field f6) 0,10,20,30,40,50 as second row of values (missing 60) and so on... I mean only six values (with reference to the csv file sample), not all the seven values any help/tip will be gratly appreciated! Thanks in advance class CMyDoc : public CDocument { public: int CountChars(CString& ref, TCHAR ch = ',') const; CString GetField(CString& ref, int nIndex, TCHAR ch = ',') const; ... }; ... int CMyDoc::CountChars(CString& ref, TCHAR ch) const { LPCTSTR pstrBuffer = ref.LockBuffer(); int nCount = 0; while (*pstrBuffer != _T('\0')) { if (*pstrBuffer == ch) nCount++; pstrBuffer++; } ref.UnlockBuffer(); return nCount; } CString CMyDoc::GetField(CString& ref, int nIndex, TCHAR ch) const { CString strReturn; LPCTSTR pstrStart = ref.LockBuffer(); LPCTSTR pstrBuffer = pstrStart; int nCurrent = 0; int nStart = 0; int nEnd = 0; int nOldStart = 0; while (nCurrent <= nIndex && *pstrBuffer != _T('\0')) { if (*pstrBuffer == ch) { nOldStart = nStart; nStart = nEnd+1; nCurrent++; } nEnd++; pstrBuffer++; } ref.UnlockBuffer(); if (*pstrBuffer == _T('\0')) { TRACE("Warning: Couldn't find it.\n"); return strReturn; } return ref.Mid(nOldStart, nEnd-nOldStart-1); } ... // CALLING STUFF ... int nColumns = pDoc->CountChars(pDoc->m_strColumns); TRACE("N. col= %d, header titles= %s\n", nColumns, pDoc->m_strColumns); int nIndex; CString strCurrent; for (nIndex = 0; nIndex < nColumns; nIndex++) { ... print values ... } SAMPLE FILE.CSV label0,label1,label2,label3,label4,label5,label6 <-- labels row field0,f1,f2,f3,f4,f5,f6 <-- first row of values 0,10,20,30,40,50,60 <-- second row of values ... best regards

    C / C++ / MFC c++ help debugging json tutorial

  • ' Multicolumn ' CMonthCalControl
    L lbc

    thank you very much i'll check your code asap, looks really great! anyway i was hoping the CMonthCalCtrl could do that best regards

    C / C++ / MFC data-structures help question

  • ' Multicolumn ' CMonthCalControl
    L lbc

    Hello I am quite new to the CMonthCalControl (I am working with VC7). Is there a simple way to give it a 'multirow' (multi columns) 'shape', i mean a simple way in order to show not only one 'calendar box' but, say, 3x4 month boxes all at once? I suppose i could get that result creating an array of controls, right? Thanks in advance for any help/tip/info! best regards

    C / C++ / MFC data-structures help question

  • CFileDialog problem under win 98
    L lbc

    thank you very much! i was getting crazy finding out which reasons could be causing that strange behaviour best regards

    C / C++ / MFC help

  • CFileDialog problem under win 98
    L lbc

    Hello all I have a VC7 dialog based application. Basically one dialog with an edit box IDC_EDIT and 2 buttons IDC_READ_MYFILE IDC_CANCEL when I press the IDC_READ_MYFILE button i want to open a standard File Open Dialog, managed by the message_map entry, something like this: ON_BN_CLICKED(IDC_READ_MYFILE, OnReadMyfile) ... void CMyAppDlg::OnReadMyfile() { // TODO: Add your control notification handler code here static CString szFilter = "DXF Files (*.dxf)|*.dxf||"; CFileDialog fileDialog(TRUE, "dxf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter, NULL ); if(fileDialog.DoModal() == IDOK) { CString sDXF_FileName; sDXF_FileName = fileDialog.GetPathName(); ... do some processing on this file UpdateData(FALSE); } } Tested under windows XP it *works fine* (opening the File Dialog and processing the selected file as needed) but under windows 98 it works but when pressing on the IDC_READ_MYFILE button nothing happens (the File Open dialog is not open) while the close button works and also the about message box works (called inside the dialog top left System menu) By the way I have checked the resources IDs and there isn't any conflict any help/tips will be greatly appreciated thanks in advance! best regards

    C / C++ / MFC help

  • how to work with sln and vcproj files
    L lbc

    .sln and .vcproj are just for vc++.net (vc7) the equivalent vc6 files are .dsw and .dsp: if you load a .dsw/.dsp pair into the vc7 ide, it's automatically converted into a .sln/.vcproj hope this helps best regards

    C / C++ / MFC tutorial question

  • Building a statically linked MFC-App with VC7
    L lbc

    Rainer i too have noticed those dependencies, but don't think shlwapi and oleaut create particular problems as far as oleacc.dll i suggest you to check out: http://www.codeproject.com/cpp/oleaccproxy.asp[^] basically an oleproxy or, better, a delayed loading dll, seems to be a recommended practice maybe you could use this way also with the other 2 dlls hope this helps best regards

    C / C++ / MFC c++ help question

  • EXE resources
    L lbc

    Thank you both guys >>Using VC++ I personnaly usually have both the current resource tree open, and I do a open file, adding the other .rc file in the open windows. Then I can select and copy a resource from one of the trees, and paste it to the other. VC++7 does not change anything to this. you are rigth, i have tried again and this time it works as advertised for some strange reason the 'paste' action was grayed before on the resource tree inside my vc7 IDE thanks again! best regards

    C / C++ / MFC tutorial question visual-studio data-structures learning

  • EXE resources
    L lbc

    hello every1 -VC7: in the IDE open an exe/dll file to examine the resources -i can see the resources tree (dialogs, icons etc.) -i can edit/copy any resource but only staying within this tree Question: -how to insert one of these resources (for example a complex dialog to use it as a starting point for layout a similar one) into an existing project? thanks in advance for any tip best regards

    C / C++ / MFC tutorial question visual-studio data-structures learning
  • Login

  • Don't have an account? Register

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