Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Document pointer in a Dialog?

Status
Not open for further replies.

rdalton

Programmer
Dec 5, 2002
24
US
My application uses the SDI framework. At one point I have a popup dialog that I want to populate with data from the document class. Can I get a pointer to the document class without pasing one during construction?
 
Use [tt]AfxGetMainWnd()[/tt] to get a pointer to the main frame window and then use that pointer to get pointers to the active document and view.
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top