Click here to Skip to main content
16,010,334 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: NIC information? Pin
Joaquín M López Muñoz16-Dec-01 23:16
Joaquín M López Muñoz16-Dec-01 23:16 
Generalsecurity of .ocx Pin
marutis16-Dec-01 19:01
marutis16-Dec-01 19:01 
Generalstatic data member in MFC program Pin
Dave K Dosanjh16-Dec-01 16:28
Dave K Dosanjh16-Dec-01 16:28 
GeneralRe: static data member in MFC program Pin
Christian Graus16-Dec-01 16:47
protectorChristian Graus16-Dec-01 16:47 
QuestionHow can I print a bitmap file ? Pin
16-Dec-01 15:31
suss16-Dec-01 15:31 
AnswerRe: How can I print a bitmap file ? Pin
Christian Graus16-Dec-01 15:51
protectorChristian Graus16-Dec-01 15:51 
GeneralRe: How can I print a bitmap file ? Pin
Chambers17-Dec-01 7:56
Chambers17-Dec-01 7:56 
GeneralRe: How can I print a bitmap file ? Pin
Christian Graus17-Dec-01 10:15
protectorChristian Graus17-Dec-01 10:15 
You actually need to find out the size of the print DC for the specific printer you are working with. Also, some HP printers do not report this correctly if you're using DirectX, we spoke to HP about this and they said they know about the problem, but they will only fix it *in our app* ( they admit the problem is their drivers ) if we give them all our source code and a pile of money.

I do it like this:

CPrintDialog dlg(false);
dlg.GetDefaults();

HDC hdc = dlg.GetPrinterDC();
ASSERT(hdc);

CDC DC;
DC.Attach(hdc);

    m_PrintAreaHorz = GetDeviceCaps(hdc, HORZRES);
    m_PrintAreaVert = GetDeviceCaps(hdc, VERTRES);

DC.DeleteDC();


which gives me the width and height I need to stretch to in order to fill the page. This should work for any printer, that is, if you stretch to these co-ordinates ( you'll obviously not want to, for aspect ratio reasons as much as anything ), you will fill the printable area of the page on any size/DPI printer.

Chambers wrote:
P.S. did u fix that problem you had with the min/max track size of the child window (where it wouldn`t resize below a 100?) cos I posted a reply, but I think u must've solved it by that time.

No, I've left it for now. For some reasons the MinMax is right, but Windows is not letting me size down to a width of 50, it stops at 100. I think the problem is in our Python code, somewhere.


Christian

After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

Sonork ID 100.10002:MeanManOz
I live in Bob's HungOut now

GeneralRe: How can I print a bitmap file ? Pin
Chambers18-Dec-01 0:42
Chambers18-Dec-01 0:42 
GeneralRe: How can I print a bitmap file ? Pin
Christian Graus18-Dec-01 10:04
protectorChristian Graus18-Dec-01 10:04 
GeneralRe: How can I print a bitmap file ? Pin
manio18-Dec-01 18:32
manio18-Dec-01 18:32 
GeneralRe: How can I print a bitmap file ? Pin
Christian Graus18-Dec-01 18:50
protectorChristian Graus18-Dec-01 18:50 
GeneralRe: How can I print a bitmap file ? Pin
18-Dec-01 20:53
suss18-Dec-01 20:53 
GeneralRe: How can I print a bitmap file ? Pin
Christian Graus19-Dec-01 1:02
protectorChristian Graus19-Dec-01 1:02 
GeneralRe: How can I print a bitmap file ? Pin
manio21-Dec-01 0:44
manio21-Dec-01 0:44 
GeneralRe: How can I print a bitmap file ? Pin
Christian Graus21-Dec-01 0:55
protectorChristian Graus21-Dec-01 0:55 
GeneralRe: How can I print a bitmap file ? Pin
manio21-Dec-01 0:02
manio21-Dec-01 0:02 
GeneralRe: How can I print a bitmap file ? Pin
Christian Graus21-Dec-01 0:51
protectorChristian Graus21-Dec-01 0:51 
Questionwhy no need to declare class CXXXDoc in XXXView.h? Pin
AnonymousBabe@usa.net16-Dec-01 15:15
AnonymousBabe@usa.net16-Dec-01 15:15 
AnswerRe: why no need to declare class CXXXDoc in XXXView.h? Pin
Erik Funkenbusch17-Dec-01 0:00
Erik Funkenbusch17-Dec-01 0:00 
GeneralProgram not starting Pin
16-Dec-01 10:37
suss16-Dec-01 10:37 
GeneralRe: Program not starting Pin
Paul Selormey16-Dec-01 13:08
Paul Selormey16-Dec-01 13:08 
GeneralRe: Program not starting Pin
Lim Bio Liong16-Dec-01 19:36
Lim Bio Liong16-Dec-01 19:36 
GeneralRe: Program not starting Pin
Jon Hulatt17-Dec-01 0:04
Jon Hulatt17-Dec-01 0:04 
GeneralRe: Program not starting Pin
Rickard Andersson2017-Dec-01 0:38
Rickard Andersson2017-Dec-01 0:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.