GetDlgItemTextA Function

2019. 7. 17. 16:51
728x90
728x90

 

728x90

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdlgitemtexta

 

GetDlgItemTextA function (winuser.h)

Retrieves the title or text associated with a control in a dialog box.

docs.microsoft.com

대화 상자에서 컨트롤과 연결된 제목 또는 텍스트를 검색하십시오.

 

Syntax

UINT GetDlgItemTextA(
  HWND  hDlg,
  int   nIDDlgItem,
  LPSTR lpString,
  int   cchMax
);

 

Parameters

 1. hDlg

  1) Type: HWND

  2) dialog box의 핸들

 

 2. nIDDlgItem

  1) Type: int

  2) 제목 또는 텍스트를 검색할 컨트롤의 식별자

 

 3. lpString

  1) Type: PLTSTR

  2) 제목 또는 텍스트를 수신하는 버퍼

 

 4. cchMax

  1) Type: int

  2) lpString이 가리키는 버퍼에 복사할 문자열의 최대 길이. null 문자를 포함한 길이가 초과하면 문자열이 잘린다.

 

Return Value

 1. 함수가 성공하면 반환 값은 종료 null 문자를 포함하지 않고 버퍼에 복사된 문자 수를 지정한다.

 2. 함수가 실패하면 반환 값이 0이다. 확장 오류 정보를 얻으려면 GetLastError를 사용해라.

 

Remarks

 1. 문자열이 버퍼보다 길거나 긴 경우 버퍼는 종료 null 문자로 잘린 문자열을 포함할 것이다.

 2. GetDlgItem텍스트 기능은 WM_GETTEXT 메시지를 control로 전송한다.

 

Requirements

 1. Minimum supported client

  Windows 2000 Professional [desktop apps only]

 

 2. Minimum supported server

  Windows 2000 Server [desktop apps only]

 

 3. Target Platform

  Windows

 

 4. Header

  winuser.h (include Windows.h)

 

 5. Library

  User32.lib

 

 6. DLL

  User32.dll

728x90
728x90

'ETC > Windows API' 카테고리의 다른 글

IsDebuggerPresent Function  (0) 2019.08.09
DialogBoxParamA Function  (0) 2019.08.07
GetDriveTypeA Function  (0) 2019.07.13
LoadLibraryA Function  (0) 2019.05.05
WaitForSingleObject Function  (1) 2019.05.05

+ Recent posts