Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • 0 Votes
    16 Posts
    2 Views
    M
    Thank you all for your help. The example code is very close to the actual code and the problem is that sometimes, depending on the computer, because of the operator >> to deserialize the style m_pFont, several m_pFont pointed to the same memory area. I studied the problem with a minimal grid ... and finally realized that in my application I was not using this m_pFont. I modified my code so that I would no longer use it at all, destroy it and set it to NULL which definitively resolved my problem. If I don't fully explain the phenomenon, I think it comes from the fact that these m_pFont contained the same data and that the operators << consider the pointer had already been serialized as explained in the TN002: Persistent Object Data Format | Microsoft Docs ... Maybe ... Regards
  • 0 Votes
    3 Posts
    0 Views
    L
    The for statement breaks down as three individual expressions: for(set; while; do) : // // set : perform this or these expressions first: multiple expressions must be separated by commas // while : repeat the loop while this expression equates to true // do : perform this or these expressions at the end of each loop Note that any of these expressions (or indeed all of them) may be blank. In your code the expression in the while part is name[i], which means while name[i] is true, or rather while name[i] is not equal to zero. Strings in C are (or should be) terminated with a zero character (NULL), so the expression will be true as long as the character in question is not the terminating NULL.
  • Passing an entry from an array as argument

    data-structures question
    5
    0 Votes
    5 Posts
    0 Views
    C
    Thanks Greg
  • 0 Votes
    5 Posts
    0 Views
    CPalliniC
    Nice. :thumbsup:
  • 0 Votes
    4 Posts
    1 Views
    L
    If they are not used then the preprocessor will ignore them. Macro expansion happens at the reference, not at the definition. You may need to create some dummy file to get the expansions. A better idea would be to write proper documentation comments so they can be seen by anyone looking at the definitions. And I think that may also make them visible through intellisense.
  • How to mount an ISO file with disc type - CD/DVD

    csharp json tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    L
    See Overall Options (Using the GNU Compiler Collection (GCC))[^]. The -E option of gcc allows you to stop the build after running the preprocessor. The out put will be the expanded source. But be aware that this will include the expansions of all input from included headers so may well be quite extensive. If you run a few samples you should be able to see how to get to the source that you are interested in.
  • Printing With Crystal Report

    c++
    3
    0 Votes
    3 Posts
    0 Views
    _
    Other application can print out without problem ? Have tried to print to another printer ? Or, have you tried to run that command on another machine ? You can find more if you do some debugging on your code ...
  • Dynamic Created CEdit using CreateEx

    3
    0 Votes
    3 Posts
    0 Views
    V
    Does it compile? It looks like the parameter CRect is missing. Other info you could find here: [How to do flat style of CEdit (EDITTEXT) and CComboBox in CDialog](http://forums.codeguru.com/showthread.php?564861-How-to-do-flat-style-of-CEdit-(EDITTEXT)-and-CComboBox-in-CDialog&p=2236489#post2236489)
  • C++

    c++ help question
    11
    0 Votes
    11 Posts
    0 Views
    C
    :laugh: Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
  • 0 Votes
    9 Posts
    0 Views
    J
    You're welcome. :) "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
  • How is this possible?

    data-structures c++ wpf performance help
    20
    0 Votes
    20 Posts
    0 Views
    Mircea NeacsuM
    Richard MacCutchan wrote: I don't think they are as dumb as first appears. You are too generous. Me, the eternal optimist, at the question "Can people be that dumb?" I always answer "Yes! they can!" :laugh:
  • 0 Votes
    3 Posts
    0 Views
    C
    0? lol, I agree. It's totally bizarre. I'll keep digging, maybe write my first article. Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
  • C++

    c++ question
    7
    0 Votes
    7 Posts
    0 Views
    M
    Use wxWidgets[^] GUI library, then your code will work on Windows, Linux and MacOS.
  • kernel32.lib

    question
    3
    0 Votes
    3 Posts
    0 Views
    C
    Thank you Daniel
  • Project

    c++ help question learning
    4
    0 Votes
    4 Posts
    0 Views
    C
    Are you female and cute? :doh: Just kidding, but when I was back in engineering school a *very* long time ago, that never hurt. Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
  • Code for finding eigenvectors and eigenvalues

    6
    0 Votes
    6 Posts
    1 Views
    M
    If you got the code then please send ma at my Gmail naeemyaseen78@gmail.com
  • QueryPerformanceCounter

    question
    5
    0 Votes
    5 Posts
    0 Views
    C
    thanks, I got it working.
  • 0 Votes
    4 Posts
    0 Views
    L
    Sorry, I cannot help further as I don't have MFC.
  • Possible to #if in case an enum exists?

    question
    5
    0 Votes
    5 Posts
    0 Views
    L
    :thumbsup:
  • Google-contacten synchroniseren niet met Mac

    database com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied