how to insurt a message box into a loop

Posted by: masterh4x0r89

how to insurt a message box into a loop - 11/04/03 05:11 PM

ok i get to
include #
int main()
{
int x=0;
while(x<10000)
{
cout<x++;

return 0;
}
ok and iv tryed a hole buntch of shit to put the fucking message box in there
i want it to do the numbers and the message box to pop up and i dont know how someone help
Posted by: pergesu

Re: how to insurt a message box into a loop - 11/04/03 10:05 PM

Well you're doing basic console programming there. If you want a message box, you're gonna need to use the Win32 API. I don't know anything about it really, do some searching for Win32 API tutorials, or talk to SilentRage.
Posted by: SilentRage

Re: how to insurt a message box into a loop - 11/04/03 11:45 PM

MessageBox(0, "Message", "Title", MB_OK);
Posted by: paradox

Re: how to insurt a message box into a loop - 11/05/03 12:12 AM

you'll have to include to get the win32api calls to work..
int MessageBox(
HWND hWnd, // handle of owner window
LPCTSTR lpText, // address of text in message box
LPCTSTR lpCaption, // address of title of message box
UINT uType // style of message box
);
use silentrage's example as a guide MB_OK is just a type of messagebox MB_ICONWARNING is another just get win32.hlp also known as windows 32 api refrenece
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/14/03 08:48 PM

i tryed the MessageBox(0, "Message", "Title", MB_OK); shit didnt work any other ideas?
Posted by: paradox

Re: how to insurt a message box into a loop - 11/15/03 12:05 AM

why didnt it work..
you have to #include
it holds the win32api functions
show your new source
Code:
#include <iostream>
#include <windows.h>
int main(){
for(int x=0;x<10000;x++){
MessageBox(NULL,"pwnd noobie","long loop huh?",MB_OK);
}
return 0;
}
there is a loop for you i wudnt run it if i were u :p
make the reitterations smaller
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/15/03 01:04 AM

whats windows.h like whats it needed for?
i got the program and all but whats the differt shit.h used for?
Posted by: SilentRage

Re: how to insurt a message box into a loop - 11/15/03 07:05 PM

MessageBox works only on windows (and windows emulators). windows comes with that function. "windows.h" tells the compiler you want to use windows specific functions. Without it the compiler wouldn't know what the heck a "MessageBox" function is. Each *.h file tells the compiler about new functions you can use.
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/15/03 11:21 PM

k kool got it
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/17/03 12:27 AM

ok i tryed the and the rest of that shit it diddnt work i got 31 errors <img src=" title="" src="graemlins/eek.gif" />
Posted by: zenon

Re: how to insurt a message box into a loop - 11/17/03 08:29 AM

what compiler && windows system are you using?
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/17/03 10:58 PM

im using dev c++ it kool
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/17/03 10:58 PM

and me windows
Posted by: paradox

Re: how to insurt a message box into a loop - 11/17/03 11:54 PM

post your errors and was it with my app or yours.. coz mine works fine
Posted by: masterh4x0r89

Re: how to insurt a message box into a loop - 11/18/03 03:40 AM

its on my comp and im on my moms