Tag Archives: gcc

How a console application can set the size of its window

This is an example of a Win32 console application that sets the size of the window it’s running in. When you run it, it sets the size of the console window to 640 x 400 pixels. It actually seems to … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , | 2 Comments

Simulating a keystroke in Win32 (C or C++) using SendInput

This program is a simple example of using the Win32 SendInput function to generate a simulated keystroke. When you run this program, it simply waits 5 seconds and then simulates a press and release of the “A” key on the … Continue reading

Posted in Uncategorized | Tagged , , , , , , | 81 Comments

OpenGL / GLUT example program

This is a simple OpenGL example program using the GLUT toolkit for window creation and event management. This is the code used to create the above window: To compile this program with gcc, I used the following command: gcc -o … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

SerialSend – a Windows program to send a short text string via serial port

NOTE (18-12-2012): Since posting this, I have updated SerialSend to add some additional useful features and make more robust. The updated version is available from the SerialSend page. When I’m building robots, I sometimes find it useful to send short … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , | 29 Comments

Writing Bitmap Files in Windows

This is a bitmap file writing example. I compiled it with MinGW (gcc). It generates the following image and saves it as a bitmap file called “image.bmp”. Here’s the source code:

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

multisnapz – command line image capture from multiple VFW cameras

EDIT (20-11-2011) : Since posting this, I have created a new DirectShow command line image grabber called CommandCam, which I recommend you use instead of multisnapz. Get CommandCam here (binary download and source code available). I’ve just tried modifying the … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 5 Comments

A command line cam image grabber

EDIT (20-11-2011) : Since posting this, I have created a new DirectShow command line image grabber called CommandCam, which I recommend you use instead of this one. It’s also completely free. Get CommandCam here (binary download and source code available). … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 75 Comments