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
  • CFileDialog OnTypeChange issue

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • angry

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • C Programming

    question help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 bytes CImage saved

    c++ graphics help question
    8
    0 Votes
    8 Posts
    0 Views
    _
    Ahh, yes, you are right. Thank you.
  • help

    help question c++
    11
    0 Votes
    11 Posts
    0 Views
    R
    thanks for the help friend
  • 0 Votes
    2 Posts
    0 Views
    J
    You must implement drag support on the source (TreeView) and drop support on the target (ListBox). With MFC this can be done using OLE Drag and Drop[^]. Tree Views have basic drag support and it seems that you already got it working. So you have to implement the drop support to your List Box. There are some articles here at CodeProject that might be helpful: http://www.codeproject.com/search.aspx?q=mfc+drag+drop&x=0&y=0&sbo=kw[^]
  • c programm

    sysadmin linux help tutorial
    4
    0 Votes
    4 Posts
    0 Views
    M
    he probably not want to code the ping itself, but how to call it . I'd rather be phishing!
  • Function parameter question

    question
    7
    0 Votes
    7 Posts
    0 Views
    CPalliniC
    func(node* &h, int n, int m) h is a INOUT parameter, if func changes h then the caller see the changed value (that is after function execution, h could point to another address). func(node* h,int n, int m) h is a IN parameter, if func changes it, the caller doesn't see the changed value.
  • help

    help csharp visual-studio question
    4
    0 Votes
    4 Posts
    0 Views
    R
    Thanks buddy that was the error
  • Creating a thread in c

    question
    3
    0 Votes
    3 Posts
    1 Views
    D
    CreateThread() "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
    J
    CPallini wrote: Anyway, it is wrong calling delete on the memory allocated via CreateDIBSection. Which might be the reason for the exception because _BLOCK_TYPE_IS_VALID is thrown when trying to delete memory that wasn't allocated using new.
  • Shift + VK_LEFT

    debugging help question
    15
    0 Votes
    15 Posts
    1 Views
    _
    Because left/right key combined with shift/ctrl key are used to mark grid cells, I have chose to use F7/F8 key for my needs. Thank you all of you for patience and attention. Bye.
  • Having trouble with c++ templates

    c++ help question csharp visual-studio
    2
    0 Votes
    2 Posts
    2 Views
    CPalliniC
    Have alook at: "[34.12] Why can't I separate the definition of my templates class from it's declaration and put it inside a .cpp file?"[^] and also at [34.13] of the same document.
  • the drag of listview column don't work

    json question
    2
    0 Votes
    2 Posts
    1 Views
    _
    LVS_EX_HEADERDRAGDROP is a extended style, that is why should be setup not there, but using SetExtendedStyle method: ListCtrl.SetExtendedStyle(LVS_EX_HEADERDRAGDROP); I don't know Win32, but I am sure there is SetExtendedStyle Win32 function ...
  • Define 'Enter' key in C

    question
    3
    0 Votes
    3 Posts
    0 Views
    M
    Both programs debug well ! :/
  • 0 Votes
    5 Posts
    0 Views
    L
    Vaclav_Sal wrote: Apparently compiler does not like to have both constructor and class variable names to be same Not true, it does not matter. That is why you need to use the this pointer, so the compiler knows which variable you are referring to. Consider the following: Class Foo { int var1; foo(int var1) { var1 = var1; // referring only to the parameter var1 this->var1 = var1; // now it knows that the first one is the class variable. } None of which has any relevance to the issue you are describing. Forget about what goes on in the constructor, it is not connected to the probelm. You need to go back to the documentation and check carefully the definition of the TFT_LCD::LCD_Write_COM_DATA_t method.
  • 0 Votes
    5 Posts
    0 Views
    D
    If the parameters are actually constants, how about instantiating a template class? int const PROCESSOR_COUNT = 42; template scheduler { // constructors, other methods private: processor_data data[processor_count]; }; scheduler sched; If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill
  • How to break an infinite loop

    question tutorial
    3
    0 Votes
    3 Posts
    0 Views
    F
    if i'm not mistaken ctrl c(yes the copy shortcut) should break an infinite loop
  • Customize filter control of CHeaderCtrl

    c++ question
    7
    0 Votes
    7 Posts
    1 Views
    A
    I could only find it by using FindWondow API in class derived from CHeaderCtrl. Ans I customized the edit control from OnCustomDraw(). aks
  • Call to std::thread::join() in the destructor of a global variable

    question
    6
    0 Votes
    6 Posts
    0 Views
    CPalliniC
    Looks a sensible hypothesis to me.