im makeing a program but im haveing some issus with it
i dont know how to make (search for a word) and the program will find it form a database or something
if any one can help that would be great full
I am branching out and looking at robotics and have a Mini ITX (GA-PCV2) running windows xp with a number of onboard systems however i am in need of additional communication means.
I am currently using the parralel port to control 8 relays (may try and improve that number with this artical) Parallel Port Pin Control Library (PaPiC)[^] however what i would like is to be able to send a signal via the IDE channels to control a further 16 relays or more if possible.
I currently only use a singal 3.5" hdd on the ide channel.
Their is two IDE ports/ plugs on the motherboard so it would be even better if i could run more the one relay control board but one thing at a time.
Any help would be appreciated and if someone feels this is on the wrong board please let me know.
First of all, I am new to MFC programming so thank you for your patience.
Here is my situation:
I have a Stereo camera which provides grayscale images. I can connect to the camera without any problems and I get a unsigned char pointer to the image.
I am now at the stage where I want to display this image in an MFC program. However I am very confused with how images are handled. I know how to load a bitmap image from a file and then display it but I just couldnt figure out how to display an image (referenced by a pointer) to the application. Help!
Thanks for your reply. Unfortunately I am still confused on exactly how this works.
In various examples (from various sites), I have seen the bitmap class and the BITMAPINFO structs used with images loaded from file or the resources. However, I could not find anything that uses an image (referenced by a pointed) already in the memory and somehow (either through picture control or whatever means) onto the MFC dialog GUI. Do you have any examples? Or even if you could point me into the right direction, that would be awesome!
I used the following comment in one of my programs:
BITMAPINFO *m_pBitmapInfo; // A DIB (Device Independant Bitmap) consists of two distinct//parts: a BITMAPINFO structure describing the dimensions and // colors of the bitmap, and an array of bytes defining the // pixels of the bitmap
So say you have a certain type of camera, once you've set it up etc, the dimensions, the way the colours are defined, whether the image is in top-down or bottom-up format, black/white or colour, all this sort of stuff is likely to stay the same for each frame you receive from your camera.
You need this sort of information about the picture plus the actual data/bytes that make up the image.
My approach (but there may be others) sets up exactly what you would have if you'd loaded a .bmp file from disc with all the information but then combines it with the actual image data feom the camera to produce a complete bitmap or CBitmap object in MFC.
You could have a look at how the BITMAPINFO and BITMAPINFOHEADER structures are made up which might help.
You say you can get the data, which presumably is in some image, picture or video format, for example: perhaps it is in YUV422. Basically find or write some code that will covert between this format and the Bitmap format you're almost there. If you're into this to write some MFC code do the former. If you're aim is to only to see the pictures from your camera try the latter.
visual studio requires you to have a project & workspace in order to compile anything. Make a new project (it will create a workspace automatically) and then figure out how to "add a source file" to the project. Then you can compile it.
Projects & Workspaces are things that help organize different projects that a coder might otherwise just be sticking in a directory labeled, "/usr/home/mystuff/".
I want to write my code ( Vc++) in txt file then I want to compile it, how I do that?
What do you mean exactly ? You want to load a text file at run-time and execute the code in that file at run-time ? If yes, then C++ is not meant for that. C++ is a compiled language and you can't execute code this way. You will need to use a scripting language for that purpose instead.