| |

VerySource

 Forgot password?
 Register
Search
View: 810|Reply: 5

PageControl question, about self-painting.

[Copy link]

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-2-10 16:30:01
| Show all posts |Read mode
A breakpoint is set in the OnDrawTab event. Why is there no pause? And no effect was drawn.
I want to draw a small cross in the upper right corner of the tab (to keep the original text part), how to draw a picture?
Reply

Use magic Report

0

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-5 15:00:01
| Show all posts
Is the OwnerDraw property of PageControl set to true? ? ?
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-4-6 13:45:02
| Show all posts
Haha, thanks, really.
Alas, there is still less work done.
Reply

Use magic Report

0

Threads

7

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-10 23:30:01
| Show all posts
What's wrong with drawing?
After setting OwnerDraw, you can draw your things in the OnDrawTab event function. . .
The parameter TabIndex is the index of the drawn Tab, Rect is the rectangular area of ​​the drawn Tab, and Active is whether the drawn Tab is currently activated
After getting these things, you can draw anything on the Tab. . .
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-4-11 19:45:01
| Show all posts
Well, it was just drawn. V_V

TIcon * Icon = NULL;
ImageList1-> GetIcon (0, Icon); // This sentence can not get the icon. There is obviously one in it. Icon is still NULL.
Control-> Canvas-> Draw (0,3, Icon);
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-4-11 23:00:01
| Show all posts
Sorry, no initialization.
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