Click here to Skip to main content
15,907,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CDHTMLDialog Scroll ? Pin
Matt Gates14-Oct-03 14:43
Matt Gates14-Oct-03 14:43 
GeneralRe: CDHTMLDialog Scroll ? Pin
algol14-Oct-03 21:27
algol14-Oct-03 21:27 
GeneralRe: CDHTMLDialog Scroll ? Pin
Matt Gates15-Oct-03 3:27
Matt Gates15-Oct-03 3:27 
Generalsetup files in visual c++ Pin
sarasara098765413-Oct-03 9:39
sarasara098765413-Oct-03 9:39 
QuestionHow can I open and read PS/2 Port (Read Mouse data) Pin
asd175313-Oct-03 9:25
asd175313-Oct-03 9:25 
QuestionHow can I open and read PS/2 Port (Read Mouse data) Pin
asd175313-Oct-03 9:25
asd175313-Oct-03 9:25 
GeneralHelp me Pin
Tomas Wilhelmsson13-Oct-03 9:20
Tomas Wilhelmsson13-Oct-03 9:20 
QuestionUpdateData into modeless dialog? Pin
andrzejf13-Oct-03 8:34
andrzejf13-Oct-03 8:34 
Could anybody explain me, any example very welcome:

I create modeless dialog, as follows:
in myTabControl.cpp // The source code for this class I downloaded from code guru page


void CMyTabControl::Init() // CMyTabControl is derived from CTabCtrl<br />
{<br />
	m_tabCurrent=0;<br />
          // CDialog *m_tabPages[2];<br />
	m_tabPages[0]->Create(IDD_DLG_TAB1, this);<br />
	m_tabPages[1]->Create(IDD_DLG_TAB2, this);<br />
	<br />
	m_tabPages[0]->ShowWindow(SW_SHOW);<br />
	m_tabPages[1]->ShowWindow(SW_HIDE);<br />
	SetRectangle();<br />
}

I call Init() function in:
In Stp2View.cpp

void CStp2View::OnInitialUpdate() // CStp2View is derived from CFormView<br />
{<br />
	CFormView::OnInitialUpdate();<br />
	GetParentFrame()->RecalcLayout();<br />
	ResizeParentToFit();<br />
<br />
	m_tab.InsertItem(0, _T("Table1"));  // m_tab is CMyTabControl member var.<br />
	m_tab.InsertItem(1, _T("Table2"));<br />
	<br />
	m_tab.Init();<br />
}


My question is:
how can I update data in IDD_DLG_TAB1 Form, for example
in Stp2View.cpp

void CStp2View::OnMoveToNextRecord()<br />
{<br />
   .....<br />
   CString str = "test update data";<br />
   UpdateData(TRUE);  // in this line is    Assertion   <br />
ASSERT(::IsWindow(m_hWnd));  //calling UpdateData before DoModal"?<br />
  ....<br />
// I tried<br />
((CDlgTab1*)tab.m_tabPages[0])->UpdateData(FALSE)  // the same Assertion<br />
}


Thanks a lot ...
GeneralTrapping KeyBoard events Pin
act_x13-Oct-03 7:41
act_x13-Oct-03 7:41 
GeneralRe: Trapping KeyBoard events Pin
Phil Hamer13-Oct-03 10:55
Phil Hamer13-Oct-03 10:55 
GeneralHelp with WMI please Pin
corwin3213-Oct-03 7:19
corwin3213-Oct-03 7:19 
QuestionHow to close Modeless Dialog Pin
vancouver77713-Oct-03 6:57
vancouver77713-Oct-03 6:57 
AnswerRe: How to close Modeless Dialog Pin
vcplusplus13-Oct-03 7:32
vcplusplus13-Oct-03 7:32 
AnswerRe: How to close Modeless Dialog Pin
Jim Crafton13-Oct-03 7:50
Jim Crafton13-Oct-03 7:50 
Generalfile io Pin
Snyp13-Oct-03 6:55
Snyp13-Oct-03 6:55 
GeneralRe: file io Pin
David Crow13-Oct-03 7:57
David Crow13-Oct-03 7:57 
GeneralkeyBoard events Pin
act_x13-Oct-03 6:53
act_x13-Oct-03 6:53 
GeneralDisabling the tool bar button Pin
sanjay zore13-Oct-03 6:29
sanjay zore13-Oct-03 6:29 
GeneralRe: Disabling the tool bar button Pin
Mike Danberg13-Oct-03 8:26
Mike Danberg13-Oct-03 8:26 
GeneralDownload file from internet (http) Pin
Dominik Reichl13-Oct-03 6:26
Dominik Reichl13-Oct-03 6:26 
GeneralRe: Download file from internet (http) Pin
David Isla13-Oct-03 7:01
David Isla13-Oct-03 7:01 
GeneralRe: Download file from internet (http) Pin
Dominik Reichl13-Oct-03 8:16
Dominik Reichl13-Oct-03 8:16 
GeneralInternet from a Windows Service Pin
Bart13-Oct-03 5:25
Bart13-Oct-03 5:25 
GeneralWS_CLIPCHILDREN problem Pin
jmgir13-Oct-03 5:21
jmgir13-Oct-03 5:21 
Generalwrapper to a function with an unknown number of variables Pin
sagmam13-Oct-03 5:06
sagmam13-Oct-03 5:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.