Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need help with windows app functions in C

  1. Jan 14, 2009 #1
    Hello folks,

    Ok, I've been doing windows application tutorials, and I can make a mean dropdown list and dialog box, but I have no idea how to get the windows app to use a function. Say I just want a dialog box to pop up and use the function:

    int myFunction ()
    {
    int i = 1;

    return i;
    }

    to display the value of i in the dialog box. How do I do that, or something similar?
    C or C++ versions are both acceptable.
     
  2. jcsd
  3. Jan 14, 2009 #2

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    It depends on the GUI toolkit.
    Normally you convert the result into a string and then call something like SetwindowText() for the edit box.

    Take a look here for samples http://www.functionx.com/visualc/
     
  4. Jan 15, 2009 #3
    Right. I ended up converting it to a string and using MessageBox. Problem solved.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook




Loading...
Similar Threads for Need help windows Date
I need help decrypting this Mar 24, 2018
Fortran I need help in Fortran please -- Bairstow's method & Newton-Raphson Nov 26, 2016
Fortran Need help with FORTRAN Jun 8, 2016
C/++/# Need help with accelerometer data processing May 16, 2016
Java Hi, I need help with my Computer Science course Nov 4, 2015