| |

VerySource

 Forgot password?
 Register
Search
View: 2195|Reply: 15

DoModal () problem

[Copy link]

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-3-11 18:00:02
| Show all posts |Read mode
Excuse me, the window out of DoModal ()
How to access the variables of the parent window, such as ListCtrl
Thank you
Reply

Use magic Report

0

Threads

2

Posts

1.00

Credits

Newbie

Rank: 1

Credits
1.00

 China

Post time: 2020-3-16 20:08:11
| Show all posts
Add parent window head file. maybe?
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 Invalid IP Address

Post time: 2020-6-5 10:45:01
| Show all posts
GetParent()->GetDlgCtrlID(...)
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-6-5 14:45:01
| Show all posts
Is there a way to access variables directly? Like m_List or something
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-5 23:45:01
| Show all posts
public variables are ok
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-6 09:30:01
| Show all posts
Define the global variable k in the Doc class, and then pay m_list to k, it can be used everywhere, including the doc header file
Reply

Use magic Report

0

Threads

17

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-6-6 13:00:01
| Show all posts
Dialog is best not to access the variables of the superior window. I do not know why the landlord should access the upper window variables?
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-6-7 16:00:02
| Show all posts
I want to double click CListCtrl
DoModal() displays a window showing detailed information about clicking ITEM
Reply

Use magic Report

0

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 Invalid IP Address

Post time: 2020-6-19 16:00:01
| Show all posts
There are many ways!
For example, modify the constructor of the sub-dialog
After double-clicking CListCtrl in the superior window
Pass the object pointer of the CListCtrl of the superior window while creating the sub-dialog object!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-21 15:00:01
| Show all posts
It’s better to pass it after clicking. It’s not a good way to fetch
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