13 #pragma managed( push, off )   114             HDC         hDc = ::BeginPaint( 
m_hWnd, &sPaint );
   120                 if ( 0 == ::IsRectEmpty( &sPaintRect ) ) {
   128                         HDC hDc2 = ::CreateCompatibleDC( hDc );
   131                         int nLeft   = sPaintRect.left;
   132                         int nTop    = sPaintRect.top;
   133                         int nWidth  = ( sPaintRect.right  - nLeft );
   134                         int nHeight = ( sPaintRect.bottom - nTop );
   137                         sPaintRect.right  = nWidth;
   138                         sPaintRect.bottom = nHeight;
   141                         HBITMAP hBitMap = ::CreateCompatibleBitmap( hDc, nWidth, nHeight );
   144                         ::SelectObject( hDc2, hBitMap );
   150                         ::BitBlt( hDc, nLeft, nTop, nWidth, nHeight, hDc2, 0, 0, SRCCOPY );
   153                         ::DeleteObject( hBitMap );
   162             ::EndPaint( 
m_hWnd, &sPaint );
   183             if ( 
nullptr != hParent ) {
   204             if ( 
nullptr != hParent ) {
   236             SHORT     nState = ::GetKeyState( VK_SHIFT );
   237             if ( 0x8000 == ( 0x8000 & nState ) ) {
   240                 if ( 
nullptr == pcPane ) {
   256             UINT uId  = ::TrackPopupMenu( 
s_hContextMenu, ( TPM_NONOTIFY | TPM_RETURNCMD ), xPos, yPos, 0, pcPane->
GetHandle(), nullptr );
   263                 WORD wId = LOWORD( uId );
   267                     if ( 
nullptr != pcPane ) {
   274                     ::SendMessageW( pcPane->
GetHandle(), WM_COMMAND, uId, 
static_cast< LPARAM 
>( uData ) );
   300                 HWND      hCtrl = 
nullptr;
   304                     hCtrl = 
reinterpret_cast< HWND 
>( uData );
   305                     if ( 
nullptr != hCtrl ) {
   308                         if ( 
nullptr != pcPane ) {
   344             if ( 
nullptr != hParent ) {
   365             if ( 
nullptr != hParent ) {
   383             if ( 
nullptr != hParent ) {
   403                 ::SetWindowTextW( 
m_hWnd, cString );
   424             wchar_t szBuffer[ MAX_PATH ];
   425             ::GetWindowTextW( 
m_hWnd, szBuffer, MAX_PATH );
   457             if ( 
nullptr == pcParent ) {
   480                 if ( 
nullptr == pcParent ) {
   516             if ( 
nullptr == pcPane ) {
   519                 if ( 
nullptr == pcTopLevel ) {
   530             else if ( 
nullptr == pnOrder ) {
   535             else if ( 
this == pcPane ) {
   556             if ( 
nullptr == pnOrder ) {
   561             else if ( 0 == *pnOrder ) {
   687             if ( 
nullptr == pcChild ) {
   692             else if ( !pcChild->SetShow( bShow ) ) {
   700                 ::ShowWindow( pcChild->GetHandle(), SW_SHOWNA );
   704                 ::ShowWindow( pcChild->GetHandle(), SW_HIDE );
   708             ::SendMessageW( 
m_hWnd, WM_SIZE, 0, 0 );
   714                 ::SetFocus( 
nullptr );
   742             ::InvalidateRect( 
m_hWnd, &sPaintRect, 
false );
   783             if ( 0 == ::GetClientRect( 
m_hWnd, &sClientRect ) ) {
   789             rsRect = sClientRect;
   809             HBRUSH hBrush = ::CreateSolidBrush( dwBkColor );
   812             ::FillRect( hDc, &rsRect, hBrush );
   815             ::DeleteObject( hBrush );
   818             HFONT hFont = 
static_cast< HFONT 
>( ::GetStockObject( DEFAULT_GUI_FONT ) );
   819             ::SelectObject( hDc, hFont );
   827                 if ( 
m_hWnd == ::GetFocus() ) {
   838             ::SetTextColor( hDc, dwTextColor );
   841             wchar_t szBuffer[ MAX_PATH ];
   842             ::GetWindowTextW( 
m_hWnd, szBuffer, MAX_PATH );
   845             ::SetBkMode( hDc, TRANSPARENT );
   846             ::DrawTextW( hDc, szBuffer, -1, &rsRect, ( DT_CENTER | DT_VCENTER | DT_SINGLELINE ) );
   855                 ::GetWindowRect( 
m_hWnd, &sWindowRect );
   856                 int nLeft   = sWindowRect.left;
   857                 int nTop    = sWindowRect.top;
   858                 int nWidth  = ( sWindowRect.right  - nLeft );
   859                 int nHeight = ( sWindowRect.bottom - nTop );
   860                 cString.
Format( L
"%d x %d", nWidth, nHeight );
   866                     nWidth  = pcPane->GetMinWidth();
   867                     nHeight = pcPane->GetMinHeight();
   871                     LONG_PTR dwStyle = ::GetWindowLongPtrW( pcPane->GetHandle(), GWL_STYLE );
   872                     if ( WS_CHILD != ( WS_CHILD & dwStyle ) ) {
   878                     pcPane = 
GetPaneWindow( ::GetParent( pcPane->GetHandle() ) );
   879                     if ( 
nullptr == pcPane ) {
   890                 nWidth  = ( rsRect.right  - nLeft );
   891                 nHeight = ( rsRect.bottom - nTop );
   892                 cString += 
CString().
Format( L
"\r\n%d x %d", nWidth, nHeight );
   904                 cString += 
CString().
Format( L
"\r\n非表示状態子ウィンドウ数:%d", nHide );
   908                 cString += 
CString().
Format( L
"\r\n非表示可能子ウィンドウ数:%d", nHideable );
   912                 cString += 
CString().
Format( L
"\r\n削除可能子ウィンドウ数:%d", nDeletable );
   918                 ::SetTextColor( hDc, dwTextColor );
   921                 wchar_t const* pszBuffer = cString.
GetBuffer();
   922                 ::DrawTextW( hDc, pszBuffer, -1, &rsRect, ( DT_LEFT | DT_TOP ) );
   926             ::DeleteObject( hFont );
   947             if ( 
nullptr != pcParent ) {
   993         HMENU result = 
nullptr;
   996             HMENU hMenu = ::CreatePopupMenu();
   997             if ( 
nullptr == hMenu ) {
  1003             wchar_t szBuffer[ MAX_PATH ];
  1004             ::GetWindowTextW( 
m_hWnd, szBuffer, MAX_PATH );
  1007             ::AppendMenuW( hMenu, MF_STRING, 0, szBuffer );
  1008             ::EnableMenuItem( hMenu, ( ::GetMenuItemCount( hMenu ) - 1 ), ( MF_BYPOSITION | MFS_GRAYED ) );
  1015             if ( 
nullptr != pcParent ) {
  1017                 if ( 0 < ::GetMenuItemCount( hMenu ) ) {
  1019                     ::AppendMenuW( hMenu, MF_SEPARATOR, 0, 
nullptr );
  1023                 ::AppendMenuW   ( hMenu, MF_STRING, 0, L
"親ウィンドウリスト" );
  1024                 ::EnableMenuItem( hMenu, ( ::GetMenuItemCount( hMenu ) - 1 ), ( MF_BYPOSITION | MFS_DISABLED ) );
  1025                 ::AppendMenuW   ( hMenu, MF_SEPARATOR, 0, 
nullptr );
  1028                 for ( 
int nIndex = 0; ( 
nullptr != pcParent ) && ( 256 > nIndex ); ++nIndex ) {
  1030                     wchar_t szBuffer[ MAX_PATH ];
  1031                     ::GetWindowTextW( pcParent->
GetHandle(), szBuffer, MAX_PATH );
  1037                     ::AppendMenuW     ( hMenu, MF_STRING, uId, szBuffer );
  1057         bool result = 
false;
  1077         bool result = 
false;
  1080             if ( 
nullptr == hMenu ) {
  1093             WORD wCode = 
static_cast< WORD 
>( nOrder );
  1098             bool bDelete = 
false;
  1099             if ( 
nullptr != pcParent ) {
  1108             if ( 0 < ::GetMenuItemCount( hMenu ) ) {
  1110                 ::AppendMenuW( hMenu, MF_SEPARATOR, 0, 
nullptr );
  1114             ::AppendMenuW     ( hMenu, MF_STRING, MAKELONG( 
ID_DEBUG_SHOW,   wCode ), L
"表示" );
  1115             ::AppendMenuW     ( hMenu, MF_STRING, MAKELONG( 
ID_DEBUG_HIDE,   wCode ), L
"非表示" );
  1116             ::AppendMenuW     ( hMenu, MF_STRING, MAKELONG( 
ID_DEBUG_DELETE, wCode ), L
"削除" );
  1149 #pragma managed( pop ) virtual HWND & GetHandle() noexcept
ウィンドウハンドル取得関数 
LIB_WINDOW_API bool GetMenuCommandData(HMENU hMenu, UINT uId, ULONG_PTR &ruData) noexcept
メニューコマンドデータ取得関数 
constexpr WORD const ID_DEBUG_PARENT_MENU
デバッグ::親ウィンドウメニューコマンド先頭 
virtual bool Create(HWND hParent=nullptr, HMENU hMenu=nullptr) noexcept override
ウィンドウ作成関数 
CWndPane() noexcept
コンストラクタ 
virtual bool Create(HWND hParent=nullptr, HMENU hMenu=nullptr) noexcept
ウィンドウ作成関数 
virtual wchar_t const * GetSectionName() const  noexcept
セクション名取得関数 
virtual COLORREF GetFocusTextColor() const  noexcept
フォーカス所有文字色取得関数 
virtual LRESULT WmCommand() noexcept
static wchar_t const *const KEY_SHOW
ウィンドウ表示フラグキー文字列 
virtual bool UpdateClientRectAll() noexcept
全ウィンドウクライアント領域更新関数 
virtual LRESULT WmNotifyChildLButtonUp() noexcept
virtual int GetHideChildCount() noexcept
非表示状態子ペインウィンドウ数取得関数 
virtual LRESULT WmLButtonDown() noexcept override
LIB_WINDOW_API bool CheckMenuCommand(HMENU hMenu, UINT uId, bool bCheck) noexcept
メニューコマンドチェック状態設定関数 
virtual bool DrawPaintRect(HDC hDc, RECT &rsRect) noexcept
クライアント領域描画関数 
virtual CWndPane * GetTopLevelPane() noexcept
最上位ペインウィンドウ取得関数 
virtual COLORREF GetBackColor() const  noexcept
クライアント描画領域背景色取得関数 
virtual LRESULT WmApp() noexcept override
各種メッセージ処理関数 
virtual bool ResumeConfig(CJsonConfig &rcConfig) noexcept
ウィンドウ構成情報復元関数 
virtual bool ExecMenuCommand(WORD wId, WORD wCode, HWND hCtrl) noexcept
メニューコマンド実行関数 
virtual int GetShowChildCount() noexcept
表示状態子ペインウィンドウ数取得関数 
virtual bool AppendShowDeleteMenu(HMENU hMenu) noexcept
表示削除メニュー追加関数 
static HMENU s_hContextMenu
コンテキストメニューハンドル 
constexpr WORD const ID_DEBUG_DELETE
デバッグ::削除 
constexpr WORD const ID_DEBUG_SHOW
デバッグ::表示 
static bool s_bShowDebugInfo
デバッグ情報表示フラグ 
constexpr UINT const WM_NOTIFY_CHILD_LBUTTONDOWN
子ウィンドウ左ボタンダウン通知 
static HWND s_hFocus
フォーカスウィンドウ保存ハンドル 
virtual LRESULT WmNotifyChildSetFocus() noexcept
ユーザ定義メッセージ処理関数 
static bool s_bResizePartitionRealTime
リアルタイムパーティションサイズ変更フラグ 
virtual bool GetPaintRect(RECT &rsRect) noexcept
クライアント描画領域取得関数 
virtual LRESULT WmContextMenu() noexcept override
constexpr UINT const WM_NOTIFY_CHILD_SET_FOCUS
子ウィンドウフォーカス取得通知 
virtual LRESULT WmPaint() noexcept override
virtual wchar_t const * Format(wchar_t const *pszFormat,...) noexcept
書式設定文字列代入関数 
virtual bool SaveConfig(CJsonConfig &rcConfig) noexcept
ウィンドウ構成情報保存関数 
virtual COLORREF GetFocusWindowTextColor() const  noexcept
フォーカスウィンドウ文字色取得関数 
LIB_WINDOW_API HWND GetParentOrOwner(HWND hWnd) noexcept
親またはオーナーウィンドウ取得関数 
int m_nDeletable
削除可能子ウィンドウ数 
virtual LRESULT WmKillFocus() noexcept override
constexpr WORD const ID_DEBUG_HIDE
デバッグ::非表示 
static wchar_t const *const KEY_WINDOW_TITLE
ウィンドウタイトルキー文字列 
virtual int GetDeletableChildCount() noexcept
削除可能子ペインウィンドウ数取得関数 
virtual LRESULT WmSetFocus() noexcept override
static wchar_t const *const KEY_FOCUS_ORDER
フォーカスウィンドウオーダー番号キー文字列 
virtual bool UpdateClientRect() noexcept
クライアント領域更新関数 
virtual LRESULT WmNotifyChildCommand() noexcept
virtual bool ShowChildWindow(CWndPane *pcChild, bool bShow) noexcept
子ウィンドウ表示状態設定関数 
virtual bool AppendDebugMenu(HMENU hMenu) noexcept
デバッグメニュー追加関数 
virtual LRESULT WmNotifyChildKillFocus() noexcept
LIB_WINDOW_API bool EnableMenuCommand(HMENU hMenu, UINT uId, bool bEnable) noexcept
メニューコマンド有効状態設定関数 
virtual COLORREF GetTextColor() const  noexcept
クライアント描画領域文字色取得関数 
static bool s_bDrawDoubleBuffer
ダブルバッファリング描画フラグ 
virtual int GetChildCount() noexcept
子ペインウィンドウ数取得関数 
virtual HMENU CreateContextMenu() noexcept
コンテキストメニュー作成関数 
virtual int GetHideableChildCount() noexcept
非表示可能子ペインウィンドウ数取得関数 
LIB_WINDOW_API bool SetMenuCommandData(HMENU hMenu, UINT uId, ULONG_PTR uData) noexcept
メニューコマンドデータ設定関数 
virtual bool CanHideChildWindow(CWndPane *pcChild) noexcept
子ウィンドウ非表示可能状態取得関数 
constexpr WORD const ID_DEBUG_PARENT_MENU_END
デバッグ::親ウィンドウメニューコマンド最後尾 
virtual bool CanDeleteChildWindow(CWndPane *pcChild) noexcept
子ウィンドウ削除可能状態取得関数 
int m_nHideable
非表示可能子ウィンドウ数 
constexpr UINT const WM_NOTIFY_CHILD_KILL_FOCUS
子ウィンドウフォーカス喪失通知 
virtual CWndPane * GetPaneWindow(HWND hWnd) const  noexcept
表示フラグ取得関数 
constexpr UINT const WM_NOTIFY_CHILD_LBUTTONUP
子ウィンドウ左ボタンアップ通知 
virtual LRESULT WmNotifyChildLButtonDown() noexcept
virtual bool GetChildPaneInfo(SChildPaneInfo &rsChildInfo) noexcept
子ペインウィンドウ情報取得関数 
virtual LRESULT WmCommand() noexcept override
virtual CWndPane * GetParentPane() noexcept
親ペインウィンドウ取得関数 
virtual CWndPane * GetOrderPane(int *pnOrder) noexcept
オーダー番号ペインウィンドウ取得関数 
virtual wchar_t const * GetBuffer() const  noexcept
文字列バッファ取得関数 
constexpr UINT const WM_NOTIFY_CHILD_COMMAND
子ウィンドウコマンド実行通知 
LIB_WINDOW_API bool IsOwnOrChild(HWND hWnd, HWND hChild) noexcept
自分または子ウィンドウ判定関数 
virtual bool DeleteChildWindow(CWndPane *pcChild) noexcept
子ウィンドウ削除関数 
virtual int GetOrderIndex(CWndPane *pcPane=nullptr, int *pnOrder=nullptr) noexcept
ペインウィンドウオーダー番号取得関数