Need help with windows app functions in C

  • Thread starter VirObitus
  • Start date
  • #1
19
0
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.
 

Answers and Replies

  • #2
mgb_phys
Science Advisor
Homework Helper
7,774
13
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/
 
  • #3
19
0
Right. I ended up converting it to a string and using MessageBox. Problem solved.
 

Related Threads on Need help with windows app functions in C

Replies
23
Views
5K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
4
Views
2K
Replies
17
Views
5K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
2
Views
2K
Replies
1
Views
2K
Replies
25
Views
19K
Top