CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: wdolson

Page 1 of 9 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    7
    Views
    6,491

    Re: Memory Leak in Constructor?

    I misunderstood how it works. The program does have some problems. I started down the memory leak possibility when I started getting corruption in the heap errors on program exit.

    The program...
  2. Replies
    7
    Views
    6,491

    Re: Memory Leak in Constructor?

    I put a breakpoint at the beginning of the constructor for the app class. Then I put _CrtDumpMemoryLeaks(); on the first line of the constructor. Stepping past the call to the dump memory leaks...
  3. Replies
    7
    Views
    6,491

    Memory Leak in Constructor?

    I know memory leak checking can sometimes have false positives. I'm wondering if this is one of them, or if I'm doing something wrong.

    I turned on memory leak checking by adding



    #define...
  4. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    I fixed it after you pointed it out to me.

    I'm copying the contents of the pointer right after it's set and then discarding the pointer, so while it was less than optimal coding practice, it...
  5. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    The class I'm using to read the ini is called CSimpleIni from here http://code.jellycan.com/simpleini/. Using this, I can eliminate the ANSI function calls in the program.

    It's usage is pretty...
  6. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    error C2440: '=' : cannot convert from 'const wchar_t *' to 'TCHAR *'

    Bill
  7. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    It returns a wchar_t* which as far as I can tell is identical to a TCHAR * in Unicode, but the compiler couldn't deal with it without the cast.

    Bill
  8. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    Yes to both.

    Bill
  9. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    Unless someone can point me to some literature that says otherwise, I'm pretty well convinced this is an MFC architecture issue. I put the exact same code in the mainframe and the app class. They...
  10. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    Thanks for the info. I learned C pretty much formally, but taught myself C++ on the job. There are some gaps in my education.

    One thing, I wasn't talking about making a copy of IniPath, just a...
  11. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    Moving the loading code to the app class works.

    I am still wondering why it wouldn't work right in the main frame.

    Bill
  12. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    I tried moving the code to the document, and it loads OK. There is something weird with loading it in the main frame. I found I could get the strings to load if I created a TCHAR string at the top...
  13. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    m_CfgData is a struct with several strings and some ints. I've tried defining it a few different ways.

    I removed the memset for now. Removing the & from in front of the m_CfgData won't compile. ...
  14. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    I found this class which seems to do the job:

    http://www.codeproject.com/KB/files/SimpleIni.aspx?fid=296097&fr=1#xx0xx

    I need to do some surgery on my code to fit in the changes, but it gets...
  15. Replies
    29
    Views
    4,510

    Re: Reading ASCII Strings into a Unicode Program

    In the document file (the INI file data is read in CMainFrame at program start)

    CString filename = A2W(pFrame->m_CfgData.PinNamePath);

    The function includes

    USES_CONVERSION;

    The string...
  16. Replies
    29
    Views
    4,510

    Reading ASCII Strings into a Unicode Program

    I am developing a new app in MFC under VC 2005. Part of the program has to deal with text from files that are used by some old ASCII programs (the programs were created before unicode existed).
    ...
  17. Re: Is There a Way to Set the Short Filename Programatically?

    I forgot to reply to this. That worked.

    Thanks,
    Bill
  18. [RESOLVED] Is There a Way to Set the Short Filename Programatically?

    I see you can use

    fsutil file setshortname

    to force the short name of a file to something specific, but is there a way to do this programatically with the API?

    If there is, it will save me...
  19. Replies
    8
    Views
    2,954

    Re: Why is winapi so messy?

    Probably my biggest gripe with Windows. And they didn't do all that great a job at fool proofing Windows for the low end user either. For that, Mac OS did a better job.

    Though I think the...
  20. Replies
    17
    Views
    10,294

    Re: Curve Comparison Algorithm?

    It's been a few days. My customer is pushing me to do a quick and dirty fix to get something out there, then come back later with fancier solutions. One data set is always called the control and...
  21. Replies
    17
    Views
    10,294

    Re: Curve Comparison Algorithm?

    The problem is a bit more difficult because the beginning and end point of the two curves may not be the same X, though this may be OK. Additionally one curve can have more points than the other. ...
  22. Replies
    17
    Views
    10,294

    Re: Curve Comparison Algorithm?

    Sorry about the wrong forum, I didn't scroll down far enough when looking. I see the algorithm forum down lower.

    I think what we're looking for is the latter type of comparison. Basically, do...
  23. Replies
    17
    Views
    10,294

    Curve Comparison Algorithm?

    I'm making updates and maintaining some very old code. The original program suite was written for Windows 1.0 and except for a port to Win 32 and what I've been doing the last year, there have been...
  24. Replies
    9
    Views
    2,168

    Re: Converting a C Program to Compile with C++

    Yes. Most of the functions were double prototyped, one set with no arguments and another with extern "C" for the modules already compiled in C++. But some functions were only prototyped with no...
  25. Replies
    9
    Views
    2,168

    Re: Converting a C Program to Compile with C++

    The reasons for the various link errors were many. In the case of CheckDupLists, there were two modules in the project, one ListSup2_32.cpp and the other LinkSup2_32.cpp. I only noticed the ...
Results 1 to 25 of 222
Page 1 of 9 1 2 3 4





Click Here to Expand Forum to Full Width

Featured