c++ - visual studio Cdialog that blocks execution -


i working c++ in visual studio. in our application, when user clicks button, cdialog box appears asking them select information. need use information in next line of code. there way block execution until dialog box has been quit out of? current solution split method, , add event listener 'ok' button calls second method. seems hacky though.

so current solution has setup dialog box

if (m_instancenumber == null) {     m_instancenumber = new cinstancenumberdlg(this);     m_instancenumber->create(idd_instance_range_dialog, this);     m_instancenumber->showwindow(sw_show); } else{     m_instancenumber->showwindow(sw_show); } 

*clarification, code need wait execute directly below code. *

then there event listener calls:

void csolidhoopsframe::updateinstancerange() { trace1("%d",m_instancenumber->leftinstancerange()); trace1("%d",m_instancenumber->rightinstancerange()); trace("entered updateinstancerange"); } 

this prints updated values box. seems splitting methods work, seems incorrect way go doing this. ideally there way reformat first section of code such next line wouldn't execute till box closes


Comments

Popular posts from this blog

c# - How can I have the VS Debugger break in the correct location for exceptions thrown in Async methods in a Console App? -

php - Issues outputting data after prepared statement with loops -

javascript - How to pass a property by reference -