C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[67350] 감사합니다.
hanmuun [] 1120 읽음    2012-05-28 04:13
송신영님
감사합니다.






송신영 님이 쓰신 글 :
: Caption 이름이 "하나" 인 윈도우를 찾아서
: 해당 윈도우를 Close 하라는 메시지를 보내는 것입니다.
: 아래는 FindWindow에 대한 설명입니다.
: 모르는 함수가 있을 경우에는 해당 함수에서 F1키를 누르면 Help 파일이 나옵니다.
:
: Syntax
:
:  HWND WINAPI FindWindow(
:   __in_opt  LPCTSTR lpClassName,
:   __in_opt  LPCTSTR lpWindowName
: );
:
: Parameters
: lpClassName [in, optional]
: Type: LPCTSTR
:
: The class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero.
: If lpClassName points to a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names.
: If lpClassName is NULL, it finds any window whose title matches the lpWindowName parameter.
:
: lpWindowName [in, optional]
: Type: LPCTSTR
:
: The window name (the window's title). If this parameter is NULL, all window names match.
:
: Return value
: Type:
:
: Type: HWND
:
: If the function succeeds, the return value is a handle to the window that has the specified class name and window name.
: If the function fails, the return value is NULL. To get extended error information, call GetLastError.
:
: Remarks
: If the lpWindowName parameter is not NULL, FindWindow calls the GetWindowText function to retrieve the window name for comparison. For a description of a potential problem that can arise, see the Remarks for GetWindowText.
:
: Examples
: For an example, see Retrieving the Number of Mouse Wheel Scroll Lines.
:
: Requirements
: Minimum supported client
:  Windows 2000 Professional
: Minimum supported server
:  Windows 2000 Server
: Header
:  Winuser.h (include Windows.h)
: Library
:  User32.lib
: DLL
:  User32.dll
: Unicode and ANSI names
:  FindWindowW (Unicode) and FindWindowA (ANSI)
:
: See also
: Reference
: EnumWindows
: FindWindowEx
: GetClassName
: GetWindowText
: RegisterClass
: RegisterClassEx
: Conceptual
: Windows
:
:
: hanmuun 님이 쓰신 글 :
: : 안녕하세요.
: : 제가 질문올릴때마다 자세한 설명 너무감사합니다.
: : 초보다 보니까  너무 모르는것이 많네요.^-^
: : FindWindow에 대한 설명과
: : 아래예제에 대한 주석좀 부탁드릴께요.
: : 감사합니다.
: :
: : void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
: : {
: :         HWND hWnd = FindWindow(NULL, "하나");
: :     if(hWnd)
: :     {
: :         SendMessage(hWnd,WM_CLOSE,0,0);
: :     }
: : }

+ -

관련 글 리스트
67343 Findwindow ...설명좀 해주세요. hanmuun 1304 2012/05/27
67347     Re:Findwindow ...설명좀 해주세요. 송신영 2215 2012/05/27
67350         감사합니다. hanmuun 1120 2012/05/28
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.