|
-
Mar 31st, 2001, 11:56 AM
#1
Thread Starter
Frenzied Member
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 ???
-
Mar 31st, 2001, 12:23 PM
#2
Fanatic Member
Not sure, but I think there is supposed to be only one | in the message box type.
Last edited by Wynd; Mar 31st, 2001 at 02:28 PM.
Alcohol & calculus don't mix.
Never drink & derive.
-
Mar 31st, 2001, 12:30 PM
#3
Frenzied Member
|| 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 ( | )
Harry.
"From one thing, know ten thousand things."
-
Mar 31st, 2001, 01:28 PM
#4
Monday Morning Lunatic
Code:
TCHAR pcBuf[MAX_PATH];
GetWindowsDirectory(pcBuf, MAX_PATH);
MessageBox(NULL, pcBuf, "Windows folder!", MB_OK);
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Mar 31st, 2001, 05:04 PM
#5
Thread Starter
Frenzied Member
Thanks guys! That worked out perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|