|
Please read the posting guidelines before posting on this message board (this is the message called "How to ask a question").
Points which require your attention:
1) Formatting of the code (use the code tag to format code properly)
2) No clear description of the problem (please provide details about it)
3) You say there's a "abnormal essage", then give the exact error message and in which conditions it occurs.
|
|
|
|
|
I am sorry for that. This is my fist time to ask help in this site.
|
|
|
|
|
You still didn't provide a lot of information. What is the exact error message ? Did you try to debug to see where your code causes problem ?
|
|
|
|
|
I have tried to debug. when it runs to the
" glFogCoordfEXT(f1); ",the program stops.
this is the error message:
AppName: fog.exe AppVer: 0.0.0.0 ModName: unknown
ModVer: 0.0.0.0 Offset: 00000000
|
|
|
|
|
Can you send an array of longs through a pipe? If it is possible, how would you do it?
Thanks in advance.
|
|
|
|
|
Typecast the array to whatever data type the function to send expects and give sizeof(array) as the size to be sent.
|
|
|
|
|
I never thought to do that, thanks so much, you're a lifesaver!
|
|
|
|
|
double a = 0.0000005;
char aa[50];
sprintf(aa,"s%lf",a);
printf("%s",aa);
Output:s0.000000
In the above code snippet, the variable aa can contain only 6 decimal precision. I would like to get an output "s0.0000005".
Could you please advice me on how to achieve this?
Thanks
|
|
|
|
|
See the MSDN documentation on printf format options[^]. It contains all the details of how you may customise this to your exact requirements.
|
|
|
|
|
|
I was hoping that my reply would encourage them to actually learn something beyond how to print to seven decimal places!
|
|
|
|
|
If they really want to, they will learn more after wondering what 9.7 means.
Otherwise they will never learn no matter what.
Just my opinion.
|
|
|
|
|
«_Superman_» wrote: If they really want to, they will learn more after wondering what 9.7 means.
I so want to believe that, but at my age I have more than 60 years of life experience to look back on ...
|
|
|
|
|
Ever the cockeyed optimist.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Sorry if this is a basic question, I'm new to C++. How would I go about creating a DC for an image from a file (.png) and then getting the HDC of said DC.
|
|
|
|
|
The MSDN documentation on Device Contexts[^] contains the functions you may use to paint onto any surface real or virtual.
See also the documentation on Windows GDI for useful tutorials, or this CodeProject Article[^] on bitmaps.
|
|
|
|
|
Hi,
I am currently trying to insert a picture control with more than 256 colors in a MFC dialog in a VC 6.0 project. However, when I paste the bitmap, the IDB_BITMAP resource looks correct, but when I try to reference it in a static picture control, the color depth is decreased dramatically.
How can I display a bitmap ressource with 24 or 32 bit in a MFC 6.0 dialog?
|
|
|
|
|
Try replacing the .BMP file that is created in the res sub folder with the high color bitmap file.
|
|
|
|
|
Hey,
I would like to write a c++ program that compares 2 images.In fact, I have many B&W images of a boat. I want to compare the contours, so that I could know how alike the images are. And, I want to be able to know the error percentage after comparing.
Do you have any advice or can you tell me any paper or book could help me.
Thanks in advance,
Franckesh
|
|
|
|
|
Go to Google, hit advanced search, limit the document types to .pdf, the websites to .edu, enter your search terms, and hit Search. You should get more papers than you can read in a year.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Maybe a strange tip:
Take a picture (1) and make a copy (2) of it. Now put the picture and the copy in a zip. Write down the filesize of the zip. Nex,t take another picture (3) and put it together with the original (1) into a second zip. Write down the filesize of the 2nd zip. Continue this till all pictures are put in zips. If you have 10 pictures you will have now 10 zips. Sort the zips to filesize. The zip containing your original (1) and its copy will have the smallest filesize. The next zip will contain that picture that resembles the original the most. And so on.
How this works: Zip searches for duplicate bitpatterns (this is how compression works). In the smallest zip it finds the most (coz their are 2 identical pics). The picture that resembles the first one the most is the one that has a little less duplicate bitpatterns (it compresses slightly worse). The filesize of the zip is an indicator of the resemblance.
Note: You will have to create zips for all the combinations...
The theory behind: Colmogorov complexities...
If you try this solution i would be pleased if you keep me informed of you results.
Rozis
|
|
|
|
|
Thank U, but I would like to know how to implement c++ codes to compare two b&W images pixel per pixel.
Or is there any better way to do implement the differences btw the images(if not pixel per pixel).
Thanks,
Franckesh
|
|
|
|
|
|
Hi,
In my minidump I am not getting proper call stack, but I do know one function which was called and its address comes as 0x0a415210. I want to locate the calls to this symbol, but don't know the range of memory were this could be.
Does anyone know how to locate the calls to this symbol in WinDBG?
Thanks
|
|
|
|
|
If it is the microsoft symbols that you want select File -> Symbol File Path from the Windbg menu and enter the string SRV*<your local symbol folder>*http://msdl.microsoft.com/download/symbols .
If the symbols belong to the project you created, put your PDB file in a folder and give the path to that folder as stated above. You can separate multiple statements using ; .
|
|
|
|