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
    3 Posts
    7 Views
    F
    Right upon exiting the C DLL it crashed really don’t think there is any stack storage corruption when I turned if /GS option all was okay Just wondering going from inside a MFC C++ method to C DLL any special calling convention think__cedcl is the default
  • Detours : how to hook QT applications ?

    tutorial c++ com json question
    6
    0 Votes
    6 Posts
    13 Views
    A
    Hi, Would you like to show your code to me? I have a similar problem to solve and want to refer to it! Thank you so much!
  • Converting from MFC to Native Windows C

    c++
    6
    0 Votes
    6 Posts
    8 Views
    L
    My background was also in mainframes (Univac 1100/2200 series), using Assembler and their proprietary high level (C-like) language. I was recruited to my last position specifically because of that background experience. I then transitioned into C, C++ and Java on Unix and Windows systems. Since retiring I have stuck at it and tried to learn new languages/frameworks (Android, C#, .NET, Python, SQL ...) for my own amusement. Much of my knowledge has been gained from articles here on CodeProject and elsewhere, and the help of other experts. So I could not have helped you without the help I received. After all, that is why most of us stick around here. Thanks for your kind comments. And, as always, happy to help where I can.
  • 0 Votes
    9 Posts
    12 Views
    M
    That's great, thanks a lot for your help and finally I will pass my pre-final exam in c programming, thank you
  • how to capture mouse movement and click in windows service

    help tutorial
    3
    0 Votes
    3 Posts
    8 Views
    Richard DeemingR
    Windows services don't run in the context of a user's desktop. At any point whilst the service is running, there could be zero, one, or many users logged in to the computer, each with their own desktop. You need to use a different solution. For example, you can use the Windows Task Scheduler to start an application when any user logs in. That application will have access to the user's desktop. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • conflicting types for 'uint32_t' issue

    help workspace
    6
    0 Votes
    6 Posts
    11 Views
    L
    Then remove the one from XXX_Global.h.
  • Complier error C2280 explanation

    help csharp visual-studio tools
    7
    0 Votes
    7 Posts
    4 Views
    F
    Get clean build seems to do more than clist thanks
  • WaitForSingleObject Visual C++ bug

    c++ help tutorial question announcement
    5
    0 Votes
    5 Posts
    2 Views
    C
    Thank you, With a little English, with a little will, maybe something came out. Thank you again for your help,
  • cannot Create CListBox : CFormView without IDD

    question learning
    3
    0 Votes
    3 Posts
    2 Views
    R
    class MyListBoxView : public CFormView { ... CListBox m_wndListBox; MyListBoxView::MyListBoxView() : CFormView( IDC_LIST1 ) // ID is a LISTBOX control in another .rc file { Create( WC_LISTBOX, L"My devices", WS_CAPTION | WS_CHILD | WS_VISIBLE, CRect( 0, 0, 0, 0 ), this, IDC_LIST1, ( CCreateContext* )NULL ); **Create** fails at: if (!_AfxCheckDialogTemplate(m_lpszTemplateName, TRUE)) { ASSERT(FALSE); // invalid dialog template name I have tried to do w_wndListBox.Create(...), but CFormView::Create is protected and can't be called from outside. I have also tried to call Create in MyListBoxView's ctor, using the static call form (CFormView::Create), but that fails because Create, of course, is not a static and you can't call non-statics from a static. So I must have the class and object structure wrong for these calls not to work.
  • C++ programming

    c++ question
    3
    0 Votes
    3 Posts
    3 Views
    E
    the main reason of why we use namespace identifier is classify our code in a bigger categories and parts. its useful to manage your libraries by "using namespaces". Imagine you can have many different name spaces in your code and every time you need you can use it. its helps you to choose smaller and more abstract names for your classes and functions. for example you can have many Mathematic function and classes in a namespace like "Matrix". in that case you can have simple function names like "add" , "div", "mul" instead of "matrix_add" ,"matrix_dev" and ... to use them in an specific part of your code you can use it in to ways .. 1: Matrix.add(m1,m2); Matrix.div(m3,m4); 2: using Matrix { add(m1,m2); div(m3.m4); } also for defining classes and functions in a namespace you can do it like this ... namespace Matrix { void add(matrix a, matrix b){ ... } void div(matrix a, matrix b){ ... } void mul(matrix a, matrix b){ ... } . . . }
  • One DrawItem Function for both CStatic and CComboBox

    5
    0 Votes
    5 Posts
    4 Views
    F
    The ctltype will help yo distinguish thanks
  • Clist Find question

    question regex
    6
    0 Votes
    6 Posts
    4 Views
    Richard Andrew x64R
    You're welcome! The difficult we do right away... ...the impossible takes slightly longer.
  • vector, adding things

    graphics tutorial question
    6
    0 Votes
    6 Posts
    3 Views
    C
    Thanks for your tip, at this point I`m still not sure what I want to use.
  • Why won't VS2015 let me compile?

    help question
    15
    0 Votes
    15 Posts
    3 Views
    Richard DeemingR
    Rep-point fluffing to get his spam link shown in his profile. Message and user reported. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Controls in CPaneDialog (MFC) not Working

    c++ help question learning
    6
    0 Votes
    6 Posts
    3 Views
    K
    You need to call at first the CPaneDialog::HandleInitDialog(wParam, lParam) to create all the Dialog members.
  • Moving a STL container around

    c++ graphics docker
    7
    0 Votes
    7 Posts
    4 Views
    C
    ok, I think I get your point
  • macro usage error

    help c++ tutorial
    3
    0 Votes
    3 Posts
    5 Views
    L
    You are trying to dereference the BDADDR_ANY structure. You should just take the value, which is already the address. loc_addr.rc_bdaddr = BDADDR_ANY; // remove the asterisk.
  • 0 Votes
    4 Posts
    2 Views
    CPalliniC
    You are welcome. "In testa che avete, Signor di Ceprano?" -- Rigoletto
  • 0 Votes
    9 Posts
    3 Views
    Richard Andrew x64R
    Plus, let's not forget the "bible" of native/managed interop, C++/CLI in Action[^] by our friend Nish. The difficult we do right away... ...the impossible takes slightly longer.
  • 0 Votes
    7 Posts
    2 Views
    K
    I found that via the class I was looking at and reading the class methods when we were looking at the rectangle offsets. I read it as it would recalc the rectangles of the toolbar and plant it, clearly I was incorrect as my result are as you mentioned...not working. I will look at the code samples you linked to. Thank you, Chris