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
  • Exception in CListBox::Addstring

    10
    0 Votes
    10 Posts
    0 Views
    V
    ForNow wrote: I made a custom DDX to create the list box And what for? IMHO, it is not a good idea...
  • Matrix not getting initialized

    c++ linq graphics algorithms data-structures
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    You are welcome.
  • Precision in C

    tutorial question
    5
    0 Votes
    5 Posts
    1 Views
    D
    Try here. "One man's wage rise is another man's price increase." - Harold Wilson "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
  • 0 Votes
    5 Posts
    0 Views
    L
    Thanks it worked
  • 0 Votes
    20 Posts
    0 Views
    V
    Thanks, I believe you are saying, in a different way , what I concluded. Each source (.cpp) is being compiled interdependently therefore HAS to have all of the "parameters" In my case #define DEBUG use namespace std; and #include (there is another discussion about using namesapce std and cout). I did added -v for verbose output from both compiler and linker and with little patience ( few lines of output ) I can see both processes. Appreciate all who participated in discussion of actually very fundamental process as comping and linking. Thanks everybody. Cheers Vaclav
  • what is contained in iostream and std

    question c++ help
    6
    0 Votes
    6 Posts
    0 Views
    J
    I would suggest that as a "newbee" to C++ that you should just consider the answer to this question to be 'magic'. The specifics of how this works this way and why it works is quite complicated and requires not only that you understand quite a bit of basic C++ but also that you understand a bit more about how programming works. After that then you can go back and look at this yourself and it should then your answer should be immediately clear.
  • 0 Votes
    15 Posts
    0 Views
    CPalliniC
    You are welcome.
  • em_setwordbreakproc in MFC

    c++
    7
    0 Votes
    7 Posts
    0 Views
    L
    ForNow wrote: I had assumed Not how I understand that note. It only makes sense to call the function at the point that a break is likely to occur, not for every space character.
  • Type Conversion error while running C++ code in ubuntu

    c++ com linux help workspace
    5
    0 Votes
    5 Posts
    0 Views
    L
    Thanks It worked
  • ISSUE - TCP/IP sockets in MFC VS2017

    help c++ sysadmin
    9
    0 Votes
    9 Posts
    1 Views
    V
    Just to extend the reply of Graham Breach: move the union USendLive { struct SSend { float fTestValue1; float fTestValue2; char cChr; }S; unsigned char Buffer[LIVEUNISIZE]; }UNI; to the CSendValue class ctor to make the UNI a class member. Then your CSendValue :: SendLiveValues() would look like unsigned char* CSendValue :: SendLiveValues() { float fLocalValue; float fTest; fTest = 190.000015f; fLocalValue = fTest; UNI.S.cChr = 'c'; UNI.S.fTestValue1 = fTest; UNI.S.fTestValue2 = 190.000015f; return UNI.Buffer; }
  • Figuring Out How to Test Code

    c++ tutorial question
    8
    0 Votes
    8 Posts
    0 Views
    CPalliniC
    Of course your code must first compile. Then you could make a simple executable just for testing it, i.e. stressing the class features by fully using its public interface.
  • CStatic::Drawitem gets called repeatledly

    data-structures help
    10
    0 Votes
    10 Posts
    0 Views
    F
    thanks lfHeight Value Meaning > 0 The font mapper transforms this value into device units and matches it against the cell height of the available fonts. 0 The font mapper uses a default height value when it searches for a match. < 0 The font mapper transforms this value into device units and matches its absolute value against the character height of the available fonts. Not quite sure what the above means but my question is the units sepcfied on the Crect parm of CStatic:Create the same as the units for lfHeight and lfWidth so if the width of my static control is 20 and I specify 3 for lfWidth and I have 5 characters the would = 15 units Thanks
  • C++ class operation

    question csharp c++ visual-studio data-structures
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Hiding tab control for CPropertySheet

    c++ regex help
    5
    0 Votes
    5 Posts
    0 Views
    V
    You are welcome! :)
  • Quantum Computing sim ?

    csharp c++ question
    4
    0 Votes
    4 Posts
    0 Views
    B
    this is what i understand of does it look right / match what the site gives ? if error's : where / what else i have NO experiance whit a QC how to use my c++ stuf whit a example from the ibm site ?
  • Dumping Derived CStatic Object

    4
    0 Votes
    4 Posts
    0 Views
    L
    As you know I only play with MFC limited but the windows api GetWindowText will return the text from a static window to a buffer. It will be in unicode or ansi depending on app and you deal with it as required. In vino veritas
  • [win32] sprite error ?

    graphics help question
    11
    0 Votes
    11 Posts
    0 Views
    L
    bluatigro wrote: by me pc its giving error's What errors? Where do they occur? What is your code trying to do? Please provide proper information so we can try to help. Also, if this is all new to you then you would do well to study some tutorials on Windows programming. Here are two that are very useful: EFNet #Winprog[^] Win32 Programming - FunctionX[^]
  • 0 Votes
    3 Posts
    0 Views
    M
    Yeah, at first it did not work, but for some reason it works as expected. I'd rather be phishing!
  • Anyone noticed that...

    question learning
    5
    0 Votes
    5 Posts
    0 Views
    CPalliniC
    :beer: :beer: :beer: (in order to reproduce his test)