다음을 통해 공유


CWindow 클래스

이 클래스는 창을 조작하는 메서드를 제공합니다.

Important

이 클래스와 해당 멤버는 Windows 런타임에서 실행되는 애플리케이션에서 사용할 수 없습니다.

구문

class CWindow

멤버

공용 생성자

속성 설명
CWindow::CWindow 생성자입니다.

공용 메서드

이름 설명
CWindow::ArrangeIconicWindows 최소화된 모든 자식 창을 정렬합니다.
CWindow::Attach 개체에 창을 CWindow 연결합니다.
CWindow::BeginPaint 그리기 위한 창을 준비합니다.
CWindow::BringWindowToTop 창을 Z 순서의 맨 위로 가져옵니다.
CWindow::CenterWindow 창이 지정된 창에 대해 가운데에 맞습니다.
CWindow::ChangeClipboardChain 클립보드 뷰어 체인에서 창을 제거합니다.
CWindow::CheckDlgButton 지정된 단추의 검사 상태를 변경합니다.
CWindow::CheckRadioButton 지정된 라디오 단추를 확인합니다.
CWindow::ChildWindowFromPoint 지정된 점을 포함하는 자식 창을 검색합니다.
CWindow::ChildWindowFromPointEx 지정된 지점을 포함하는 특정 유형의 자식 창을 검색합니다.
CWindow::ClientToScreen 클라이언트 좌표를 화면 좌표로 변환합니다.
CWindow::Create 창을 만듭니다.
CWindow::CreateCaret 시스템 케어에 대한 새 셰이프를 만듭니다.
CWindow::CreateGrayCaret 시스템 캐리트의 회색 사각형을 만듭니다.
CWindow::CreateSolidCaret 시스템 캐리트에 대한 단색 사각형을 만듭니다.
CWindow::DeferWindowPos 지정된 창에 대해 지정된 다중 창 위치 구조를 업데이트.
CWindow::DestroyWindow 개체와 CWindow 연결된 창을 삭제합니다.
CWindow::Detach 개체에서 CWindow 창을 분리합니다.
CWindow::DlgDirList 지정된 경로 또는 파일 이름과 일치하는 모든 파일의 이름으로 목록 상자를 채웁니다.
CWindow::DlgDirListComboBox 지정된 경로 또는 파일 이름과 일치하는 모든 파일의 이름으로 콤보 상자를 채웁니다.
CWindow::DlgDirSelect 목록 상자에서 현재 선택 영역을 검색합니다.
CWindow::DlgDirSelectComboBox 콤보 상자에서 현재 선택 영역을 검색합니다.
CWindow::DragAcceptFiles 창에서 끌어간 파일을 허용할지 여부를 등록합니다.
CWindow::DrawMenuBar 창의 메뉴 모음을 다시 그립니다.
CWindow::EnableScrollBar 스크롤 막대 화살표를 사용하거나 사용하지 않도록 설정합니다.
CWindow::EnableWindow 입력을 사용하거나 사용하지 않도록 설정합니다.
CWindow::EndPaint 그리기의 끝을 표시합니다.
CWindow::FlashWindow 창을 한 번 깜박입니다.
CWindow::GetClientRect 클라이언트 영역의 좌표를 검색합니다.
CWindow::GetDC 클라이언트 영역에 대한 디바이스 컨텍스트를 검색합니다.
CWindow::GetDCEx 클라이언트 영역에 대한 디바이스 컨텍스트를 검색하고 클리핑 옵션을 허용합니다.
CWindow::GetDescendantWindow 지정된 하위 창을 검색합니다.
CWindow::GetDlgControl 지정된 컨트롤에서 인터페이스를 검색합니다.
CWindow::GetDlgCtrlID 창의 식별자를 검색합니다(자식 창에만 해당).
CWindow::GetDlgHost ATL 컨트롤 호스팅 컨테이너에 대한 인터페이스에 대한 포인터를 검색합니다.
CWindow::GetDlgItem 지정된 자식 창을 검색합니다.
CWindow::GetDlgItemInt 컨트롤의 텍스트를 정수로 변환합니다.
CWindow::GetDlgItemText 컨트롤의 텍스트를 검색합니다.
CWindow::GetExStyle 확장 창 스타일을 검색합니다.
CWindow::GetFont 창의 현재 글꼴을 검색합니다.
CWindow::GetHotKey 창과 연결된 핫 키를 결정합니다.
CWindow::GetIcon 창의 크거나 작은 아이콘을 검색합니다.
CWindow::GetLastActivePopup 가장 최근에 활성화된 팝업 창을 검색합니다.
CWindow::GetMenu 창의 메뉴를 검색합니다.
CWindow::GetNextDlgGroupItem 컨트롤 그룹 내에서 이전 또는 다음 컨트롤을 검색합니다.
CWindow::GetNextDlgTabItem 스타일이 있는 이전 또는 다음 컨트롤을 검색합니다 WS_TABSTOP .
CWindow::GetParent 바로 부모 창을 검색합니다.
CWindow::GetScrollInfo 스크롤 막대의 매개 변수를 검색합니다.
CWindow::GetScrollPos 스크롤 상자의 위치를 검색합니다.
CWindow::GetScrollRange 스크롤 막대 범위를 검색합니다.
CWindow::GetStyle 창 스타일을 검색합니다.
CWindow::GetSystemMenu 수정할 시스템 메뉴의 복사본을 만듭니다.
CWindow::GetTopLevelParent 최상위 부모 또는 소유자 창을 검색합니다.
CWindow::GetTopLevelWindow 최상위 소유자 창을 검색합니다.
CWindow::GetTopWindow 최상위 자식 창을 검색합니다.
CWindow::GetUpdateRect 업데이트 영역을 완전히 둘러싸는 가장 작은 사각형의 좌표를 검색합니다.
CWindow::GetUpdateRgn 업데이트 영역을 검색하고 지정된 지역에 복사합니다.
CWindow::GetWindow 지정된 창을 검색합니다.
CWindow::GetWindowContextHelpId 창의 도움말 컨텍스트 식별자를 검색합니다.
CWindow::GetWindowDC 전체 창에 대한 디바이스 컨텍스트를 검색합니다.
CWindow::GetWindowLong 지정된 오프셋에서 32비트 값을 추가 창 메모리로 검색합니다.
CWindow::GetWindowLongPtr 지정된 오프셋의 값을 포함하여 지정된 창에 대한 정보를 추가 창 메모리에 검색합니다.
CWindow::GetWindowPlacement 표시 상태 및 위치를 검색합니다.
CWindow::GetWindowProcessID 창을 만든 프로세스의 식별자를 검색합니다.
CWindow::GetWindowRect 창의 경계 차원을 검색합니다.
CWindow::GetWindowRgn 창의 창 영역 복사본을 가져옵니다.
CWindow::GetWindowText 창의 텍스트를 검색합니다.
CWindow::GetWindowTextLength 창 텍스트의 길이를 검색합니다.
CWindow::GetWindowThreadID 지정된 창을 만든 스레드의 식별자를 검색합니다.
CWindow::GetWindowWord 지정된 오프셋의 16비트 값을 추가 창 메모리로 검색합니다.
CWindow::GotoDlgCtrl 키보드 포커스를 대화 상자의 컨트롤로 설정합니다.
CWindow::HideCaret 시스템 캐리트를 숨깁니다.
CWindow::HiliteMenuItem 최상위 메뉴 항목에서 강조 표시를 강조 표시하거나 제거합니다.
CWindow::Invalidate 전체 클라이언트 영역을 무효화합니다.
CWindow::InvalidateRect 지정된 사각형 내의 클라이언트 영역을 무효화합니다.
CWindow::InvalidateRgn 지정된 지역 내의 클라이언트 영역을 무효화합니다.
CWindow::IsChild 지정된 창이 자식 창인지 여부를 확인합니다.
CWindow::IsDialogMessage 메시지가 지정된 대화 상자의 용도인지 여부를 결정합니다.
CWindow::IsDlgButtonChecked 단추의 검사 상태를 결정합니다.
CWindow::IsIconic 창을 최소화할지 여부를 결정합니다.
CWindow::IsParentDialog 컨트롤의 부모 창이 대화 상자 창인지 여부를 확인합니다.
CWindow::IsWindow 지정된 창 핸들이 기존 창을 식별하는지 여부를 확인합니다.
CWindow::IsWindowEnabled 창이 입력에 사용할 수 있는지 여부를 결정합니다.
CWindow::IsWindowUnicode 지정된 창이 네이티브 유니코드 창인지 여부를 확인합니다.
CWindow::IsWindowVisible 창의 표시 여부를 결정합니다.
CWindow::IsZoomed 창이 최대화되는지 여부를 결정합니다.
CWindow::KillTimer 타이머 이벤트를 삭제합니다.
CWindow::LockWindowUpdate 창에서 그리기를 사용하거나 사용하지 않도록 설정합니다.
CWindow::MapWindowPoints 창의 좌표 공간에서 다른 창의 좌표 공간으로 점 집합을 변환합니다.
CWindow::MessageBox 메시지 상자를 표시합니다.
CWindow::ModifyStyle 창 스타일을 수정합니다.
CWindow::ModifyStyleEx 확장 창 스타일을 수정합니다.
CWindow::MoveWindow 창의 크기와 위치를 변경합니다.
CWindow::NextDlgCtrl 키보드 포커스를 대화 상자의 다음 컨트롤로 설정합니다.
CWindow::OpenClipboard 클립보드를 엽니다.
CWindow::PostMessage 창을 만든 스레드와 연결된 메시지 큐에 메시지를 배치합니다. 스레드가 메시지를 처리할 때까지 기다리지 않고 반환합니다.
CWindow::PrevDlgCtrl 키보드 포커스를 대화 상자의 이전 컨트롤로 설정합니다.
CWindow::Print 지정된 디바이스 컨텍스트에서 창을 그릴 것을 요청합니다.
CWindow::PrintClient 지정된 디바이스 컨텍스트에서 창의 클라이언트 영역을 그릴 것을 요청합니다.
CWindow::RedrawWindow 클라이언트 영역에서 지정된 사각형 또는 영역을 업데이트.
CWindow::ReleaseDC 디바이스 컨텍스트를 해제합니다.
CWindow::ResizeClient 창의 크기를 조정합니다.
CWindow::ScreenToClient 화면 좌표를 클라이언트 좌표로 변환합니다.
CWindow::ScrollWindow 지정된 클라이언트 영역을 스크롤합니다.
CWindow::ScrollWindowEx 추가 기능을 사용하여 지정된 클라이언트 영역을 스크롤합니다.
CWindow::SendDlgItemMessage 컨트롤에 메시지를 보냅니다.
CWindow::SendMessage 창에 메시지를 보내고 창 프로시저가 메시지를 처리할 때까지 반환되지 않습니다.
CWindow::SendMessageToDescendants 지정된 하위 창에 메시지를 보냅니다.
CWindow::SendNotifyMessage 창에 메시지를 보냅니다. 호출 스레드 SendNotifyMessage 에서 창을 만든 경우 창 프로시저가 메시지를 처리할 때까지 반환되지 않습니다. 그렇지 않으면 즉시 반환됩니다.
CWindow::SetActiveWindow 창을 활성화합니다.
CWindow::SetCapture 모든 후속 마우스 입력을 창으로 보냅니다.
CWindow::SetClipboardViewer 클립보드 뷰어 체인에 창을 추가합니다.
CWindow::SetDlgCtrlID 창의 식별자를 변경합니다.
CWindow::SetDlgItemInt 컨트롤의 텍스트를 정수 값의 문자열 표현으로 변경합니다.
CWindow::SetDlgItemText 컨트롤의 텍스트를 변경합니다.
CWindow::SetFocus 입력 포커스를 창으로 설정합니다.
CWindow::SetFont 창의 현재 글꼴을 변경합니다.
CWindow::SetHotKey 핫 키를 창과 연결합니다.
CWindow::SetIcon 창의 크거나 작은 아이콘을 변경합니다.
CWindow::SetMenu 창의 현재 메뉴를 변경합니다.
CWindow::SetParent 부모 창을 변경합니다.
CWindow::SetRedraw 다시 그리기 플래그를 설정하거나 지웁니다.
CWindow::SetScrollInfo 스크롤 막대의 매개 변수를 설정합니다.
CWindow::SetScrollPos 스크롤 상자의 위치를 변경합니다.
CWindow::SetScrollRange 스크롤 막대 범위를 변경합니다.
CWindow::SetTimer 타이머 이벤트를 만듭니다.
CWindow::SetWindowContextHelpId 창의 도움말 컨텍스트 식별자를 설정합니다.
CWindow::SetWindowLong 지정된 오프셋의 32비트 값을 추가 창 메모리로 설정합니다.
CWindow::SetWindowLongPtr 지정된 창의 특성을 변경하고 추가 창 메모리의 지정된 오프셋에 값을 설정합니다.
CWindow::SetWindowPlacement 표시 상태 및 위치를 설정합니다.
CWindow::SetWindowPos 크기, 위치 및 Z 순서를 설정합니다.
CWindow::SetWindowRgn 창의 창 영역을 설정합니다.
CWindow::SetWindowText 창의 텍스트를 변경합니다.
CWindow::SetWindowWord 지정된 오프셋의 16비트 값을 추가 창 메모리로 설정합니다.
CWindow::ShowCaret 시스템 캐리트를 표시합니다.
CWindow::ShowOwnedPopups 창이 소유한 팝업 창을 표시하거나 숨깁니다.
CWindow::ShowScrollBar 스크롤 막대를 표시하거나 숨깁니다.
CWindow::ShowWindow 창의 표시 상태를 설정합니다.
CWindow::ShowWindowAsync 다른 스레드에서 만든 창의 표시 상태를 설정합니다.
CWindow::UpdateWindow 클라이언트 영역을 업데이트합니다.
CWindow::ValidateRect 지정된 사각형 내의 클라이언트 영역의 유효성을 검사합니다.
CWindow::ValidateRgn 지정된 지역 내의 클라이언트 영역의 유효성을 검사합니다.
CWindow::WinHelp Windows 도움말을 시작합니다.

Public 연산자

이름 설명
CWindow::operator HWND 개체HWNDCWindow .로 변환합니다.
CWindow::operator = 개체에 HWNDCWindow 할당합니다.

공용 데이터 멤버

이름 설명
CWindow::m_hWnd 개체와 연결된 창에 대한 핸들입니다 CWindow .
CWindow::rcDefault 기본 창 차원을 포함합니다.

설명

CWindow 는 ATL에서 창을 조작하기 위한 기본 기능을 제공합니다. 대부분의 메서드는 CWindow 단순히 Win32 API 함수 중 하나를 래핑합니다. 예를 들어 프로토타입과 다음을 비교합니다.CWindow::ShowWindowShowWindow

CWindow 메서드 Win32 함수
BOOL ShowWindow( int nCmdShow ); BOOL ShowWindow( HWND hWnd , int nCmdShow );

CWindow::ShowWindow는 첫 번째 매개 변수로 전달 CWindow::m_hWnd 하여 Win32 함수 ShowWindow 를 호출합니다. Win32 함수를 직접 래핑하는 모든 CWindow 메서드는 멤버를 m_hWnd 전달하므로 대부분의 CWindow 설명서에서 Windows SDK를 참조합니다.

참고 항목

모든 창 관련 Win32 함수가 래핑 CWindow되는 것은 아니며 모든 CWindow 메서드가 Win32 함수를 래핑하는 것은 아닙니다.

CWindow::m_hWndHWND 창을 식별하는 를 저장합니다. 다음과 HWND 같은 경우 개체에 연결됩니다.

  • in's HWNDCWindow생성자를 지정합니다.

  • CWindow::Attach을 호출합니다.

  • 사용 하 여 CWindow' s .operator =

  • 다음 CWindow클래스 중 하나를 사용하여 창을 만들거나 서브클래스합니다.

CWindowImpl 새 창을 만들거나 기존 창을 서브클래싱할 수 있습니다.

CContainedWindow 다른 개체 내에 포함된 창을 구현합니다. 새 창을 만들거나 기존 창을 서브클래싱할 수 있습니다.

CDialogImpl 모달 또는 모덜리스 대화 상자를 만들 수 있습니다.

Windows에 대한 자세한 내용은 Windows 및 Windows SDK의 후속 항목을 참조하세요. ATL에서 창을 사용하는 방법에 대한 자세한 내용은 ATL 창 클래스 문서를 참조하세요.

요구 사항

헤더atlwin.h:

CWindow::ArrangeIconicWindows

최소화된 모든 자식 창을 정렬합니다.

UINT ArrangeIconicWindows() throw();

설명

Windows SDK에서 참조 ArrangeIconicWindows 하세요.

CWindow::Attach

개체에 의해 식별된 hWndNew 창을 연결합니다 CWindow .

void Attach(HWND hWndNew) throw();

매개 변수

hWndNew
[in] 창에 대한 핸들입니다.

예시

//The following example attaches an HWND to the CWindow object
HWND hWnd  = ::GetDesktopWindow();
CWindow myWindow;
myWindow.Attach(hWnd);

CWindow::BeginPaint

그리기 위한 창을 준비합니다.

HDC BeginPaint(LPPAINTSTRUCT lpPaint) throw();

설명

Windows SDK에서 참조 BeginPaint 하세요.

예시

//The following example attaches an HWND to the CWindow object
//and calls CWindow::BeginPaint() and CWindow::EndPaint() in the 
// WM_PAINT handler of a CWindowImpl-derived class
LRESULT CMyCtrl::OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, 
   BOOL& /*bHandled*/)
{
   CWindow myWindow;
   myWindow.Attach(m_hWnd);
   PAINTSTRUCT ps;
   HDC hDC  = myWindow.BeginPaint(&ps);
   //Use the hDC as much as you want
   ::Rectangle(hDC, 0, 0, 50, 50);

   myWindow.EndPaint(&ps);

   return 0;
}

CWindow::BringWindowToTop

창을 Z 순서의 맨 위로 가져옵니다.

BOOL BringWindowToTop() throw();

설명

Windows SDK에서 참조 BringWindowToTop 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::BringWindowToTop() to bring the window to the top 
//of the z-order.

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bOnTop = myWindow.BringWindowToTop();

//check if we could bring the window on top
if(bOnTop)
{
   //Do something
}

CWindow::CenterWindow

창이 지정된 창에 대해 가운데에 맞습니다.

BOOL CenterWindow(HWND hWndCenter = NULL) throw();

매개 변수

hWndCenter
[in] 가운데에 배치할 창에 대한 핸들입니다. 이 매개 변수가 NULL (기본값)이면 자식 창인 경우 메서드가 창의 부모 창으로 설정 hWndCenter 됩니다. 그렇지 않으면 창의 소유자 창으로 설정 hWndCenter 됩니다.

Return Value

TRUE창이 가운데에 성공적으로 배치되면 FALSE

예시

//The following example attaches various HWNDs to the CWindow objects 
//and calls CWindow::CenterWindow() for each of them

CWindow childWindow, popupWindow, overlappedWindow;

childWindow.Attach(hWndChild); //a window created with WS_CHILD style
childWindow.CenterWindow();    //This will center the child 
                               //window against its Parent window

popupWindow.Attach(hWndPopup); //a window created with WS_POPUP style
popupWindow.CenterWindow();    //This will center the popup window 
                               //against its Owner window

overlappedWindow.Attach(hWndOverlapped); //a window created with 
                                         //WS_OVERLAPPED style
overlappedWindow.CenterWindow(::GetDesktopWindow()); //This will center 
                       //the overlapped window against the DeskTop window

CWindow::ChangeClipboardChain

클립보드 뷰어 체인에서 창을 제거합니다.

BOOL ChangeClipboardChain(HWND hWndNewNext) throw();

설명

Windows SDK에서 참조 ChangeClipboardChain 하세요.

CWindow::CheckDlgButton

지정된 단추의 검사 상태를 변경합니다.

BOOL CheckDlgButton(int nIDButton, UINT nCheck) throw();

설명

Windows SDK에서 참조 CheckDlgButton 하세요.

CWindow::CheckRadioButton

지정된 라디오 단추를 확인합니다.

BOOL CheckRadioButton(
    int nIDFirstButton,
    int nIDLastButton,
    int nIDCheckButton) throw();

설명

Windows SDK에서 참조 CheckRadioButton 하세요.

CWindow::ChildWindowFromPoint

지정된 점을 포함하는 자식 창을 검색합니다.

HWND ChildWindowFromPoint(POINT point) const throw();

설명

Windows SDK에서 참조 ChildWindowFromPoint 하세요.

CWindow::ChildWindowFromPointEx

지정된 지점을 포함하는 특정 유형의 자식 창을 검색합니다.

HWND ChildWindowFromPoint(POINT point, UINT uFlags) const throw();

설명

Windows SDK에서 참조 ChildWindowFromPointEx 하세요.

CWindow::ClientToScreen

클라이언트 좌표를 화면 좌표로 변환합니다.

BOOL ClientToScreen(LPPOINT lpPoint) const throw();
BOOL ClientToScreen(LPRECT lpRect) const throw();

설명

Windows SDK에서 참조 ClientToScreen 하세요.

이 메서드의 두 번째 버전을 사용하면 구조체의 RECT 좌표를 변환할 수 있습니다.

CWindow::Create

창을 만듭니다.

HWND Create(
    LPCTSTR lpstrWndClass,
    HWND hWndParent,
    _U_RECT rect = NULL,
    LPCTSTR szWindowName = NULL,
    DWORD dwStyle = 0,
    DWORD dwExStyle = 0,
    _U_MENUorID MenuOrID = 0U,
    LPVOID lpCreateParam = NULL) throw();

매개 변수

lpstrWndClass
[in] 창의 클래스에 대한 포인터입니다.

hWndParent
[in] 부모 또는 소유자 창에 대한 핸들입니다.

rect
[in] 창의 위치를 지정하는 형식 _U_RECT 의 변수입니다. 기본값은 NULL입니다. 이 매개 변수인 경우 NULLCWindow::rcDefault 이 사용됩니다.

szWindowName
[in] 창의 이름을 지정합니다. 기본값은 NULL입니다.

dwStyle
[in] 창의 스타일입니다. 기본값은 0입니다. 즉, 스타일이 지정되지 않았습니다. 가능한 값 목록은 Windows SDK를 참조 CreateWindow 하세요.

dwExStyle
[in] 확장 창 스타일입니다. 기본값은 0입니다. 즉, 확장 스타일이 지정되지 않습니다. 가능한 값 목록은 Windows SDK를 참조 CreateWindowEx 하세요.

MenuOrID
[in] 메뉴 또는 창 식별자에 대한 핸들을 지정하는 형식 _U_MENUorID 의 변수입니다. 기본값은 0U입니다.

lpCreateParam
구조체에 포함된 창 만들기 데이터에 대한 포인터입니다 CREATESTRUCT .

Return Value

성공하면 새로 만든 창에 대한 핸들(로 지정됨) m_hWnd입니다. 그렇지 않으면 NULL입니다.

설명

CWindow::rcDefault__declspec(selectany) RECT CWindow::rcDefault = {CW_USEDEFAULT, CW_USEDEFAULT, 0, 0};으로 정의됩니다.

자세한 내용은 Windows SDK를 참조 CreateWindow 하세요.

참고 0이 매개 변수의 MenuOrID 값으로 사용되는 경우 컴파일러 오류를 방지하려면 (기본값)으로 0U 지정해야 합니다.

CWindow::CreateCaret

시스템 케어에 대한 새 셰이프를 만듭니다.

BOOL CreateCaret(HBITMAP pBitmap) throw();

설명

Windows SDK에서 참조 CreateCaret 하세요.

CWindow::CreateGrayCaret

시스템 캐리트의 회색 사각형을 만듭니다.

BOOL CreateGrayCaret(int nWidth, int nHeight) throw();

설명

Windows SDK에서 참조 CreateCaret 하세요.

(HBITMAP) 1 비트맵 핸들 매개 변수를 Win32 함수에 전달합니다.

CWindow::CreateSolidCaret

시스템 캐리트에 대한 단색 사각형을 만듭니다.

BOOL CreateSolidCaret(int nWidth, int nHeight) throw();

설명

Windows SDK에서 참조 CreateCaret 하세요.

(HBITMAP) 0 비트맵 핸들 매개 변수를 Win32 함수에 전달합니다.

CWindow::CWindow

생성자입니다.

CWindow(HWND hWnd = NULL) throw();

매개 변수

hWnd
[in] 창에 대한 핸들입니다.

설명

멤버hWndm_hWnd 초기화합니다. 이 멤버는 기본적으로 .입니다NULL.

참고 항목

CWindow::CWindow 창이 만들어지지 않습니다. 클래스 및 CWindowImplCContainedWindowCDialogImpl (모두 파생)는 CWindow창 또는 대화 상자를 만드는 메서드를 제공한 다음 할당됩니다CWindow::m_hWnd. Win32 함수를 CreateWindow 사용할 수도 있습니다.

CWindow::DeferWindowPos

지정된 창에 대해 지정된 다중 창 위치 구조를 업데이트.

HDWP DeferWindowPos(
    HDWP hWinPosInfo,
    HWND hWndInsertAfter,
    int x,
    int y,
    int cx,
    int cy,
    UINT uFlags) throw();

설명

Windows SDK에서 참조 DeferWindowPos 하세요.

CWindow::DestroyWindow

개체와 연결된 창을 삭제하고 으로 CWindow 설정합니다 m_hWndNULL.

BOOL DestroyWindow() throw();

설명

Windows SDK에서 참조 DestroyWindow 하세요.

개체 자체는 삭제 CWindow 되지 않습니다.

예시

  //The following example attaches an HWND to the CWindow object and 
  //calls CWindow::DestroyWindow() to destroy the window

  CWindow myWindow;
  myWindow.Attach(hWndChild);
  //call the CWindow wrappers

  myWindow.DestroyWindow();
  hWndChild = NULL;

CWindow::Detach

m_hWnd 개체에서 CWindow 분리하고 .로 NULL설정합니다m_hWnd.

HWND Detach() throw();

Return Value

HWND 개체와 연결된 개체입니다CWindow.

예시

//The following example attaches an HWND to the CWindow object and 
//later detaches the CWindow object from the HWND when no longer needed

CWindow myWindow;
myWindow.Attach(hWnd);

//call CWindow wrappers

//We don't need the C++ object any more, so detach it from the HWND.
myWindow.Detach(); 

CWindow::DlgDirList

지정된 경로 또는 파일 이름과 일치하는 모든 파일의 이름으로 목록 상자를 채웁니다.

int DlgDirList(
    LPTSTR lpPathSpec,
    int nIDListBox,
    int nIDStaticPath,
    UINT nFileType) throw();

설명

Windows SDK에서 참조 DlgDirList 하세요.

CWindow::DlgDirListComboBox

지정된 경로 또는 파일 이름과 일치하는 모든 파일의 이름으로 콤보 상자를 채웁니다.

int DlgDirListComboBox(
    LPTSTR lpPathSpec,
    int nIDComboBox,
    int nIDStaticPath,
    UINT nFileType) throw();

설명

Windows SDK에서 참조 DlgDirListComboBox 하세요.

CWindow::DlgDirSelect

목록 상자에서 현재 선택 영역을 검색합니다.

BOOL DlgDirSelect(
    LPTSTR lpString,
    int nCount,
    int nIDListBox) throw();

설명

Windows SDK에서 참조 DlgDirSelectEx 하세요.

CWindow::DlgDirSelectComboBox

콤보 상자에서 현재 선택 영역을 검색합니다.

BOOL DlgDirSelectComboBox(
    LPTSTR lpString,
    int nCount,
    int nIDComboBox) throw();

설명

Windows SDK에서 참조 DlgDirSelectComboBoxEx 하세요.

CWindow::DragAcceptFiles

창에서 끌어간 파일을 허용할지 여부를 등록합니다.

void DragAcceptFiles(BOOL bAccept = TRUE);

설명

Windows SDK에서 참조 DragAcceptFiles 하세요.

CWindow::DrawMenuBar

창의 메뉴 모음을 다시 그립니다.

BOOL DrawMenuBar() throw();

설명

Windows SDK에서 참조 DrawMenuBar 하세요.

CWindow::EnableScrollBar

스크롤 막대 화살표를 사용하거나 사용하지 않도록 설정합니다.

BOOL EnableScrollBar(UINT uSBFlags, UINT uArrowFlags = ESB_ENABLE_BOTH) throw();

설명

Windows SDK에서 참조 EnableScrollBar 하세요.

CWindow::EnableWindow

입력을 사용하거나 사용하지 않도록 설정합니다.

BOOL EnableWindow(BOOL bEnable = TRUE) throw();

설명

Windows SDK에서 참조 EnableWindow 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::EnableWindow() to enable and disable the window
//wrapped by the CWindow object

CWindow myWindow;
myWindow.Attach(hWnd);

//The following call enables the window 
//CWindow::EnableWindow() takes TRUE as the default parameter

myWindow.EnableWindow();

if(myWindow.IsWindowEnabled())
{
   //Do something now that the window is enabled

   //Now it's time to disable the window again
   myWindow.EnableWindow(FALSE);
}

CWindow::EndPaint

그리기의 끝을 표시합니다.

void EndPaint(LPPAINTSTRUCT lpPaint) throw();

설명

Windows SDK에서 참조 EndPaint 하세요.

예시

//The following example attaches an HWND to the CWindow object
//and calls CWindow::BeginPaint() and CWindow::EndPaint() in the 
// WM_PAINT handler of a CWindowImpl-derived class
LRESULT CMyCtrl::OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, 
   BOOL& /*bHandled*/)
{
   CWindow myWindow;
   myWindow.Attach(m_hWnd);
   PAINTSTRUCT ps;
   HDC hDC  = myWindow.BeginPaint(&ps);
   //Use the hDC as much as you want
   ::Rectangle(hDC, 0, 0, 50, 50);

   myWindow.EndPaint(&ps);

   return 0;
}

CWindow::FlashWindow

창을 한 번 깜박입니다.

BOOL FlashWindow(BOOL bInvert) throw();

설명

Windows SDK에서 참조 FlashWindow 하세요.

CWindow::GetClientRect

클라이언트 영역의 좌표를 검색합니다.

BOOL GetClientRect(LPRECT lpRect) const throw();

설명

Windows SDK에서 참조 GetClientRect 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetClientRect() to get the client area rectangle
//of the window

CWindow myWindow;
myWindow.Attach(hWnd);
RECT rc;
myWindow.GetClientRect(&rc);

CWindow::GetDC

클라이언트 영역에 대한 디바이스 컨텍스트를 검색합니다.

HDC GetDC() throw();

설명

Windows SDK에서 참조 GetDC 하세요.

예시

// The following example attaches a HWND to the CWindow object,
// calls CWindow::GetDC to retrieve the DC of the client
// area of the window wrapped by CWindow Object, and calls
// CWindow::ReleaseDC to release the DC. 

CWindow myWindow;
myWindow.Attach(hWnd);   
HDC hDC = myWindow.GetDC();

// Use the DC

myWindow.ReleaseDC(hDC);
hDC = NULL;

CWindow::GetDCEx

클라이언트 영역에 대한 디바이스 컨텍스트를 검색하고 클리핑 옵션을 허용합니다.

HDC GetDCEx(HRGN hRgnClip, DWORD flags) throw();

설명

Windows SDK에서 참조 GetDCEx 하세요.

CWindow::GetDescendantWindow

지정된 식별자가 지정한 하위 창을 찾습니다.

HWND GetDescendantWindow(int nID) const throw();

매개 변수

nID
[in] 검색할 하위 창의 식별자입니다.

Return Value

하위 창에 대한 핸들입니다.

설명

GetDescendantWindow 는 직계 자식인 창뿐만 아니라 자식 창의 전체 트리를 검색합니다.

CWindow::GetDlgControl

복합 컨트롤 또는 컨트롤 호스팅 대화 상자에서 호스트되는 ActiveX 컨트롤의 인터페이스에 대한 포인터를 얻으려면 이 함수를 호출합니다.

HRESULT GetDlgControl(
    int nID,
    REFIID iid,
    void** ppCtrl) throw();

매개 변수

nID
[in] 검색할 컨트롤의 리소스 ID입니다.

iid
[in] 컨트롤에서 가져오려는 인터페이스의 ID입니다.

ppCtrl
[out] 인터페이스에 대한 포인터입니다.

Return Value

성공 또는 유효한 오류를 반환 S_OK 합니다 HRESULT. 예를 들어 함수는 지정된 nID 컨트롤을 찾을 수 없는 경우 반환 E_FAIL 하고 컨트롤을 찾을 수 있지만 지정된 iid인터페이스를 지원하지 않는 경우 반환 E_NOINTERFACE 합니다.

설명

이 포인터를 사용하여 인터페이스에서 메서드를 호출할 수 있습니다.

CWindow::GetDlgCtrlID

창의 식별자를 검색합니다(자식 창에만 해당).

int GetDlgCtrlID() const throw();

설명

Windows SDK에서 참조 GetDlgCtrlID 하세요.

CWindow::GetDlgHost

ATL 컨트롤 호스팅 컨테이너에 대한 인터페이스에 대한 포인터를 검색합니다.

HRESULT GetDlgHost(
    int nID,
    REFIID iid,
    void** ppHost) throw();

매개 변수

nID
[in] 검색할 컨트롤의 리소스 ID입니다.

iid
[in] 컨트롤에서 가져오려는 인터페이스의 ID입니다.

ppHost
[out] 인터페이스에 대한 포인터입니다.

Return Value

지정한 창이 컨트롤 컨테이너이고 요청된 iid 인터페이스를 검색할 수 있는지를 반환 S_OK 합니다. 창이 컨트롤 컨테이너가 아니거나 요청된 인터페이스를 검색할 수 없는 경우를 반환 E_FAIL 합니다. 지정된 ID가 있는 창을 찾을 수 없는 경우 반환 값은 같습니다 HRESULT_FROM_WIN32(ERROR_CONTROL_ID_NOT_FOUND).

설명

이 포인터를 사용하여 인터페이스에서 메서드를 호출할 수 있습니다.

CWindow::GetDlgItem

지정된 자식 창을 검색합니다.

HWND GetDlgItem(int nID) const throw();

설명

Windows SDK에서 GetDlgItem을 참조하세요.

CWindow::GetDlgItemInt

컨트롤의 텍스트를 정수로 변환합니다.

UINT GetDlgItemInt(
    int nID,
    BOOL* lpTrans = NULL,
    BOOL bSigned = TRUE) const throw();

설명

Windows SDK에서 참조 GetDlgItemInt 하세요.

CWindow::GetDlgItemText

컨트롤의 텍스트를 검색합니다.

UINT GetDlgItemText(
    int nID,
    LPTSTR lpStr,
    int nMaxCount) const throw();

BOOL GetDlgItemText(
    int nID,
    BSTR& bstrText) const throw();

설명

자세한 내용은 Windows SDK를 참조 GetDlgItemText 하세요.

이 메서드의 두 번째 버전을 사용하면 컨트롤의 텍스트를 .에 복사할 수 있습니다 BSTR. 텍스트가 성공적으로 복사되면 이 버전이 반환되고, FALSE그렇지 않으면 반환 TRUE 됩니다.

CWindow::GetExStyle

창의 확장 창 스타일을 검색합니다.

DWORD GetExStyle() const throw();

Return Value

창의 확장 스타일입니다.

설명

일반 창 스타일을 검색하려면 .를 호출 GetStyle합니다.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetExStyle() to retrieve the extended styles of 
//the window

CWindow myWindow;
myWindow.Attach(hWnd);
DWORD dwExStyles = myWindow.GetExStyle();

CWindow::GetFont

창에 메시지를 보내 창의 현재 글꼴을 WM_GETFONT 검색합니다.

HFONT GetFont() const throw();

Return Value

글꼴 핸들입니다.

CWindow::GetHotKey

메시지를 보내 창과 연결된 핫 키를 결정합니다 WM_GETHOTKEY .

DWORD GetHotKey() const throw();

Return Value

창과 연결된 핫 키에 대한 가상 키 코드 및 한정자입니다. 가능한 한정자 목록은 Windows SDK를 참조 WM_GETHOTKEY 하세요. 표준 가상 키 코드 목록은 다음을 참조하세요 Winuser.h.

CWindow::GetIcon

창의 크거나 작은 아이콘에 대한 핸들을 검색합니다.

HICON GetIcon(BOOL bBigIcon = TRUE) const;

매개 변수

bBigIcon
[in] 기본값인 경우 TRUE 메서드는 큰 아이콘을 반환합니다. 그렇지 않으면 작은 아이콘을 반환합니다.

Return Value

아이콘 핸들입니다.

설명

GetIcon 는 창에 WM_GETICON 메시지를 보냅니다.

CWindow::GetLastActivePopup

가장 최근에 활성화된 팝업 창을 검색합니다.

HWND GetLastActivePopup() const throw();

설명

Windows SDK에서 참조 GetLastActivePopup 하세요.

CWindow::GetMenu

창의 메뉴를 검색합니다.

HMENU GetMenu() const throw();

설명

Windows SDK에서 참조 GetMenu 하세요.

CWindow::GetNextDlgGroupItem

컨트롤 그룹 내에서 이전 또는 다음 컨트롤을 검색합니다.

HWND GetNextDlgGroupItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw();

설명

Windows SDK에서 참조 GetNextDlgGroupItem 하세요.

CWindow::GetNextDlgTabItem

스타일이 있는 이전 또는 다음 컨트롤을 검색합니다 WS_TABSTOP .

HWND GetNextDlgTabItem(HWND hWndCtl, BOOL bPrevious = FALSE) const throw();

설명

Windows SDK에서 참조 GetNextDlgTabItem 하세요.

CWindow::GetParent

바로 부모 창을 검색합니다.

HWND GetParent() const throw();

설명

Windows SDK에서 참조 GetParent 하세요.

예시

// The following example attaches a HWND to the CWindow object
// and calls CWindow::GetParent to find out the parent
// window of the window wrapped by CWindow object.

CWindow myWindow;
myWindow.Attach(hWnd);   
HWND hWndParent = myWindow.GetParent();

CWindow::GetScrollInfo

스크롤 막대의 매개 변수를 검색합니다.

BOOL GetScrollInfo(int nBar, LPSCROLLINFO lpScrollInfo) throw();

설명

Windows SDK에서 참조 GetScrollInfo 하세요.

CWindow::GetScrollPos

스크롤 상자의 위치를 검색합니다.

int GetScrollPos(int nBar) const throw();

설명

Windows SDK에서 참조 GetScrollPos 하세요.

CWindow::GetScrollRange

스크롤 막대 범위를 검색합니다.

BOOL GetScrollRange(
    int nBar,
    LPINT lpMinPos,
    LPINT lpMaxPos) const throw();

설명

Windows SDK에서 참조 GetScrollRange 하세요.

CWindow::GetStyle

창의 창 스타일을 검색합니다.

DWORD GetStyle() const throw();

Return Value

창의 스타일입니다.

설명

확장 창 스타일을 검색하려면 .를 호출 GetExStyle합니다.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetStyle() to retrieve the styles of the window

CWindow myWindow;
myWindow.Attach(hWnd);
DWORD dwStyles = myWindow.GetStyle();

CWindow::GetSystemMenu

수정할 시스템 메뉴의 복사본을 만듭니다.

HMENU GetSystemMenu(BOOL bRevert) const throw();

설명

Windows SDK에서 참조 GetSystemMenu 하세요.

CWindow::GetTopLevelParent

창의 최상위 부모 창을 검색합니다.

HWND GetTopLevelParent() const throw();

Return Value

최상위 부모 창에 대한 핸들입니다.

CWindow::GetTopLevelWindow

창의 최상위 부모 또는 소유자 창을 검색합니다.

HWND GetTopLevelWindow() const throw();

Return Value

최상위 소유자 창에 대한 핸들입니다.

CWindow::GetTopWindow

최상위 자식 창을 검색합니다.

HWND GetTopWindow() const throw();

설명

Windows SDK에서 참조 GetTopWindow 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetTopWindow() to get the top-level child window

CWindow myWindow;
myWindow.Attach(hWnd);
HWND hWndFavoriteChild = myWindow.GetTopWindow();

CWindow::GetUpdateRect

업데이트 영역을 완전히 둘러싸는 가장 작은 사각형의 좌표를 검색합니다.

BOOL GetUpdateRect(LPRECT lpRect, BOOL bErase = FALSE) throw();

설명

Windows SDK에서 참조 GetUpdateRect 하세요.

CWindow::GetUpdateRgn

업데이트 영역을 검색하고 지정된 지역에 복사합니다.

int GetUpdateRgn(HRGN hRgn, BOOL bErase = FALSE) throw();

설명

Windows SDK에서 참조 GetUpdateRgn 하세요.

CWindow::GetWindow

지정된 창을 검색합니다.

HWND GetWindow(UINT nCmd) const throw();

설명

Windows SDK에서 참조 GetWindow 하세요.

CWindow::GetWindowContextHelpId

창의 도움말 컨텍스트 식별자를 검색합니다.

DWORD GetWindowContextHelpId() const throw();

설명

Windows SDK에서 참조 GetWindowContextHelpId 하세요.

CWindow::GetWindowDC

전체 창에 대한 디바이스 컨텍스트를 검색합니다.

HDC GetWindowDC() throw();

설명

Windows SDK에서 참조 GetWindowDC 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetWindowDC() to retrieve the DC of the entire window

CWindow myWindow;
myWindow.Attach(hWnd);
HDC hDC = myWindow.GetWindowDC();

CWindow::GetWindowLong

지정된 오프셋에서 32비트 값을 추가 창 메모리로 검색합니다.

LONG GetWindowLong(int nIndex) const throw();

설명

Windows SDK에서 참조 GetWindowLong 하세요.

참고 항목

32비트 및 64비트 버전의 Windows CWindow::GetWindowLongPtr와 호환되는 코드를 작성하려면 .

CWindow::GetWindowLongPtr

지정된 오프셋의 값을 포함하여 지정된 창에 대한 정보를 추가 창 메모리에 검색합니다.

LONG_PTR GetWindowLongPtr(int nIndex) const throw();

설명

자세한 내용은 Windows SDK를 참조 GetWindowLongPtr 하세요.

포인터 또는 핸들을 검색하는 경우 이 함수는 메서드를 대체합니다 CWindow::GetWindowLong .

참고 항목

포인터와 핸들은 32비트 Windows에서는 32비트, 64비트 Windows에서는 64비트입니다.

32비트 및 64비트 버전의 Windows CWindow::GetWindowLongPtr와 호환되는 코드를 작성하려면 .

CWindow::GetWindowPlacement

표시 상태 및 위치를 검색합니다.

BOOL GetWindowPlacement(WINDOWPLACEMENT FAR* lpwndpl) const throw();

설명

Windows SDK에서 참조 GetWindowPlacement 하세요.

CWindow::GetWindowProcessID

창을 만든 프로세스의 식별자를 검색합니다.

DWORD GetWindowProcessID() throw();

설명

Windows SDK에서 참조 GetWindowThreadProcessID 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetWindowProcessID() to retrieve the id of the 
//process that created the window

CWindow myWindow;
myWindow.Attach(hWnd);
DWORD dwID = myWindow.GetWindowProcessID();

CWindow::GetWindowRect

창의 경계 차원을 검색합니다.

BOOL GetWindowRect(LPRECT lpRect) const throw();

설명

Windows SDK에서 참조 GetWindowRect 하세요.

CWindow::GetWindowRgn

창의 창 영역 복사본을 가져옵니다.

int GetWindowRgn(HRGN hRgn) throw();

설명

Windows SDK에서 참조 GetWindowRgn 하세요.

CWindow::GetWindowText

창의 텍스트를 검색합니다.

int GetWindowText(LPTSTR lpszStringBuf, int nMaxCount) const throw();
BOOL GetWindowText(BSTR& bstrText) throw();
int GetWindowText(CSimpleString& strText) const;

매개 변수

lpszStringBuf
창 텍스트를 쓸 버퍼입니다.

nMaxCount
문자 단위의 버퍼 크기이며, 쓸 수 있는 최대 문자 수이기도 합니다.

bstrText
창 텍스트를 저장할 BSTR입니다.

strText
창 텍스트를 저장할 CString입니다.

Return Value

텍스트가 성공적으로 복사되면 반환 값이 반환되고 TRUE, 그렇지 않으면 반환 값이 입니다 FALSE.

설명

Windows SDK에서 참조 GetWindowText 하세요.

이 메서드의 두 번째 버전을 사용하면 텍스트를 BSTR저장할 수 있습니다. 세 번째 버전에서는 기본 클래스CString이므로 결과를 저장할 CStringCSimpleString 수 있습니다.

CWindow::GetWindowTextLength

창 텍스트의 길이를 검색합니다.

int GetWindowTextLength() const throw();

설명

Windows SDK에서 참조 GetWindowTextLength 하세요.

CWindow::GetWindowThreadID

지정된 창을 만든 스레드의 식별자를 검색합니다.

DWORD GetWindowThreadID() throw();

설명

Windows SDK에서 참조 GetWindowThreadProcessID 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetWindowThreadID() to retrieve the id of the thread 
//that created the window

CWindow myWindow;
myWindow.Attach(hWnd);
DWORD dwID = myWindow.GetWindowThreadID();

CWindow::GetWindowWord

지정된 오프셋의 16비트 값을 추가 창 메모리로 검색합니다.

WORD GetWindowWord(int nIndex) const throw();

설명

Windows SDK에서 참조 GetWindowLong 하세요.

CWindow::GotoDlgCtrl

키보드 포커스를 대화 상자의 컨트롤로 설정합니다.

void GotoDlgCtrl(HWND hWndCtrl) const throw();

설명

Windows SDK에서 참조 WM_NEXTDLGCTL 하세요.

CWindow::HideCaret

시스템 캐리트를 숨깁니다.

BOOL HideCaret() throw();

설명

Windows SDK에서 참조 HideCaret 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::HideCaret() to hide the caret of the window owning 
//the caret

CWindow myWindow;
myWindow.Attach(hWndEdit);
myWindow.HideCaret();

CWindow::HiliteMenuItem

최상위 메뉴 항목에서 강조 표시를 강조 표시하거나 제거합니다.

BOOL HiliteMenuItem(
    HMENU hMenu,
    UINT uHiliteItem,
    UINT uHilite) throw();

설명

Windows SDK에서 참조 HiliteMenuItem 하세요.

CWindow::Invalidate

전체 클라이언트 영역을 무효화합니다.

BOOL Invalidate(BOOL bErase = TRUE) throw();

설명

Windows SDK에서 참조 InvalidateRect 하세요.

매개 변수를 RECT Win32 함수에 InvalidateRect 전달합니다NULL.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::Invalidate() to invalidate the entire client area

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.Invalidate();

CWindow::InvalidateRect

지정된 사각형 내의 클라이언트 영역을 무효화합니다.

BOOL InvalidateRect(LPCRECT lpRect, BOOL bErase = TRUE) throw();

설명

Windows SDK에서 참조 InvalidateRect 하세요.

CWindow::InvalidateRgn

지정된 지역 내의 클라이언트 영역을 무효화합니다.

void InvalidateRgn(HRGN hRgn, BOOL bErase = TRUE) throw();

설명

자세한 내용은 Windows SDK를 참조 InvalidateRgn 하세요.

Win32 함수는 void 항상 반환되는 InvalidateRgn 동안 반환 형식을 지정합니다 TRUE.

CWindow::IsChild

지정된 창이 자식 창인지 여부를 확인합니다.

BOOL IsChild(const HWND hWnd) const throw();

설명

Windows SDK에서 참조 IsChild 하세요.

CWindow::IsDialogMessage

메시지가 지정된 대화 상자의 용도인지 여부를 결정합니다.

BOOL IsDialogMessage(LPMSG lpMsg) throw();

설명

Windows SDK에서 참조 IsDialogMessage 하세요.

CWindow::IsDlgButtonChecked

단추의 검사 상태를 결정합니다.

UINT IsDlgButtonChecked(int nIDButton) const throw();

설명

Windows SDK에서 참조 IsDlgButtonChecked 하세요.

CWindow::IsIconic

창을 최소화할지 여부를 결정합니다.

BOOL IsIconic() const throw();

설명

Windows SDK에서 참조 IsIconic 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::IsIconic() to determine if the window is minimized

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bIconic = myWindow.IsIconic();

CWindow::IsParentDialog

컨트롤의 부모 창이 대화 상자 창인지 여부를 확인합니다.

BOOL IsParentDialog() throw();

Return Value

부모 창이 대화 상자이면 반환하고, FALSE 그렇지 않으면 반환 TRUE 합니다.

CWindow::IsWindow

지정된 창 핸들이 기존 창을 식별하는지 여부를 확인합니다.

BOOL IsWindow() throw();

설명

Windows SDK에서 참조 IsWindow 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::IsWindow() to verify if the HWND corresponds 
//to an existing window

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bWindow = myWindow.IsWindow();

CWindow::IsWindowEnabled

창이 입력에 사용할 수 있는지 여부를 결정합니다.

BOOL IsWindowEnabled() const throw();

설명

Windows SDK에서 참조 IsWindowEnabled 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::IsWindowEnabled() to verify if the window is enabled 
//for receiving input

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bEnabled = myWindow.IsWindowEnabled();

CWindow::IsWindowVisible

창의 표시 여부를 결정합니다.

BOOL IsWindowVisible() const throw();

설명

Windows SDK에서 참조 IsWindowVisible 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::IsWindowVisible() to determine the visibility state 
//of the window

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bVisible = myWindow.IsWindowVisible();

CWindow::IsWindowUnicode

지정된 창이 네이티브 유니코드 창인지 여부를 확인합니다.

BOOL IsWindowUnicode() throw();

설명

Windows SDK에서 참조 IsWindowUnicode 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::IsWindowUnicode() to determine if the window is a 
//UNICODE window or an ANSI one.

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bUnicode = myWindow.IsWindowUnicode();

CWindow::IsZoomed

창이 최대화되는지 여부를 결정합니다.

BOOL IsZoomed() const throw();

설명

Windows SDK에서 참조 IsZoomed 하세요.

CWindow::KillTimer

에서 만든 CWindow::SetTimer타이머 이벤트를 삭제합니다.

BOOL KillTimer(UINT nIDEvent) throw();

설명

Windows SDK에서 참조 KillTimer 하세요.

CWindow::LockWindowUpdate

Win32 함수를 호출하여 창에서 그리기를 LockWindowUpdate 사용하거나 사용하지 않도록 설정합니다.

BOOL LockWindowUpdate(BOOL bLock = TRUE) throw();

매개 변수

bLock
[in] 기본값인 경우 TRUE 창이 잠깁니다. 그렇지 않으면 잠금이 해제됩니다.

Return Value

TRUE창이 성공적으로 잠겨 있으면 FALSE

설명

TRUE경우 bLock 이 메서드는 m_hWnd Win32 함수로 전달되고, 그렇지 않으면 전달됩니다NULL.

CWindow::m_hWnd

개체와 연결된 창에 대한 핸들을 CWindow 포함합니다.

HWND m_hWnd throw() throw();

CWindow::MapWindowPoints

창의 좌표 공간에서 다른 창의 좌표 공간으로 점 집합을 변환합니다.

int MapWindowPoints(
    HWND hWndTo,
    LPPOINT lpPoint,
    UINT nCount) const throw();

int MapWindowPoints(
    HWND hWndTo,
    LPRECT lpRect) const throw();

설명

Windows SDK에서 참조 MapWindowPoints 하세요.

이 메서드의 두 번째 버전을 사용하면 구조체의 RECT 좌표를 변환할 수 있습니다.

CWindow::MessageBox

메시지 상자를 표시합니다.

int MessageBox(
    LPCTSTR lpszText,
    LPCTSTR lpszCaption = NULL,
    UINT nType = MB_OK) throw();

설명

Windows SDK에서 참조 MessageBox 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::MessageBox() to pop up a Windows message box

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.MessageBox(_T("Hello World"));

CWindow::ModifyStyle

개체의 창 스타일을 수정합니다 CWindow .

BOOL ModifyStyle(
    DWORD dwRemove,
    DWORD dwAdd,
    UINT nFlags = 0) throw();

매개 변수

dwRemove
[in] 스타일을 수정하는 동안 제거할 창 스타일을 지정합니다.

dwAdd
[in] 스타일을 수정하는 동안 추가할 창 스타일을 지정합니다.

nFlags
[in] 창 위치 지정 플래그입니다. 가능한 값 목록은 Windows SDK의 SetWindowPos 함수를 참조하세요.

Return Value

TRUE창 스타일이 수정되면 그렇지 않으면 . FALSE

설명

추가하거나 제거할 스타일은 비트 "or" (|) 연산자를 사용하여 결합할 수 있습니다. CreateWindow 사용 가능한 창 스타일에 대한 Windows SDKfor의 함수를 참조하세요.

0 ModifyStyle 이 아닌 경우 nFlags Win32 함수SetWindowPos를 호출하고 다음 네 개의 플래그와 결합하여 nFlags 창을 다시 그립니다.

  • SWP_NOSIZE 현재 크기를 유지합니다.

  • SWP_NOMOVE 현재 위치를 유지합니다.

  • SWP_NOZORDER 현재 Z 순서를 유지합니다.

  • SWP_NOACTIVATE 창을 활성화하지 않습니다.

창의 확장 스타일을 수정하려면 .를 호출 ModifyStyleEx합니다.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::ModifyStyle() to add and remove the window styles

CWindow myWindow;
myWindow.Attach(hWnd);

//The following line removes the WS_CLIPCHILDREN style from the 
//window and adds the WS_CAPTION style to the window
myWindow.ModifyStyle(WS_CLIPCHILDREN, WS_CAPTION);

CWindow::ModifyStyleEx

개체의 확장 창 스타일을 수정합니다 CWindow .

BOOL ModifyStyleEx(
    DWORD dwRemove,
    DWORD dwAdd,
    UINT nFlags = 0) throw();

매개 변수

dwRemove
[in] 스타일을 수정하는 동안 제거할 확장 스타일을 지정합니다.

dwAdd
[in] 스타일을 수정하는 동안 추가할 확장 스타일을 지정합니다.

nFlags
[in] 창 위치 지정 플래그입니다. 가능한 값 목록은 Windows SDK의 SetWindowPos 함수를 참조하세요.

Return Value

TRUE확장 창 스타일이 수정되면 이고, 그렇지 않으면 . FALSE

설명

추가하거나 제거할 스타일은 비트 "or" (|) 연산자를 사용하여 결합할 수 있습니다. CreateWindowEx 사용 가능한 확장 스타일에 대한 자세한 내용은 Windows SDK의 함수를 참조하세요.

0 ModifyStyleEx 이 아닌 경우 nFlags Win32 함수SetWindowPos를 호출하고 다음 네 개의 플래그와 결합하여 nFlags 창을 다시 그립니다.

  • SWP_NOSIZE 현재 크기를 유지합니다.

  • SWP_NOMOVE 현재 위치를 유지합니다.

  • SWP_NOZORDER 현재 Z 순서를 유지합니다.

  • SWP_NOACTIVATE 창을 활성화하지 않습니다.

일반 창 스타일을 사용하여 창을 수정하려면 .를 호출합니다 ModifyStyle.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::ModifyStyleEx() to add and remove the extended 
//window styles

CWindow myWindow;
myWindow.Attach(hWnd);

//The following line removes WS_EX_CONTEXTHELP extended style from 
//the window and adds WS_EX_TOOLWINDOW extended style to the window 

myWindow.ModifyStyleEx(WS_EX_CONTEXTHELP, WS_EX_TOOLWINDOW);

CWindow::MoveWindow

창의 크기와 위치를 변경합니다.

BOOL MoveWindow(
    int x,
    int y,
    int nWidth,
    int nHeight,
    BOOL bRepaint = TRUE) throw();

BOOL MoveWindow(
    LPCRECT lpRect,
    BOOL bRepaint = TRUE) throw();

설명

최상위 창 개체의 x 경우 및 y 매개 변수는 화면의 왼쪽 위 모서리를 기준으로 합니다. 자식 창 개체의 경우 부모 창 클라이언트 영역의 왼쪽 위 모서리를 기준으로 합니다.

이 메서드의 두 번째 버전은 구조를 사용하여 RECT 창의 새 위치, 너비 및 높이를 결정합니다.

CWindow::NextDlgCtrl

키보드 포커스를 대화 상자의 다음 컨트롤로 설정합니다.

void NextDlgCtrl() const throw();

설명

Windows SDK에서 참조 WM_NEXTDLGCTL 하세요.

CWindow::OpenClipboard

클립보드를 엽니다.

BOOL OpenClipboard() throw();

설명

Windows SDK에서 참조 OpenClipboard 하세요.

CWindow::operator HWND

개체를 CWindow .로 변환합니다 HWND.

operator HWND() const throw();

CWindow::operator =

멤버hWndHWND .로 CWindow 설정하여 개체에 m_hWnd 할당합니다.

CWindow& operator= (HWND hWnd) throw();

CWindow::PostMessage

창을 만든 스레드와 연결된 메시지 큐에 메시지를 배치합니다.

BOOL PostMessage(
    UINT message,
    WPARAM wParam = 0,
    LPARAM lParam = 0) throw();

설명

Windows SDK에서 참조 PostMessage 하세요.

스레드가 메시지를 처리할 때까지 기다리지 않고 반환합니다.

예시

//The following example attaches an HWND to the CWindow object and 
//posts a WM_PAINT message to the Window wrapped by the CWindow object 
//using CWindow::PostMessage() with the default values of WPARAM and 
//LPARAM

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.PostMessage(WM_PAINT);

CWindow::PrevDlgCtrl

키보드 포커스를 대화 상자의 이전 컨트롤로 설정합니다.

void PrevDlgCtrl() const throw();

설명

Windows SDK에서 참조 WM_NEXTDLGCTL 하세요.

CWindow::Print

창에 WM_PRINT 메시지를 보내 지정된 디바이스 컨텍스트에서 직접 그릴 것을 요청합니다.

void Print(HDC hDC, DWORD dwFlags) const throw();

매개 변수

hDC
[in] 디바이스 컨텍스트에 대한 핸들입니다.

dwFlags
[in] 그리기 옵션을 지정합니다. 다음 플래그 중 하나 이상을 결합할 수 있습니다.

  • PRF_CHECKVISIBLE 창이 표시되는 경우에만 창을 그립니다.

  • PRF_CHILDREN 표시되는 모든 자식 창을 그립니다.

  • PRF_CLIENT 창의 클라이언트 영역을 그립니다.

  • PRF_ERASEBKGND 창을 그리기 전에 배경을 지웁다.

  • PRF_NONCLIENT 창의 비 클라이언트 영역을 그립니다.

  • PRF_OWNED 소유된 모든 창을 그립니다.

CWindow::PrintClient

WM_PRINTCLIENT 지정된 디바이스 컨텍스트에서 클라이언트 영역을 그릴 것을 요청하는 메시지를 창에 보냅니다.

void PrintClient(HDC hDC, DWORD dwFlags) const throw();

매개 변수

hDC
[in] 디바이스 컨텍스트에 대한 핸들입니다.

dwFlags
[in] 그리기 옵션을 지정합니다. 다음 플래그 중 하나 이상을 결합할 수 있습니다.

  • PRF_CHECKVISIBLE 창이 표시되는 경우에만 창을 그립니다.

  • PRF_CHILDREN 표시되는 모든 자식 창을 그립니다.

  • PRF_CLIENT 창의 클라이언트 영역을 그립니다.

  • PRF_ERASEBKGND 창을 그리기 전에 배경을 지웁다.

  • PRF_NONCLIENT 창의 비 클라이언트 영역을 그립니다.

  • PRF_OWNED 소유된 모든 창을 그립니다.

CWindow::rcDefault

기본 창 차원을 포함합니다.

static RECT rcDefault;

CWindow::RedrawWindow

클라이언트 영역에서 지정된 사각형 또는 영역을 업데이트.

BOOL RedrawWindow(
    LPCRECT lpRectUpdate = NULL,
    HRGN hRgnUpdate = NULL,
    UINT flags = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);

throw()

설명

Windows SDK에서 참조 RedrawWindow 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::RedrawWindow() to update the entire window using the 
//default arguments

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bRedrawn = myWindow.RedrawWindow();

CWindow::ReleaseDC

디바이스 컨텍스트를 해제합니다.

int ReleaseDC(HDC hDC);

설명

Windows SDK에서 참조 ReleaseDC 하세요.

예시

// The following example attaches a HWND to the CWindow object,
// calls CWindow::GetDC to retrieve the DC of the client
// area of the window wrapped by CWindow Object, and calls
// CWindow::ReleaseDC to release the DC. 

CWindow myWindow;
myWindow.Attach(hWnd);   
HDC hDC = myWindow.GetDC();

// Use the DC

myWindow.ReleaseDC(hDC);
hDC = NULL;

CWindow::ResizeClient

창의 크기를 지정된 클라이언트 영역 크기로 조정합니다.

BOOL ResizeClient(
    int nWidth,
    int nHeight,
    BOOL bRedraw = FALSE) throw();

매개 변수

nWidth
창의 새 너비(픽셀)입니다.

nHeight
창의 새 높이(픽셀)입니다.

bRedraw
변경 내용을 다시 그릴지 여부를 나타내는 플래그입니다. 기본값은 FALSE창이 변경 내용을 다시 그리지 않음을 나타내는 것입니다.

CWindow::ScreenToClient

화면 좌표를 클라이언트 좌표로 변환합니다.

BOOL ScreenToClient(LPPOINT lpPoint) const throw();
BOOL ScreenToClient(LPRECT lpRect) const throw();

설명

Windows SDK에서 참조 ScreenToClient 하세요.

이 메서드의 두 번째 버전을 사용하면 구조체의 RECT 좌표를 변환할 수 있습니다.

CWindow::ScrollWindow

지정된 클라이언트 영역을 스크롤합니다.

BOOL ScrollWindow(
    int xAmount,
    int yAmount,
    LPCRECT lpRect = NULL,
    LPCRECT lpClipRect = NULL) throw();

설명

Windows SDK에서 참조 ScrollWindow 하세요.

CWindow::ScrollWindowEx

추가 기능을 사용하여 지정된 클라이언트 영역을 스크롤합니다.

int ScrollWindowEx(
    int dx,
    int dy,
    LPCRECT lpRectScroll,
    LPCRECT lpRectClip,
    HRGN hRgnUpdate,
    LPRECT lpRectUpdate,
    UINT flags) throw();

설명

Windows SDK에서 참조 ScrollWindowEx 하세요.

CWindow::SendDlgItemMessage

컨트롤에 메시지를 보냅니다.

LRESULT SendDlgItemMessage(
    int nID,
    UINT message,
    WPARAM wParam = 0,
    LPARAM lParam = 0) throw();

설명

Windows SDK에서 참조 SendDlgItemMessage 하세요.

CWindow::SendMessage

창에 메시지를 보내고 창 프로시저가 메시지를 처리할 때까지 반환되지 않습니다.

LRESULT SendMessage(
    UINT message,
    WPARAM wParam = 0,
    LPARAM lParam = 0) throw();

static LRESULT SendMessage(
    HWND hWnd,
    UINT message,
    WPARAM wParam,
    LPARAM lParam) throw();

설명

Windows SDK에서 참조 SendMessage 하세요.

예시

// The following example attaches a HWND to the CWindow
// object and sends a WM_PAINT message to the window
// wrapped by CWindow object using CWindow::SendMessage.

CWindow myWindow;
myWindow.Attach(hWnd);   
myWindow.SendMessage(WM_PAINT, 0L, 0L);

CWindow::SendMessageToDescendants

개체의 모든 직할 자식 CWindow 에 지정된 메시지를 보냅니다.

void SendMessageToDescendants(
    UINT message,
    WPARAM wParam = 0,
    LPARAM lParam = 0,
    BOOL bDeep = TRUE) throw();

매개 변수

message
[in] 보낼 메시지입니다.

wParam
[in] 추가 메시지 관련 정보입니다.

lParam
[in] 추가 메시지 관련 정보입니다.

bDeep
[in] 기본값인 경우 TRUE 메시지는 모든 하위 창으로 전송되고, 그렇지 않으면 직계 자식 창으로만 전송됩니다.

설명

TRUE경우 bDeep 메시지가 다른 모든 하위 창으로 추가로 전송됩니다.

CWindow::SendNotifyMessage

창에 메시지를 보냅니다.

BOOL SendNotifyMessage(
    UINT message,
    WPARAM wParam = 0,
    LPARAM lParam = 0) throw();

설명

Windows SDK에서 참조 SendNotifyMessage 하세요.

호출 스레드 SendNotifyMessage 에서 창을 만든 경우 창 프로시저가 메시지를 처리할 때까지 반환되지 않습니다. 그렇지 않으면 즉시 반환됩니다.

CWindow::SetActiveWindow

창을 활성화합니다.

HWND SetActiveWindow() throw();

설명

Windows SDK에서 참조 SetActiveWindow 하세요.

예시

// The following example attaches a HWND to the CWindow object
// and sets the window as an active window by calling 
// CWindow::SetActiveWindow which returns the HWND of the
// previously active window.

CWindow myWindow;
myWindow.Attach(hWnd);   
HWND hWndPrev = myWindow.SetActiveWindow();

CWindow::SetCapture

모든 후속 마우스 입력을 창으로 보냅니다.

HWND SetCapture() throw();

설명

Windows SDK에서 참조 SetCapture 하세요.

CWindow::SetClipboardViewer

클립보드 뷰어 체인에 창을 추가합니다.

HWND SetClipboardViewer() throw();

설명

Windows SDK에서 참조 SetClipboardViewer 하세요.

CWindow::SetDlgCtrlID

창의 식별자를 지정된 값으로 설정합니다.

int SetDlgCtrlID(int nID) throw();

매개 변수

nID
[in] 창의 식별자에 대해 설정할 새 값입니다.

Return Value

성공하면 창의 이전 식별자입니다. 그렇지 않으면 0입니다.

CWindow::SetDlgItemInt

컨트롤의 텍스트를 정수 값의 문자열 표현으로 변경합니다.

BOOL SetDlgItemInt(
    int nID,
    UINT nValue,
    BOOL bSigned = TRUE) throw();

설명

Windows SDK에서 참조 SetDlgItemInt 하세요.

CWindow::SetDlgItemText

컨트롤의 텍스트를 변경합니다.

BOOL SetDlgItemText(int nID, LPCTSTR lpszString) throw();

설명

Windows SDK에서 참조 SetDlgItemText 하세요.

CWindow::SetFocus

입력 포커스를 창으로 설정합니다.

HWND SetFocus() throw();

설명

Windows SDK에서 참조 SetFocus 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::SetFocus() to set the input focus

CWindow myWindow;
myWindow.Attach(hWnd);
HWND hWndLeftFocus = myWindow.SetFocus();

CWindow::SetFont

창에 메시지를 보내 창의 현재 글꼴을 WM_SETFONT 변경합니다.

void SetFont(HFONT hFont, BOOL bRedraw = TRUE) throw();

매개 변수

hFont
[in] 새 글꼴에 대한 핸들입니다.

bRedraw
[in] 기본값인 경우 TRUE 창이 다시 그려집니다. 그렇지 않으면 그렇지 않습니다.

CWindow::SetHotKey

메시지를 보내 핫 키를 창에 연결합니다 WM_SETHOTKEY .

int SetHotKey(WORD wVirtualKeyCode, WORD wModifiers) throw();

매개 변수

wVirtualKeyCode
[in] 핫 키의 가상 키 코드입니다. 표준 가상 키 코드 목록은 다음을 참조하세요 Winuser.h.

wModifiers
[in] 핫 키의 한정자입니다. 가능한 값 목록은 Windows SDK를 참조 WM_SETHOTKEY 하세요.

Return Value

가능한 반환 값 목록은 Windows SDK를 참조 WM_SETHOTKEY 하세요.

CWindow::SetIcon

창의 크거나 작은 아이콘을 으로 식별되는 아이콘으로 hIcon설정합니다.

HICON SetIcon(HICON hIcon, BOOL bBigIcon = TRUE) throw();

매개 변수

hIcon
[in] 새 아이콘에 대한 핸들입니다.

bBigIcon
[in] 기본값인 경우 TRUE 메서드는 큰 아이콘을 설정합니다. 그렇지 않으면 작은 아이콘을 설정합니다.

Return Value

이전 아이콘의 핸들입니다.

설명

SetIcon 는 창에 WM_SETICON 메시지를 보냅니다.

CWindow::SetMenu

창의 현재 메뉴를 변경합니다.

BOOL SetMenu(HMENU hMenu) throw();

설명

Windows SDK에서 참조 SetMenu 하세요.

CWindow::SetParent

부모 창을 변경합니다.

HWND SetParent(HWND hWndNewParent) throw();

설명

Windows SDK에서 참조 SetParent 하세요.

예시

// The following example attaches a HWND to the CWindow object
// and sets the hWndParent as the parent window of the 
// window wrapped by CWindow object using CWindow::SetParent.

CWindow myWindow;
myWindow.Attach(hWndChild);
HWND hWndPrevParent = myWindow.SetParent(hWndParent);

CWindow::SetRedraw

창에 메시지를 보내 다시 그리기 플래그를 WM_SETREDRAW 설정하거나 지웁니다.

void SetRedraw(BOOL bRedraw = TRUE) throw();

매개 변수

bRedraw
[in] 다시 그리기 플래그의 상태를 지정합니다. TRUE (기본값) 다시 그리기 플래그가 설정FALSE되면 플래그가 지워집니다.

설명

변경 내용을 다시 그릴 수 있도록 하거나 변경 내용을 다시 그릴 수 없도록 하려면 호출 SetRedraw 합니다.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::SetRedraw() to set and reset the redraw flag

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.SetRedraw();      //sets the redraw flag to TRUE
//
//
myWindow.SetRedraw(FALSE); //sets the redraw flag to FALSE

CWindow::SetScrollInfo

스크롤 막대의 매개 변수를 설정합니다.

int SetScrollInfo(
    int nBar,
    LPSCROLLINFO lpScrollInfo,
    BOOL bRedraw = TRUE) throw();

설명

Windows SDK에서 참조 SetScrollInfo 하세요.

CWindow::SetScrollPos

스크롤 상자의 위치를 변경합니다.

int SetScrollPos(
    int nBar,
    int nPos,
    BOOL bRedraw = TRUE) throw();

설명

Windows SDK에서 참조 SetScrollPos 하세요.

CWindow::SetScrollRange

스크롤 막대 범위를 변경합니다.

BOOL SetScrollRange(
    int nBar,
    int nMinPos,
    int nMaxPos,
    BOOL bRedraw = TRUE) throw();

설명

Windows SDK에서 참조 SetScrollRange 하세요.

CWindow::SetTimer

타이머 이벤트를 만듭니다.

UINT SetTimer(
    UINT nIDEvent,
    UINT nElapse,
    void (CALLBACK* lpfnTimer)(HWND, UINT, UINT, DWORD) = NULL) throw();

설명

Windows SDK에서 참조 SetTimer 하세요.

CWindow::SetWindowContextHelpId

창의 도움말 컨텍스트 식별자를 설정합니다.

BOOL SetWindowContextHelpId(DWORD dwContextHelpId) throw();

설명

Windows SDK에서 참조 SetWindowContextHelpId 하세요.

CWindow::SetWindowLong

지정된 오프셋의 32비트 값을 추가 창 메모리로 설정합니다.

LONG SetWindowLong(int nIndex, LONG dwNewLong) throw();

설명

Windows SDK에서 참조 SetWindowLong 하세요.

참고 항목

32비트 및 64비트 버전의 Windows CWindow::SetWindowLongPtr와 호환되는 코드를 작성하려면 .

CWindow::SetWindowLongPtr

지정된 창의 특성을 변경하고 추가 창 메모리의 지정된 오프셋에 값을 설정합니다.

LONG_PTR SetWindowLongPtr(int nIndex, LONG_PTR dwNewLong) throw();

설명

Windows SDK에서 참조 SetWindowLongPtr 하세요.

이 함수는 메서드를 대체합니다 CWindow::SetWindowLong . 32비트 및 64비트 버전의 Windows CWindow::SetWindowLongPtr와 호환되는 코드를 작성하려면 .

CWindow::SetWindowPlacement

표시 상태 및 위치를 설정합니다.

BOOL SetWindowPlacement(const WINDOWPLACEMENT FAR* lpwndpl);

설명

Windows SDK에서 참조 SetWindowPlacement 하세요.

CWindow::SetWindowPos

크기, 위치 및 Z 순서를 설정합니다.

BOOL SetWindowPos(
    HWND hWndInsertAfter,
    int x,
    int y,
    int cx,
    int cy,
    UINT nFlags) throw();

BOOL SetWindowPos(
    HWND hWndInsertAfter,
    LPCRECT lpRect,
    UINT nFlags) throw();

설명

Windows SDK에서 참조 SetWindowPos 하세요.

이 메서드의 두 번째 버전은 구조를 사용하여 RECT 창의 새 위치, 너비 및 높이를 설정합니다.

CWindow::SetWindowRgn

창의 창 영역을 설정합니다.

int SetWindowRgn(HRGN hRgn, BOOL bRedraw = FALSE) throw();

설명

Windows SDK에서 참조 SetWindowRgn 하세요.

CWindow::SetWindowText

창의 텍스트를 변경합니다.

BOOL SetWindowText(LPCTSTR lpszString) throw();

설명

Windows SDK에서 참조 SetWindowText 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::SetWindowText() to set the new title-text of the 
//window

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.SetWindowText(_T("Hello ATL"));

CWindow::SetWindowWord

지정된 오프셋의 16비트 값을 추가 창 메모리로 설정합니다.

WORD SetWindowWord(int nIndex, WORD wNewWord) throw();

설명

Windows SDK에서 참조 SetWindowLong 하세요.

CWindow::ShowCaret

시스템 캐리트를 표시합니다.

BOOL ShowCaret() throw();

설명

Windows SDK에서 참조 ShowCaret 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::ShowCaret() to show the caret

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.ShowCaret();

CWindow::ShowOwnedPopups

창이 소유한 팝업 창을 표시하거나 숨깁니다.

BOOL ShowOwnedPopups(BOOL bShow = TRUE) throw();

설명

Windows SDK에서 참조 ShowOwnedPopups 하세요.

CWindow::ShowScrollBar

스크롤 막대를 표시하거나 숨깁니다.

BOOL ShowScrollBar(UINT nBar, BOOL bShow = TRUE) throw();

설명

Windows SDK에서 참조 ShowScrollBar 하세요.

CWindow::ShowWindow

창의 표시 상태를 설정합니다.

BOOL ShowWindow(int nCmdShow) throw();

설명

Windows SDK에서 참조 ShowWindow 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::ShowWindow() to show the window in its maximized state

CWindow myWindow;
myWindow.Attach(hWnd);
myWindow.ShowWindow(SW_SHOWMAXIMIZED);

CWindow::ShowWindowAsync

다른 스레드에서 만든 창의 표시 상태를 설정합니다.

BOOL ShowWindowAsync(int nCmdShow) throw();

설명

Windows SDK에서 참조 ShowWindowAsync 하세요.

CWindow::UpdateWindow

클라이언트 영역을 업데이트합니다.

BOOL UpdateWindow() throw();

설명

Windows SDK에서 참조 UpdateWindow 하세요.

예시

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::UpdateWindow() to update the window

CWindow myWindow;
myWindow.Attach(hWnd);
BOOL bUpdated = myWindow.UpdateWindow();

CWindow::ValidateRect

지정된 사각형 내의 클라이언트 영역의 유효성을 검사합니다.

BOOL ValidateRect(LPCRECT lpRect) throw();

설명

Windows SDK에서 참조 ValidateRect 하세요.

CWindow::ValidateRgn

지정된 지역 내의 클라이언트 영역의 유효성을 검사합니다.

BOOL ValidateRgn(HRGN hRgn) throw();

설명

Windows SDK에서 참조 ValidateRgn 하세요.

CWindow::WinHelp

Windows 도움말을 시작합니다.

BOOL WinHelp(
    LPCTSTR lpszHelp,
    UINT nCmd = HELP_CONTEXT,
    DWORD dwData = 0) throw();

설명

Windows SDK에서 참조 WinHelp 하세요.

참고 항목

클래스 개요