can i print a window without printer dialog?
cambalinho
125
Practically a Posting Shark
Recommended Answers
Jump to PostYou are leaking by calling
GetDC(hwnd)
and not releasing it.DOCINFO di = {sizeof(DOCINFO), "Bitmap Printing"}; HDC pDC = GetPrinterDC(hwnd); int w = GetDeviceCaps(pDC, HORZRES); int h = GetDeviceCaps(pDC, VERTRES); HDC hdcMem = CreateCompatibleDC(pDC); HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, hBitmap); StartDoc(pDC, &di); StartPage(pDC); SetMapMode(pDC, MM_ISOTROPIC); SetWindowExtEx(pDC, w,h, …
Jump to PostI don't know what you mean.. The above code does not show a printer dialog and it certainly does not require VS2015.
It does not show the printer dialog because it does not use:
All 7 Replies
cambalinho
125
Practically a Posting Shark
triumphost
120
Posting Whiz
cambalinho
commented:
thanks for all
+3
cambalinho
125
Practically a Posting Shark
triumphost
120
Posting Whiz
cambalinho
125
Practically a Posting Shark
cambalinho
125
Practically a Posting Shark
cambalinho
125
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.