More wxWindow work

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-11-16 05:52:04 +00:00
parent 568e7b4ac8
commit bbdc9a8780

View File

@@ -309,41 +309,80 @@ bool wxWindow::Create(
void wxWindow::SetFocus()
{
// TODO:
HWND hWnd = GetHwnd();
if (hWnd)
::WinSetFocus(HWND_DESKTOP, hWnd);
}
wxWindow* wxWindowBase::FindFocus()
{
wxWindow* window = NULL;
// TODO:
return(window);
HWND hWnd = ::WinQueryFocus(HWND_DESKTOP);
if (hWnd)
{
return wxFindWinFromHandle((WXHWND)hWnd);
}
return NULL;
}
bool wxWindow::Enable(bool enable) // check if base implementation is OK
bool wxWindow::Enable(
bool bEnable
)
{
// TODO:
if (!wxWindowBase::Enable(bEnable))
return(FALSE);
HWND hWnd = GetHwnd();
if ( hWnd )
::WinEnableWindow(hWnd, (BOOL)bEnable);
wxWindowList::Node* pNode = GetChildren().GetFirst();
while (pNode)
{
wxWindow* pChild = pNode->GetData();
pChild->Enable(bEnable);
pNode = pNode->GetNext();
}
return(TRUE);
}
bool wxWindow::Show(bool show) // check if base implementation is OK
bool wxWindow::Show(
bool bShow
)
{
// TODO:
if (!wxWindowBase::Show(bShow))
return(FALSE);
HWND hWnd = GetHwnd();
::WinShowWindow(hWnd, bShow);
if (bShow)
{
::WinSetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0, SWP_ACTIVATE);
}
return(TRUE);
}
void wxWindow::Raise()
{
// TODO:
::WinSetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_ACTIVATE);
}
void wxWindow::Lower()
{
// TODO:
::WinSetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_DEACTIVATE);
}
void wxWindow::SetTitle( const wxString& title)
void wxWindow::SetTitle(
const wxString& rTitle
)
{
// TODO: SetWindowText(GetHwnd(), title.c_str());
::WinSetWindowText(GetHwnd(), title.c_str());
}
wxString wxWindow::GetTitle() const