Hi,

I'm trying to implement a very simple function using VC++ in response to a user hitting a command button on a dialog box.

Everytime the user hits the button, I want a counter to increment and popup a message box to inform the user how many times the button has been pressed.

I defined an int as iCnt and then in the code I have:

...
iCnt=1;
MessageBox(hDlg,iCnt,"Info",MB_OK);
//implement counter incrementer here..
...

When running the above code, I get the following error:

'MessageBoxA' cannot convert parameter 2 from int to const char * bla bla bla...

I'm assuming the message box wants a string rather than an int. Also, how would I increment the counter after MessageBox()?

Thanks,

Dan