Modeless Dialog Communication (MFC)
I’m trying to figure out how to pass variables back and forth between a modeless dialog and my main program. The program is a dialog based application and I’m trying to write a live trade window to view and edit the list of stocks being used. In of the main window I created the modeless by
Code:
CTraderDlg *m_pTdlg = new CTraderDlg(this);
m_pTdlg->Create(IDD_TRADER_DIALOG);
m_pTdlg->ShowWindow(TRUE);
But, how would I pass variables to this window or changes made to the list back to the main application?
Someone in IRC said something about SendMessage or SetWindowLongPtr to a variable… if someone could give me an example I should be able to run with it… please.