乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      GetWindowText

       牛人的尾巴 2014-11-19

      GetWindowText

      目錄
      展開(kāi)

      函數(shù)功能

      該函數(shù)將指定窗口的標(biāo)題條文本(如果存在)拷貝到一個(gè)緩存區(qū)內(nèi)。如果指定的窗口是一個(gè)控件,則拷貝控件的文本。但是,GetWindowText不能接收其他應(yīng)用程序中控件的文本。

      函數(shù)原型:Int GetWindowText(HWND hWnd,LPTSTR lpString,Int nMaxCount);

      參數(shù)

      hWnd:帶文本的窗口或控件的句柄。

      IpString:指向接收文本的緩沖區(qū)的指針。

      nMaxCount:指定要保存在緩沖區(qū)內(nèi)的字符的最大個(gè)數(shù),其中包含NULL字符。如果文本超過(guò)界限,它就被截?cái)唷?/p>

      getwindowtext的DELPHI例子:

      var

      p:pchar;

      begin

      getmem(p,255);

      getwindowtext(application.Handle,p,255);

      showmessage(strpas(p));

      freemem(p);

      end;

      返回值

      如果函數(shù)成功,返回值是拷貝的字符串的字符個(gè)數(shù),不包括中斷的空字符;如果窗口無(wú)標(biāo)題欄或文本,或標(biāo)題欄為空,或窗口或控制的句柄無(wú)效,則返回值為零。若想獲得更多錯(cuò)誤信息,請(qǐng)調(diào)用GetLastError函數(shù)。

      函數(shù)不能返回在其他應(yīng)用程序中的編輯控件的文本。

      備注

      函數(shù)定義

      如果目標(biāo)窗口屬于當(dāng)前進(jìn)程,GetWindowText函數(shù)給指定的窗口或控件發(fā)送WM_GETTEXT消息。如果目標(biāo)窗口屬于其他進(jìn)程,并且有一個(gè)窗口標(biāo)題,則GetWindowTeXt返回窗口的標(biāo)題文本,如果窗口無(wú)標(biāo)題,則函數(shù)返回空字符串。

      速查:Windows NT:3.1以上版本;Windows:95以上版本:Windows CE:1.0以上版本;頭文件:Winuser.h;庫(kù)文件:user32.lib:Unicode:在Windows NT上實(shí)現(xiàn)為Unicode和ANSI兩種版本。

      int GetWindowText(

      LPTSTR lpszStringBuf,

      int nMaxCount

      ) const;

      void GetWindowText(

      CString& rString

      ) const;

      Parameters參數(shù)

      lpszStringBuf

      [out] Pointer to the buffer that will receive the text. If the string is as long or longer than the buffer, the string is truncated and terminated with a NULL character.

      nMaxCount

      [in] Specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.

      rString

      A CString object that is to receive the copied string of the window's title.

      Return Value返回值

      Specifies the length, in characters, of the copied string, not including the terminating null character. It is 0 if CWnd has no caption or if the caption is empty.

      Remarks

      If the CWnd object is a control, the GetWindowText member function copies the text within the control instead of copying the caption.

      This member function causes the WM_GETTEXT message to be sent to the CWnd object.

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶(hù)發(fā)布,不代表本站觀(guān)點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶(hù) 評(píng)論公約

        類(lèi)似文章 更多