클리엘
CLIEL LAB
클리엘
전체 방문자
오늘
어제
  • 분류 전체보기 (514)
    • Mobile (47)
      • Kotlin (47)
    • Web (84)
      • NestJS (9)
      • HTML5 & CSS3 (38)
      • Javascript (20)
      • TypeScript (6)
      • JQuery (11)
    • .NET (301)
      • C# (84)
      • ASP.NET (67)
      • Windows API for .NET (128)
    • Server (53)
      • SQL Server (10)
      • MariaDB (18)
      • Windows Server (6)
      • node.js (19)
    • System (12)
      • 작업LOG (12)
    • Review (11)
    • ETC (6)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

  • 블로그 정리

인기 글

태그

  • node.js
  • Kotlin
  • .NET
  • android studio
  • NestJS
  • asp.net core
  • 변수
  • LINQ
  • MariaDB
  • android
  • asp.net core web api
  • ASP.NET
  • jQuery
  • CSS3
  • exception
  • JavaScript
  • Windows API
  • Entity Framework
  • HTML5
  • c#

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
클리엘

CLIEL LAB

.NET/Windows API for .NET

GetWindowTextLength - 특정 Window의 제목문자열 크기구하기

2019. 8. 6. 15:59
728x90

GetWindowTextLength함수는 지정한 Window의 제목문자열 크기값을 반환합니다.

Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Integer) As Integer

▶VB.NET 선언

[DllImport("user32")]
public static extern int GetWindowTextLength(int hwnd);

▶C# 선언


GetWindowTextLength함수의 인수로는 제목문자열 크기를 구하고자할 Window의 Handle을 전달해 주기만 하면 됩니다.

예를 들어 현재 실행중인 From Window의 제목문자열 크기를 구하려면 다음과 같이 함수를 호출하면 됩니다.

GetWindowTextLength(Me.Handle)

▶VB.NET 호출

GetWindowTextLength((int)this.Handle);

▶C# 호출


GetWindowTextLength함수는 실행에 실패하는 경우 0을 반환합니다.

728x90
저작자표시 비영리 변경금지 (새창열림)

'.NET > Windows API for .NET' 카테고리의 다른 글

CopyFile - File복사  (0) 2019.08.06
SetFileAttributes - File의 속성설정  (0) 2019.08.06
GetDeviceCaps - Device Context의 정보 구하기  (0) 2019.08.06
Ellipse - Window나 Control에 타원그리기  (0) 2019.08.06
GetShortPathName - 단축 path명 얻기  (0) 2019.08.06
    '.NET/Windows API for .NET' 카테고리의 다른 글
    • CopyFile - File복사
    • SetFileAttributes - File의 속성설정
    • GetDeviceCaps - Device Context의 정보 구하기
    • Ellipse - Window나 Control에 타원그리기
    클리엘
    클리엘
    누구냐 넌?

    티스토리툴바