|
최상위 윈도우를 얻어오셨군요. 그런데 그 윈도우의 무엇을 알고 싶으신 건지요.
만약 캡션을 알고 싶으신 거라면, 다음과 같이 하시면 됩니다.
HWND hWnd = GetForegroundWindow();
AnsiString WindowCaption;
WindowCaption.SetLength(256);
GetWindowText(hWnd, WindowCaption.c_str(), 255);
Edit1->Text = WindowCaption;
James 님이 쓰신 글 :
: 제가 C++ Builder에 초보라서요. 제가 에디트 컴포넌트를 만들고 Edit1->Text = GetforegroundWIndow();
: 라고 입력하고 빌드하니까.... 에러가 납니다. 이유는 GetforegroundWIndow()의 리턴값이 HWND형으로 되어 있더군요. GetforegroundWIndow()의 리턴값을 AnsiString으로 변환할 수 있는 방법은 없을까요?
: 고수님들의 도움 부탁합니다.
|