Analyzing the source of CxImage library (ximawnd.cpp), it seems the HDC value is used to format and draw the text on a temporary in-memory bitmap, and then the image is copied from this bitmap to CxImage object.
It does not look much optimized for speed, and maybe you will have time to investigate some other approaches, like creating your own HBITMAP object, drawing on it, and then saving it to a file, for example using CImage class from ATL/MFC?
I am writing an application that generates documents and I wqould like to open them in Microsoft Word automatically. Does anyone have an idea how to launch Word with the relevant document from within my application?
Its more of an anti-datatype. When used by itself (e.g. as a return value for a function) it means there is nothing coming back. When used as a pointer (void*) it means it is pointing to an address in memory, but you either don't know what datatype it is, or don't care what type it is (that is, that you are just concerned with the bytes that start at that address, and not the actual datatype that is there).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Read the lines in the list control, one by one.
For each line, split it into it's parts (name, city, country)
Compare the name from the list with the given name. If it matches, compare the city (from the list) with the given city. If it matches, display the country (from the list).
Sorry, I don't have the time right now.
But there *is* (for sure) a lot of examples how to:
1. Find out the number of used rows in a list control.
2. Get the text from a specific line in a list control.
That's a good way to start.
When you got that logic working, continue with splitting a text line into it's components (in your case, name, city and country).