Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 625201

@User 625201
About
Posts
20
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • QuickWin
    U User 625201

    Many thanks. I forgot to change the prototype (rookie mistake). DCrawford999

    C / C++ / MFC c++ csharp help tutorial

  • QuickWin
    U User 625201

    If I change it to a VOID and remove the return, I get: QuickWin.cpp(196) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CQuickWinApp::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' None of the functions with this name in scope match the target type DCrawford999

    C / C++ / MFC c++ csharp help tutorial

  • Sending an interrupt to a process
    U User 625201

    I am trying to find a way to send an interrupt to a process. I have put a GUI around a "console application" and redirected its output to the GUI. Now I need a way to send a CTRL-C to the "Console App". Any help would be greatly appreciated. Thanks DCrawford999

    C / C++ / MFC help

  • QuickWin
    U User 625201

    The void is coming from afxmsg.h dealing ON_REGISTERED_THREAD_MESSAGE but I am not sure how too clear up the conflict. ON_REGISTERED_THREAD_MESSAGE(WM_STDIO_COMMAND, OnStdioCommand) // for Thread messages #define ON_THREAD_MESSAGE(message, memberFxn) \ { message, 0, 0, 0, AfxSig_vwl, \ (AFX_PMSG)(AFX_PMSGT) \ (static_cast< void (AFX_MSG_CALL CWinThread::*)(WPARAM, LPARAM) > \ (memberFxn)) }

    C / C++ / MFC c++ csharp help tutorial

  • QuickWin
    U User 625201

    I downloaded the QuickWin example and opened the .sln file with "MS Visual C++ .net 2003". It asked to convertthe files, which I did. It compiled with the following error: QuickWin.cpp(195) : error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CQuickWinApp::* )(WPARAM,LPARAM)' to 'void (__thiscall CWinThread::* )(WPARAM,LPARAM)' I had a buddy try it under VC++ 6 and he had no problems. Does anyone have any ideas or pointers. Thanks DCrawford999

    C / C++ / MFC c++ csharp help tutorial

  • C++ Compilers
    U User 625201

    Check out http://www.openwatcom.org

    Managed C++/CLI c++

  • Call proc inside namespace from outside the namespace
    U User 625201

    I have a Windows Form Application (.NET), I am having trouble calling a procedure within the namespace from outside the namespace. I have the procedure displaychar outside the namespace which is a wrapper to be called from another programming language. The procedure showchar is within the namespace. The code: void displaychar(int mychar) //outside the namespace { //showchar(mychar); formoutput::Form1::showchar(mychar); } --results in: error C2653: 'formoutput' : is not a class or namespace name Anyone have any ideas?? -Don

    Managed C++/CLI csharp help question

  • textbox trouble
    U User 625201

    I'm not sure haow to qualify the textbox-append statement. The following statement: myapp1::Form1::ioBOX.Appendtext("x"); Gives this error: error C2228: left of '.Appendtext' must have class/struct/union type type is '' ---------------------------------------------------------------------- Any ideas? ---------------------------------------------------------------------- //MY CODE - error near bottom #pragma once extern "C" int magiccalc(void); namespace myapp1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); magiccalc(); } protected: void Dispose(Boolean disposing) { if (disposing && components) { components->Dispose(); } __super::Dispose(disposing); } private: System::Windows::Forms::TextBox * ioBOX; private: void InitializeComponent(void) { this->ioBOX = new System::Windows::Forms::TextBox(); ... ...yadda yadda } public: static void TOioBox(int outnum) { ERROR----> myapp1::Form1::ioBOX.Appendtext("x"); } }; } extern "C" { void showme(int wrapnum) // My wrapper for C { myapp1::Form1::TOioBox(3); } } Thanks

    C / C++ / MFC graphics help question

  • Mixing C++ and C
    U User 625201

    I've gotten past this problem. Thanks to all Don

    Managed C++/CLI learning c++ graphics docker help

  • Name Mangling
    U User 625201

    myapp1::Form1::ioBOX.Appendtext("x"); Gives this error: error C2228: left of '.Appendtext' must have class/struct/union type type is '' ---------------------------------------------------------------------- Any ideas? ---------------------------------------------------------------------- #pragma once extern "C" int magiccalc(void); namespace myapp1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); magiccalc(); } protected: void Dispose(Boolean disposing) { if (disposing && components) { components->Dispose(); } __super::Dispose(disposing); } private: System::Windows::Forms::TextBox * ioBOX; private: void InitializeComponent(void) { this->ioBOX = new System::Windows::Forms::TextBox(); ... ...yadda yadda } public: static void TOioBox(int outnum) { ERROR----> myapp1::Form1::ioBOX.Appendtext("x"); } }; } extern "C" { void showme(int wrapnum) // My wrapper for C { myapp1::Form1::TOioBox(3); } }

    Managed C++/CLI c++

  • Name Mangling
    U User 625201

    Well, progress is made. Any advice on appending text to a textbox in TOoutbox function. Here is the code: #pragma once extern "C" int magiccalc(void); namespace myapp1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); magiccalc(); } protected: void Dispose(Boolean disposing) { if (disposing && components) { components->Dispose(); } __super::Dispose(disposing); } private: System::Windows::Forms::TextBox * outBox; private: System::ComponentModel::Container * components; void InitializeComponent(void) { ...yada yada } public: static void TOoutbox(int outnum) { outBox->AppendText("x"); //add text to textbox } }; } extern "C" { void showme(int wrapnum) // My wrapper for C { myapp1::Form1::TOoutbox(3); } } Thanks to all

    Managed C++/CLI c++

  • Name Mangling
    U User 625201

    Still get the same error.

    Managed C++/CLI c++

  • Name Mangling
    U User 625201

    Is there a way to declare a function (SHOWME in this case) in C++ to prevent the name mangling so it can be referenced by C code. I currently have this (form1.h): public: void showme(int thenum) { MessageBox::Show(S"abc", S"Result..."); }

    Managed C++/CLI c++

  • Mixing C++ and C
    U User 625201

    That should be the case but I am getting a link-time error from the C object module that SHOWME (called from C but coded as function in cpp) is an unresolved external. public: void __cdecl showme(int thenum) { MessageBox::Show(S"abc", S"Result..."); } Should I have declared the function differently so that C can see it? I appreciate any help you can give. Don

    Managed C++/CLI learning c++ graphics docker help

  • Mixing C++ and C
    U User 625201

    In a nutshell, I want to display data computed by my current code on a windowed form. My computations are produced by routines in maybe 50 or so "C compatible" source modules.

    Managed C++/CLI learning c++ graphics docker help

  • Mixing C++ and C
    U User 625201

    My ERROR: sim50avc error LNK2001: unresolved external symbol "void __cdecl showme(int)" (?showme@@$$J0YAXH@Z) I have created a simple Form project and tried to mix C++ and my existing C code. With problems of course. Here is the important code. /* BEGIN - don.c */ /* ############################################################ */ /* ### This just a cut-down example of my C code ### */ /* ############################################################ */ /* ### The fact that it is C code and not C++ cannot change ### */ /* ############################################################ */ #include extern void showme(int); /* call this routine in Form1.h */ int magiccalc() /* Magic calculation - written in C */ { showme(3); /* use the integer 3 instead of showing the calculations code */ return(0); } /* ############################################################ */ /* END - don.c */ /* BEGIN - Form1.h */ #pragma once extern "C" int magiccalc(void); namespace sim50avc { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { int num; InitializeComponent(); num = magiccalc(); /* Call magiccalc in don.c */ /* num is a meaningless return value */ } protected: void Dispose(Boolean disposing) { if (disposing && components) { components->Dispose(); } __super::Dispose(disposing); } private: System::Windows::Forms::TextBox * inputBox; private: System::Windows::Forms::TextBox * outputBox; private: /// /// Required designer variable. /// System::ComponentModel::Container * components; /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// void InitializeComponent(void) { this->inputBox = new System::Windows::Forms::TextBox(); this->outputBox = new System::Windows::Forms::TextBox(); this->SuspendLayout(); // // inputBox // this->inputBox->Location = System::Dra

    Managed C++/CLI learning c++ graphics docker help

  • Mixing C++ and C code - HELP
    U User 625201

    It's the second line of code in Form1.h Thanks though

    C / C++ / MFC learning c++ graphics docker help

  • Mixing C++ and C code - HELP
    U User 625201

    Here are the 2 errors. sim50avc fatal error LNK1284: metadata inconsistent with COFF symbol table: symbol '?magiccalc@@$$FYAHXZ' (0A00002D) mapped to '?magiccalc@@$$J0YAHXZ' (06000001) in don.obj c:\other\vc_projects\sim50avc\Form1.h(97): warning C4440: calling convention redefinition from '__clrcall ' to '__cdecl ' ignored

    C / C++ / MFC learning c++ graphics docker help

  • Mixing C++ and C code - HELP
    U User 625201

    I can send the project in a zip file if anyone is willing to look at it. Thanks Don

    C / C++ / MFC learning c++ graphics docker help

  • Mixing C++ and C code - HELP
    U User 625201

    I have created a simple Form project and tried to mix C++ and my existing C code. With problems of course. There is no need for controls on the form to try this example. Here is the important code. /* BEGIN - don.c */ /* ############################################################ */ /* ### This just a cut-down example of my C code ### */ /* ############################################################ */ /* ### The fact that it is C code and not C++ cannot change ### */ /* ############################################################ */ #include extern void showme(int); /* call this routine in Form1.h */ int magiccalc() /* Magic calculation - written in C */ { showme(3); /* use the integer 3 instead of showing the calculations code */ return(0); } /* ############################################################ */ /* END - don.c */ /* BEGIN - Form1.h */ #pragma once extern int magiccalc(void); namespace sim50avc { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// public __gc class Form1 : public System::Windows::Forms::Form { public: Form1(void) { int num; InitializeComponent(); num = magiccalc(); /* Call magiccalc in don.c */ /* num is a meaningless return value */ } protected: void Dispose(Boolean disposing) { if (disposing && components) { components->Dispose(); } __super::Dispose(disposing); } private: System::Windows::Forms::TextBox * inputBox; private: System::Windows::Forms::TextBox * outputBox; private: /// /// Required designer variable. /// System::ComponentModel::Container * components; /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// void InitializeComponent(void) { this->inputBox = ne

    C / C++ / MFC learning c++ graphics docker help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups