| |

VerySource

 Forgot password?
 Register
Search
View: 617|Reply: 3

How to make the control (such as CListCtrl) draw to the specified DC?

[Copy link]

1

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-29 19:00:01
| Show all posts |Read mode
Currently doing printing. Suppose I have prepared a printer DC and mapped coordinates and everything is done. I just need to redraw CListCtrl on this DC, and the printing problem is solved.
It seems that the printing problem is too simple. MFC or API does not seem to provide such a function, let the user choose DC to redraw, is there any problem? I wonder if this idea is possible?
Reply

Use magic Report

0

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-3 23:00:01
| Show all posts
Should not work, huh, cwnd has a parent window, DC is from the parent level, my personal opinion, I do n’t know, right

But you can derive your own ListCtrl and you can do it.
Reply

Use magic Report

1

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-3-5 18:15:01
| Show all posts
I don't want to write drawing code, and derivation doesn't work either.

Can I write some more code upstairs so that I can print without calling any GDI functions.
Reply

Use magic Report

1

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-3-23 21:15:02
| Show all posts
Screen shots, multiple documents, printing under a single document, etc. are all done by replacing the DC?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list