Emwin with C++

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Emwin with C++

    HI,
    I wanted to use emwin in c++ code. could you please create some sample program where we are using c++ instead of c. As we have emwin written in c but it could also be used in c++ code. all samples i see posted on segger site is in c. how can we catch events and call emwin library in c++? please suggest some simple sample application to start with.

    I want to create one screen in c++ calling emwin library function and also catch the event from different controls.

    thanks
    Om

    The post was edited 1 time, last by Om@segger ().

  • Hello Om,

    You can create your applications with emWin by following the instructions in the chapter 2 "Getting Started" in the emWin documentation. Please note that C++ is not required to send and receive events with emWin. For detailed information about the messaging mechanism, please refer to the chapter 15 "The Window Manager (WM)" in the emWin user manual.

    If you have any further questions, please let me know.

    Best regards,
    Adrian
  • Emwin with C++

    Hello Adrian,

    Thanks for the response.
    I was actually looking to integrate emwin in C++ code. actually my application architecture has middleware in c++ and on top of that we are having GUI as Emwin. so according to that i need to integrate Emwin with my middle ware written in C++. All the events and update will come from middle ware application. I hope you understand what i am asking for. as far as i know emwin libraries are written with "extern C" so we can directly call all the apis from C++ application, I just want to know that how could we proceed further, or is ther [img]opwglobal.com[/img] e any guideline or example code to integrate emwin this way.

    Please reply on this.


    Thanks
    Om
  • Hello Om,

    Actually I would tell you that emWin API's can just be called from C++ applications, since we have the functions declared as "extern C". Obviously you are already aware of that, I must admit that I do not understand what you are asking for. Are you asking for general information, or do you face any problems?

    Please not that the emWin user manual should provide the required information. If you still face problems with emWin, please send a support request to your emWin provider.

    Best regards,
    Adrian
  • Emwin with C++

    What i wanted to know is that do we need to write wrapper classes around the C widgets?

    and use C++ from then on?



    as i understand wrapping will take a bit more time to develop so do we have wrapper classes provided from segger or any example code which will allow us to directly access widget call back and creation from C++ classes.?