|
thanks.
i shall wait till weekend.
|
|
|
|
|
If there is more info about the problem than what you already worte in the other post, please send me the relevant codes and a explanation about. You can use the private message if you want.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
What error you're getting ?
And be sure to close the file handle you're using...
- Malli...!
|
|
|
|
|
thanks for your response.
it returns 0 and iam sure that iam closing the file.
|
|
|
|
|
Hello All,
i have a bmp file which created by the application and now i want take printout of this bmp file through programming.
i am unable to send this bmp to printer so please give me some how can i take printout.
thanks
|
|
|
|
|
Printing is not so easy to be just told here.
Start reading in the Print area of the website and post when you stuck with some code.
To print you will need use a DeviceIndependantBitmap (DIB) with the palette and so on, to ensure printing in as much printers as you can. Watch out with the MAPMODE and the coordinates, they may not be compatible with screen and if u take methodes from other places, what works in one side, here won't.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek, would you give some links to learn print?
I want to print contents of my CListCtrl.
Thx first.
|
|
|
|
|
|
Hi,
to print bitmap, I usually use the StrechtBlt ().
to print CListCtrl... I am not really sure if there is something that automates / makes it easy to be printed. I printed the CListCtrl table by hand. Making the lines and writing the contents using "for" and other things.
I recommend you to read the articles about printing by Roger Allan, to begin introducing yourself in printing are quite usefull, but there are aspects that are not commented in them.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
You can use of BitBlt with a handle to dc of printer.
|
|
|
|
|
Personally I prefer to use StrechtBlt in printing jobs. Main reason is that usually the size of the view is not the same as the printing area, so zooms may be needed.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
I have loaded image in picture box
It's displaying in center. It gets reduced in size in picture box.
So I need to calculate the reduced size in picture box as image is displayed in center of picture box.
how can I calculate that?
Chetan Joshi
|
|
|
|
|
CJ942002 wrote: how can I calculate that?
You could use GetClientRect() on the picture box.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Do you need to size of picture?
|
|
|
|
|
I have added picture box control having ID IDC_PICTUREBOX
I gave loaded jpg image in that
and I want to stretch that image to width and height
how could I do that?
Chetan Joshi
|
|
|
|
|
CJ942002 wrote: I want to stretch that image to width and height
What width and height?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Did you use of StretchBlt ?
|
|
|
|
|
I am not able to find the NM_CUSTOMDRAW message in messages. How to add this message handler to the project?
|
|
|
|
|
You won't get WM_CUSTOMDRAW message for all the controls.. and also to customize the control you have to derive your own control class from the control base class
Do your Duty and Don't expect the Result
|
|
|
|
|
Thanks for your reply. I am using WM_CTLCOLOR to change the checkbox caption text color. That is working fine when themes service is stopped. When it is enabled it is not working. Some one suggested in this site to use NM_CUSTOMDRAW for that. That's why i am trying. If this doesn't can you suggest me an alternate way to change the checkbox caption text color when windows themes is on?
Thanks in advance.
Regards
|
|
|
|
|
This is a fix in SP1: install the SP1 for VS2005. You need also the redist files for the setups.
Greetings from Germany
|
|
|
|
|
I checked it today. SP1 is already installed. But i am not able to change the text color when themes service is enabled.
Any help?
|
|
|
|
|
Hi All,
i have a problem with the MFC function of the class CDC:
BOOL BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, DWORD dwRop )
When i use it for copy a bitmap with an area (in logic coordinates) minor than 8840000 (es. nWidth=5200 e nHeight=1700) it works properly, but with a major value it seems doesn't copy anything and the copy of the original bitmap is completely black. This bitmap resulting by the copy is already set to black previously when i use the function CBitmap::CreateCompatibleBitmap ... so i say that the BitBlt doesn't have any effect in this case.... Did you know why it happens?? Did you know some others MFC functions for doing the copy of bitmaps??
I hope i was enought clear to explain the problem.
I'm sorry if it was already post but i didn't found it.
Thanks in advantage for any help
Bye
TM
|
|
|
|
|
Have you taken a look into StrechBlt (...) ??
Maybe your problem is because the sizes are not matching and the BitBlt doesn't know how to do it with that parameters.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Tommaso Maggioli wrote: BOOL BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC,
How your are selecting the bitmap in pSrcDC and in which DC you are coping?..
It will be clear if you post your code little bit...
Do your Duty and Don't expect the Result
|
|
|
|