-
When I use the following code to display a messagebox with an information icon, I get OK & Cancel:
Code:
MessageBox("Now opening CyberCarsten's Website", "CyberCarsten's Website", MB_OK || MB_ICONINFORMATION);
Also how can I have a messagebox pop up with the path to the windows directory using GetWindowsDirectory ???
-
Not sure, but I think there is supposed to be only one | in the message box type.
-
|| is logical OR, | is bitwise OR. The constants you are using to define different attributes of the messagebox are bit flags which you need to bitwise OR together to get all the flags in one variable. So use just one pipe character ( | )
-
Code:
TCHAR pcBuf[MAX_PATH];
GetWindowsDirectory(pcBuf, MAX_PATH);
MessageBox(NULL, pcBuf, "Windows folder!", MB_OK);
-
Thanks guys! That worked out perfectly! :)