how can I sleep my program without sleeping others (or making them slower)?
I am using a windows application. here is a fragment of my code:
//#includes...
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, char * cmdParam, int cmdShow)
{
MSG msg;
int status;
Window myWind(SW_SHOW,"Name",150,120,500,0);
for(int i=0;i<550;i++){
myWind.setLocation(i,i);
//here is my problem
//is there another way (like a thread)?
Sleep(100);
}
while ((status = GetMessage (& msg, 0, 0, 0)) != 0)
{
if (status == -1)
{
return -1;
}
DispatchMessage (& msg);
}
return msg.wParam;
}