Wednesday, November 05, 2003

Google Groups: View Thread "Help using Message Boxes in VC":
"Message 4 in thread
From: Ari Lukumies (ari.lukumies@elmont.fi)
Subject: Re: Help using Message Boxes in VC


View this article only
Newsgroups: comp.os.ms-windows.programmer.win32
Date: 2001-06-19 04:21:15 PST


Rubber Ducky wrote:

> Can anyone point me to an example of a simple proggie that shows a message
> box, and then then finds out which button the user pressed.
> I have this code, but it seems not to work:

#include

int main(void)
{
rc = MessageBox(0, 'Test', 'Testing', MB_YESNOCANCEL);
if (rc == IDYES)
; yes pressed
else if (rc == IDNO)
; no pressed
else if (rc == IDCANCEL)
; cancel pressed
return 0;
}

HTH,
AriL"