計(jì)算機(jī)使用方法 vc6.0如何使用getwindowtext函數(shù)獲取edit控件中的文本內(nèi)容?
vc6.0如何使用getwindowtext函數(shù)獲取edit控件中的文本內(nèi)容?CWnd::GetWindowText(lptstr,lpszstring,int nmaxcount)CWnd::Get
vc6.0如何使用getwindowtext函數(shù)獲取edit控件中的文本內(nèi)容?
CWnd::GetWindowText(lptstr,lpszstring,int nmaxcount)CWnd::GetWindowText(CString&rstring)CWnd::GetWindowText(lptstr,lpszstringbuf,int nmaxcount)最簡單和最常用的形式是第二種形式。(個(gè)人而言)使用示例:CEdit myueditcstring stringmyu編輯.GetWindowText(string)要在WMMessage中獲取編輯框中的字符串,可以在命令中鏈接函數(shù)和控件ID,并使用編輯框的enSet force Message來獲取所需的結(jié)果。例如:add in the header fileMSG void onsetfocusedit1()//add message mapping to application fileENuusetfocus(IDCEDIT1,onsetfocusedit1)