Posts Tagged “hust”

要修改VC模式对话框控件属性,必然,最重要的是弄清楚对话框上的控件在何时创建,要在保证创建之后才修改,在网上找到一些资料,提出了修改对话框类的构造函数的方法,但是经测试,不能完成。后来把

 m_ListSet.AddString("属性");

放到对话框类的 OnInitDialog()函数中,响应WM_INITDIALOG消息,顺利执行!

具体原因等毕业设计做完之后去研究。

 

当DoModal被调用后,实际在幕后引起一系列如下的动作:
CDialog::DoModal->CEx06Dialog::OnInitDialog->其它的初始化->CDialog::OnInitDialog->CWnd::UpdateData(FALSE)->CEx06Dialog::DoDataExchange
用户输入数据…
用户单击OK按钮
CEx06Dialog::OnOk->…其它的确认处理…->CDialog::OnOk->CWnd::UpDateData(TURE)->CEx06Dialog::DoDataExchange->CDialog::EndDialog(IDOK)
说明:
1)virtual BOOL OnInitDialog( );
//CDialog::OnInitDialog This member function is called in response to the WM_INITDIALOG message. This message is sent to the dialog box during the Create, CreateIndirect, or DoModal calls, which occur immediately before the dialog box is displayed.
//Override this member function if you need to perform special processing when the dialog box is initialized.

2)BOOL UpdateData( BOOL bSaveAndValidate = TRUE );
//CWnd::UpdateData :Call this member function to initialize data in a dialog box, or to retrieve and validate dialog data.
//bSaveAndValidate:Flag that indicates whether dialog box is being initialized (FALSE) or data is being retrieved (TRUE).
//By default UpdateData(TRUE) is called in the default CDialog::OnOK handler and UpdateData(FALSE) is called in the default CDialog::OnInitDialog.

3)virtual void DoDataExchange( CDataExchange* pDX );
//CWnd::DoDataExchange Called by the framework to exchange and validate dialog data.
//Never call this function (DoDataExchange) directly. It is called by the UpdateData member function.
//Call UpdateData to initialize a dialog box’s controls or retrieve data from a dialog box.

4)void EndDialog( int nResult );
//CDialog::EndDialog makes the dialog box invisible but does not destroy it.
//Call this member function to terminate a modal dialog box. This member function returns nResu

Tags:

Comments 2 Comments »

 在毕业设计中,发现,listview中每改变一次选择,OnItemchanged函数执行了,三次,后来查证之后发现,state不光是选择的变化,还包括了焦点,还有其它的的变化
第1次是iOldItem从LVIS_SELECTED到0(取消选择)
第2次是iOldItem从LVIS_FOCUSED到0(取消焦点)
第3次是iNewItem从0到LVIS_SELECTED | LVIS_FOCUSED(获得选择,同时获得焦点)

只在获得选择的时候执行,就需要这样
if( (pNMListView->uNewState & LVIS_SELECTED) && 
!(pNMListview->uOldState & LVIS_SELECTED) )
{
    int nNewItem = pNMListView->iItem;
    ……
}

Tags:

Comments 3 Comments »

不知道什么时候才可以出,虽然拍得不怎么样,上部是拖着看完的,但是总要看个结局有个映象哈!

Tags:

Comments 沒有留言 »

我都不知道这算不算吵架,但是感觉好严重啊!情绪特难控制那种…..不管怎么样,我还是期待美好的未来!

Tags:

Comments 沒有留言 »

班上一哥们死里逃生啊!整整360

 

   报考华中科技大学的考生,2006年计算机学院的硕士学位研究生复试工作即将展开,现将复试有关的工作安排通知如下:

    一、硕士生入学考试考生参加复试分数线基本要求
    1、统考生:总分基本要求360分,政治55分,英语55分,数学一90分,综合考试90分。

Tags:

Comments 沒有留言 »