It depends on when you want to start the thread. For example, you have CButton , If you wanna start listening to COM on the click of it, put the AfxBeginThread inside the OnClick Event of the CButton. You can do that anywhere.
You can also poll the COM port; this isn't necessarily the nicest design, but it may work. See the function SetCommTimeouts to set read timeouts. In fact, you may want to do this in either case; your thread can block reading the port and wake up every 1s to check if it is time to quit the application.
Save yourself a bunch of hassle and do a bit of reading about thread safety issues now before you do a bunch of work.
Try searching CodeProject for "video capture" or "webcams" - look for a sample application which captures frames of video to memory.
If you set the webcam / capture routine to capture 8-bit Black & White (monochrome), these captured images are really just 2D arrays of intensity (for 8-bit monochrome, each pixel is an intensity value in the range 0 to 255.)
If you capture in colour, you will have to convert the colour information of each pixel to an equivalent intensity value. I'd guess there are libraries to do that sort of thing.
Find a suitable project to start with, try playing around, then ask specific, detailed questions about any problems you encounter.
I have created a property sheet wizard using the below procedures:
Projects >> Add to Project >> Components & Controls
Select the Directory Visual C++ Components
Select the Property Sheet Component
Click the Insert Button.
Problem is that wizard is displaying a "help" button which i want to make invisible.Can anyone kindly tell me how to make the help button invisible.
Is that really necessary? It's much like when a commercial comes on during a (taped) television program. You can either hit the FF button, or mute it. Either way, it's ignored and you move on. This is hardly something to get so worked up over.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
How could I divide the screen into 32 pieces after I capture the whole desktop in server application, and then send those data directly to client application, and at last scrabble them up to the whole image(Bitmap format) and show it on client?
One day a pretty girl asked me:"Do u think you are handsome?" "I don't think so!".She gave a slap in my face:"Why lying?"...
Last Visit: 31-Dec-99 18:00 Last Update: 28-Sep-21 17:14