|
For start you must select project Type Visual C++ Projects->MFC and of Templates select MFC Application then on the Application Type you must select Single document ot Multiple documents or Dialog based and then click Finish button.Does it your answer or no?
|
|
|
|
|
OK DIALOG option is for form based application. What about this single documents and multiplpe documetns....when can we use these option and all rest option are not so important i guess..
Well i want to write a single form based application with 7-8 .cpp and header files...so i guess for me dialog based is the right option...
|
|
|
|
|
|
how to run each thread as a seperate process.
i.e i made a thread oreiented dll in that i called each time it should make the threds a a seperate process .
S.V.Rajkumar
|
|
|
|
|
Did you go through the CreateProcess() API
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
How to do the following?
How to avoid dialog box from closing when ESC or ENTER key pressed?
|
|
|
|
|
Override PreTranslateMessage()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Override the CDialog::OnOK and OnCancel.
|
|
|
|
|
Hi all,
How to implement graph zoom in/out feature in an application.I am new to MFC programming.Please help me regarding this.
Regards,
Mayank
|
|
|
|
|
Have it readymade here[^] and thank the developer.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hey Friends,
I want to Convert 32 bit Bitmap tp 8 bit bitmap.
Here i have to used palette.
CAn any body tell me abt this conversion and about palete.
Thanks in advance.
Born To Code
|
|
|
|
|
In an 8-bit image, each pixel is represented by one byte. Each byte is an index into a color
table (or palette). The color table consists of 256 red/green/blue values which, when indexed by
a byte of image data, gives the resulting color of the pixel.
When converting "downward" from 32-bit data to 8-bit data, the trick is to come up with a color
table that can best represent the colors of the original bitmap. The source image can contain
up to 16777216 different colors and you need to map those to 256 colors and still have the
resulting image look acceptable. A bitmap with alot of shades of red, for example, will look
nicer as 8-bit if the color table has lots of shades of red in it.
There's a variety of ways to do this.
One way is to use the Windows halftone palette (created using CreateHalftonePalette()). This
creates a palette with a wash of colors that should contain a sem-reasonable close match to the
all the source pixel colors.
Another way is to create 256 color of your own choosing. Use any method you want to come up with
256 colors that best represents the colors in the source bitmap.
A third method, the one that will yield the best results, is to use an algorithm which analyzes
the source bitmap, and based on the colors in the source image, creates the 256 colors that best
match the source image. There's alot of published alogorithms or you could come up with your
own. Google searches on "color quanitization", "best fit palette", "RGB to palette conversion",
etc. should find you lots of info on the subject. One I have used is the Gervautz-Purgathofer
octree color quanitization algorithm.
Once you have a color table/palette, you need to take each RGB pixel value from the source image
and find the index of its closest color in the color table. Windows gives you a little help
here. One way is to loop through every pixel and call GetNearestPaletteIndex(). Another way
is to create a memoryDC and select your palette and an 8-bit bitmap into it, then use a GDI
bitmap draw function to draw the source bitmap on the DC. GDI will convert all the pixels to
the closest match in the selected palette.
Just my 2 cents on the subject.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
A few months ago, I remember David Crow gave a reply regarding CPU usage to a query, stating something like "What memory usage is shown by the task manager is not actually what memory is consumed by the applications; it could be less". If I remember, he pointed out a very relevent link too. I tried googling, but could not find something satisfying. Tried searching CP for that thread, but could not get. If someone could give me pointers in this direction, I would be very thankful.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I dont know what he said(of course I think he will be answer to you early;)) but I suggest to you see Performance on the MSDN it has a lot of helpful info (Im not sure but I think it was on the VC 6.0)
|
|
|
|
|
Thank you, WhiteSky.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
|
|
From The Link Don't use TM to determine your app's memory usage. Those numbers represent the amount of address space that is in use. They have nothing to do with the amount of that address space your program is actually using.
That's what I wanted. Thank you very much.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: That's what I wanted. Thank you very much.
You know you should learn to search[^]...;P;P
|
|
|
|
|
What I got from search was: The IIS engine is prone to crash under heavy load (or something similar. I ain't a web programmer). Happened Thrice.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Probably this one[^].
It can be found here at CP as well from same author.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks for the link, Roger. But David Crow had once cut shorted this theory into two lines and that was what I was looking for.
It is: Don't use TM to determine your app's memory usage. Those numbers represent the amount of address space that is in use. They have nothing to do with the amount of that address space your program is actually using.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
You're most welcome brahmma.
David's statement summrizes it quite well, but if you want "why" answered you should read Newcomer's article.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Indeed Mr. Joseph's website is full of useful information. I am writing a short note on memory allocation, for an internal meet here and that (the info which I've got now) was one thing remaining. So, I took help from you guys.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: So, I took help from you guys.
:->
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|