Actually we want to find out the size of jpeg file in the compressed form.Because when we recover deleting JPEG file some time it is possible that the header cotaning information about size is cruptted then what we do in that case to calculate the size so we recover this jpeg file.
I want to know in an application the ID of the current mouse cursor at
any moment. I got the handle to the current cursor on server
machine and want to inform the client that cursor shape is changed
so that client can also reshape its mouse cursor.
Can i send the handle of the cursor on server to the client and
use that handle to reshape the cursor?
If not then how can i get the ID of the cursor from handle?
or any other way to do that.
"Imagination is much more important than implementation"
I am coding for a project in which it is required that I draw circles of certain radius over a scanned map (saved as a bitmap) and then save the changed map.
I know how to display a bitmap. I also know how to make an independent drawing and save it as a bitmap. But how do I do both – open an existing bitmap, draw over it and then save it? Please give me some idea.
There are many ways to do. I am just giving one of the way. Don't know how efficient it is. Since a long back I left programming of bitmap.
any way lets try.
1. Create a CBitmap member;
2. Draw to DC as you are doing the image and the circle.
3. Explore the DrawState funtion of CDC class. i.e use this funtion to link between your DC and CBitmap.
4. Then convert the CBitmap to DIB.( you will get lots of article on net / CP )
5. Once you get hte DIB you won't have any problem to save it.
Which bitmap are you saving? The one before you drew on it or the one after you drew on it.
Well, actually I learnt how to make a drawing on to a dialog box and then save the drawing as a bitmap from CodeProject. So I know how to save a drawing as bitmap.
What I want to do is:
1) Display a bitmap when the user opens it(ie. the user opens the bitmap eg. map of an industry)
2) Ask the user to click the mouse on a certain point on the bitmap
3) using that point(x and y coordinates), I do some calculations and get the correct radius.
4) Then I display to the user a circle of the calculated radius around that point on the map.
5) If the user selects 'save', I must save the whole thing i.e. the map with the circle on it, as a single bitmap.
I hope I am stating my problem clearly...
I tried creating a dc to hold the bitmap which the user opens and using the same dc, i tried to draw a circle on the bitmap... but it dosent work.
Your help will be highly appreciated. Thank you.
The basic steps are:
1. Create a compatible DC. Lets call it memDC.
2. oldBitmap = Select your bitmap into memDC.
3. Draw on memDC.
4. Select oldBitmap into memDC.
The bitmap should now have whatever you drew on it. To test that it does, blit it to your client area.
If you drew on a bitmap, say using the mounse, in the client area. Then you need to get a copy of the bitmap from the client area. In order to do that you must know the client coordinates where the bitmap is located.
1. Create a compatible DC. Lets call it memDC.
2. Create a compatible bitmap, that is the same size as the area that you want to copy. Lets call it tempBitmap.
3. oldBitmap = Select your tempBitmap into memDC.
4. Bit blit the rectangular area from the client DC to the memDC.
5. Select oldBitmap into memDC.
6. Finish cleaning up.
Now tempBitmap should contain a copy that matches the area of the client you specified. To test it, just clear an area of the client and blit the tempBitamp there.
i need help for my final project...it is about generating thumbnails from images(pgm format) by half or by 2 or if possible generating thumbnails of size 75*75 pixels....if someone can give me code(in C++) or algorithm to scale images up and down....thx u in advance.
i program a app which surport output a word doc from displayed contents. But now i got another problem, i cannot set the pragraph format (exp. paragraoh indent and so on) by my app automatically. I found a method -- void Selection::SetParagraphFormat(LPDISPATCH newValue), but i cannot manipulate it correctly. Please tell me how can i get rid of it.
Thank you ~o~
I am a new member to code project and this is my first message to the forum. I am a 6th sem MCA student doing my project work in a company as part of my academic curriculum.Presently i am working on a software related to GUI testing. I am using some MFC application exe files for this purpose. My problem is that some of the exe files i am using end up with errors at the runtime. So it is my request to every member of this forum to please suggest me as to how i can get the source code of an MFC application after it is converted to exe format.
Have you tried contacting the original developer of the application and asking them *very* nicely - you never know they might be feeling generous and let you have it...
There is no pratical way of decompiling an exe built with c++ (something which I'm thankful of as it would probobly put me and many others out of business.) The closest your going to get is an assembly dump of the code - something which I'm guessing isn't what your looking for.
If you've got a problem with the application, contact whoever wrote it.