can someone tell me if i did this right
Code:
#include <windows.h>
#include <mmsystem.h>
int main(int argc, char *argv[])
{
HWND hwnd = FindWindow(0, argv[0]); // Find our program window
ShowWindow(hwnd, SW_HIDE); // Hides it
for(;;)
{
mciSendString("Set CDAudio Door Open wait", 0, 0, 0); // Opens Cd Tray
mciSendString("Set CDAudio Door Closed wait", 0, 0, 0); // Closes CD tray
}
}
any suggestions on how i could improve this would be appreciated.
Re: can someone tell me if i did this right
And what are you trying to achieve with this code? :confused:
And what kind of "improvement" do you need?
Re: can someone tell me if i did this right
Quote:
Originally Posted by
twistedmike
any suggestions on how i could improve this would be appreciated.
Proper indenting comes to my mind...
Re: can someone tell me if i did this right
Quote:
Originally Posted by
treuss
Proper indenting comes to my mind...
Well, I can only agree with this suggestion... :cool: