1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_svx.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #ifdef _TOOLS_DEBUG_HXX 32*cdf0e10cSrcweir #include <tools/debug.hxx> 33*cdf0e10cSrcweir #endif 34*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 35*cdf0e10cSrcweir #include <vcl/toolbox.hxx> 36*cdf0e10cSrcweir #include <vcl/event.hxx> 37*cdf0e10cSrcweir #include <sfx2/app.hxx> 38*cdf0e10cSrcweir #include <sfx2/tbxctrl.hxx> 39*cdf0e10cSrcweir #include <sfx2/bindings.hxx> 40*cdf0e10cSrcweir #include <sfx2/dispatch.hxx> 41*cdf0e10cSrcweir #include <sfx2/viewsh.hxx> 42*cdf0e10cSrcweir #include <tools/gen.hxx> 43*cdf0e10cSrcweir #include <svl/intitem.hxx> 44*cdf0e10cSrcweir #include <svl/eitem.hxx> 45*cdf0e10cSrcweir #include <svtools/stdctrl.hxx> 46*cdf0e10cSrcweir #include <svl/slstitm.hxx> 47*cdf0e10cSrcweir #include <svl/stritem.hxx> 48*cdf0e10cSrcweir #include <svx/dialmgr.hxx> 49*cdf0e10cSrcweir #include <svx/lboxctrl.hxx> 50*cdf0e10cSrcweir #ifndef _VCL_MNEMONIC_HXX_ 51*cdf0e10cSrcweir #include <vcl/mnemonic.hxx> 52*cdf0e10cSrcweir #endif 53*cdf0e10cSrcweir #include <tools/urlobj.hxx> 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir #include <svx/svxids.hrc> 56*cdf0e10cSrcweir #include <svx/dialogs.hrc> 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir #include "lboxctrl.hrc" 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 62*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 63*cdf0e10cSrcweir using namespace ::com::sun::star::frame; 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir class SvxPopupWindowListBox; 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir ///////////////////////////////////////////////////////////////// 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir class SvxPopupWindowListBox : public SfxPopupWindow 70*cdf0e10cSrcweir { 71*cdf0e10cSrcweir using FloatingWindow::StateChanged; 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir FixedInfo aInfo; 74*cdf0e10cSrcweir ListBox * pListBox; 75*cdf0e10cSrcweir ToolBox & rToolBox; 76*cdf0e10cSrcweir sal_Bool bUserSel; 77*cdf0e10cSrcweir sal_uInt16 nTbxId; 78*cdf0e10cSrcweir rtl::OUString maCommandURL; 79*cdf0e10cSrcweir // disallow copy-constructor and assignment-operator 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir SvxPopupWindowListBox(const int& ); 82*cdf0e10cSrcweir SvxPopupWindowListBox & operator = (const int& ); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir // SvxPopupWindowListBox( sal_uInt16 nSlotId, ToolBox& rTbx, sal_uInt16 nTbxItemId ); 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir public: 87*cdf0e10cSrcweir SvxPopupWindowListBox( sal_uInt16 nSlotId, const rtl::OUString& rCommandURL, sal_uInt16 nTbxId, ToolBox& rTbx ); 88*cdf0e10cSrcweir virtual ~SvxPopupWindowListBox(); 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir // SfxPopupWindow 91*cdf0e10cSrcweir virtual SfxPopupWindow * Clone() const; 92*cdf0e10cSrcweir virtual void PopupModeEnd(); 93*cdf0e10cSrcweir virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 94*cdf0e10cSrcweir const SfxPoolItem* pState ); 95*cdf0e10cSrcweir 96*cdf0e10cSrcweir void StartSelection(); 97*cdf0e10cSrcweir inline ListBox & GetListBox() { return *pListBox; } 98*cdf0e10cSrcweir inline FixedInfo & GetInfo() { return aInfo; } 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir sal_Bool IsUserSelected() const { return bUserSel; } 101*cdf0e10cSrcweir void SetUserSelected( sal_Bool bVal ) { bUserSel = bVal; } 102*cdf0e10cSrcweir /*virtual*/Window* GetPreferredKeyInputWindow(); 103*cdf0e10cSrcweir }; 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir ///////////////////////////////////////////////////////////////// 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir SvxPopupWindowListBox::SvxPopupWindowListBox( sal_uInt16 nSlotId, const rtl::OUString& rCommandURL, sal_uInt16 nId, ToolBox& rTbx ) : 108*cdf0e10cSrcweir SfxPopupWindow( nSlotId, Reference< XFrame >(), SVX_RES( RID_SVXTBX_UNDO_REDO_CTRL ) ), 109*cdf0e10cSrcweir aInfo ( this, SVX_RES( FT_NUM_OPERATIONS ) ), 110*cdf0e10cSrcweir rToolBox ( rTbx ), 111*cdf0e10cSrcweir bUserSel ( sal_False ), 112*cdf0e10cSrcweir nTbxId ( nId ), 113*cdf0e10cSrcweir maCommandURL( rCommandURL ) 114*cdf0e10cSrcweir { 115*cdf0e10cSrcweir DBG_ASSERT( nSlotId == GetId(), "id mismatch" ); 116*cdf0e10cSrcweir pListBox = new ListBox( this, SVX_RES( LB_SVXTBX_UNDO_REDO_CTRL ) ); 117*cdf0e10cSrcweir FreeResource(); 118*cdf0e10cSrcweir pListBox->EnableMultiSelection( sal_True, sal_True ); 119*cdf0e10cSrcweir SetBackground( GetSettings().GetStyleSettings().GetDialogColor() ); 120*cdf0e10cSrcweir AddStatusListener( rCommandURL ); 121*cdf0e10cSrcweir } 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir SvxPopupWindowListBox::~SvxPopupWindowListBox() 125*cdf0e10cSrcweir { 126*cdf0e10cSrcweir delete pListBox; 127*cdf0e10cSrcweir } 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir SfxPopupWindow* SvxPopupWindowListBox::Clone() const 131*cdf0e10cSrcweir { 132*cdf0e10cSrcweir return new SvxPopupWindowListBox( GetId(), maCommandURL, nTbxId, rToolBox ); 133*cdf0e10cSrcweir } 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir void SvxPopupWindowListBox::PopupModeEnd() 137*cdf0e10cSrcweir { 138*cdf0e10cSrcweir rToolBox.EndSelection(); 139*cdf0e10cSrcweir SfxPopupWindow::PopupModeEnd(); 140*cdf0e10cSrcweir //FloatingWindow::PopupModeEnd(); 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir if( SfxViewShell::Current() ) 143*cdf0e10cSrcweir { 144*cdf0e10cSrcweir Window* pShellWnd = SfxViewShell::Current()->GetWindow(); 145*cdf0e10cSrcweir if (pShellWnd) 146*cdf0e10cSrcweir pShellWnd->GrabFocus(); 147*cdf0e10cSrcweir } 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir void SvxPopupWindowListBox::StateChanged( 152*cdf0e10cSrcweir sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) 153*cdf0e10cSrcweir { 154*cdf0e10cSrcweir rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SFX_ITEM_DISABLED) ); 155*cdf0e10cSrcweir SfxPopupWindow::StateChanged( nSID, eState, pState ); 156*cdf0e10cSrcweir } 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir void SvxPopupWindowListBox::StartSelection() 160*cdf0e10cSrcweir { 161*cdf0e10cSrcweir rToolBox.StartSelection(); 162*cdf0e10cSrcweir } 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir Window* SvxPopupWindowListBox::GetPreferredKeyInputWindow() 165*cdf0e10cSrcweir { 166*cdf0e10cSrcweir // allows forwarding key events in the correct window 167*cdf0e10cSrcweir // without setting the focus 168*cdf0e10cSrcweir return pListBox->GetPreferredKeyInputWindow(); 169*cdf0e10cSrcweir } 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir ///////////////////////////////////////////////////////////////// 172*cdf0e10cSrcweir 173*cdf0e10cSrcweir SFX_IMPL_TOOLBOX_CONTROL( SvxListBoxControl, SfxStringItem ); 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir 176*cdf0e10cSrcweir SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) 177*cdf0e10cSrcweir :SfxToolBoxControl( nSlotId, nId, rTbx ), 178*cdf0e10cSrcweir pPopupWin ( 0 ) 179*cdf0e10cSrcweir { 180*cdf0e10cSrcweir rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); 181*cdf0e10cSrcweir rTbx.Invalidate(); 182*cdf0e10cSrcweir } 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir SvxListBoxControl::~SvxListBoxControl() 186*cdf0e10cSrcweir { 187*cdf0e10cSrcweir } 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir SfxPopupWindow* SvxListBoxControl::CreatePopupWindow() 191*cdf0e10cSrcweir { 192*cdf0e10cSrcweir DBG_ERROR( "not implemented" ); 193*cdf0e10cSrcweir return 0; 194*cdf0e10cSrcweir } 195*cdf0e10cSrcweir 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir SfxPopupWindowType SvxListBoxControl::GetPopupWindowType() const 198*cdf0e10cSrcweir { 199*cdf0e10cSrcweir return SFX_POPUPWINDOW_ONTIMEOUT; 200*cdf0e10cSrcweir } 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir void SvxListBoxControl::StateChanged( 204*cdf0e10cSrcweir sal_uInt16, SfxItemState, const SfxPoolItem* pState ) 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir GetToolBox().EnableItem( GetId(), 207*cdf0e10cSrcweir SFX_ITEM_DISABLED != GetItemState(pState) ); 208*cdf0e10cSrcweir } 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir IMPL_LINK( SvxListBoxControl, PopupModeEndHdl, void *, EMPTYARG ) 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir if( pPopupWin && 0 == pPopupWin->GetPopupModeFlags() && 214*cdf0e10cSrcweir pPopupWin->IsUserSelected() ) 215*cdf0e10cSrcweir { 216*cdf0e10cSrcweir sal_uInt16 nCount = pPopupWin->GetListBox().GetSelectEntryCount(); 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir INetURLObject aObj( m_aCommandURL ); 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir Sequence< PropertyValue > aArgs( 1 ); 221*cdf0e10cSrcweir aArgs[0].Name = aObj.GetURLPath(); 222*cdf0e10cSrcweir aArgs[0].Value = makeAny( sal_Int16( nCount )); 223*cdf0e10cSrcweir SfxToolBoxControl::Dispatch( m_aCommandURL, aArgs ); 224*cdf0e10cSrcweir } 225*cdf0e10cSrcweir return 0; 226*cdf0e10cSrcweir } 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir void SvxListBoxControl::Impl_SetInfo( sal_uInt16 nCount ) 230*cdf0e10cSrcweir { 231*cdf0e10cSrcweir DBG_ASSERT( pPopupWin, "NULL pointer, PopupWindow missing" ); 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir // ListBox &rListBox = pPopupWin->GetListBox(); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir sal_uInt16 nId; 236*cdf0e10cSrcweir if (nCount == 1) 237*cdf0e10cSrcweir nId = SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTION : RID_SVXSTR_NUM_REDO_ACTION; 238*cdf0e10cSrcweir else 239*cdf0e10cSrcweir nId = SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS; 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir aActionStr = String(SVX_RES(nId)); 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir String aText( aActionStr ); 244*cdf0e10cSrcweir aText.SearchAndReplaceAllAscii( "$(ARG1)", String::CreateFromInt32( nCount ) ); 245*cdf0e10cSrcweir pPopupWin->GetInfo().SetText( aText ); 246*cdf0e10cSrcweir } 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir IMPL_LINK( SvxListBoxControl, SelectHdl, void *, EMPTYARG ) 250*cdf0e10cSrcweir { 251*cdf0e10cSrcweir if (pPopupWin) 252*cdf0e10cSrcweir { 253*cdf0e10cSrcweir //pPopupWin->SetUserSelected( sal_False ); 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir ListBox &rListBox = pPopupWin->GetListBox(); 256*cdf0e10cSrcweir if (rListBox.IsTravelSelect()) 257*cdf0e10cSrcweir Impl_SetInfo( rListBox.GetSelectEntryCount() ); 258*cdf0e10cSrcweir else 259*cdf0e10cSrcweir { 260*cdf0e10cSrcweir pPopupWin->SetUserSelected( sal_True ); 261*cdf0e10cSrcweir pPopupWin->EndPopupMode( 0 ); 262*cdf0e10cSrcweir } 263*cdf0e10cSrcweir } 264*cdf0e10cSrcweir return 0; 265*cdf0e10cSrcweir } 266*cdf0e10cSrcweir 267*cdf0e10cSrcweir ///////////////////////////////////////////////////////////////// 268*cdf0e10cSrcweir 269*cdf0e10cSrcweir SFX_IMPL_TOOLBOX_CONTROL( SvxUndoRedoControl, SfxStringItem ); 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir SvxUndoRedoControl::SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) 272*cdf0e10cSrcweir : SvxListBoxControl( nSlotId, nId, rTbx ) 273*cdf0e10cSrcweir { 274*cdf0e10cSrcweir rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); 275*cdf0e10cSrcweir rTbx.Invalidate(); 276*cdf0e10cSrcweir aDefaultText = MnemonicGenerator::EraseAllMnemonicChars( rTbx.GetItemText( nId ) ); 277*cdf0e10cSrcweir } 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir SvxUndoRedoControl::~SvxUndoRedoControl() 280*cdf0e10cSrcweir { 281*cdf0e10cSrcweir } 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir void SvxUndoRedoControl::StateChanged( 284*cdf0e10cSrcweir sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir if ( nSID == SID_UNDO || nSID == SID_REDO ) 287*cdf0e10cSrcweir { 288*cdf0e10cSrcweir if ( eState == SFX_ITEM_DISABLED ) 289*cdf0e10cSrcweir { 290*cdf0e10cSrcweir ToolBox& rBox = GetToolBox(); 291*cdf0e10cSrcweir rBox.SetQuickHelpText( GetId(), aDefaultText ); 292*cdf0e10cSrcweir } 293*cdf0e10cSrcweir else if ( pState && pState->ISA( SfxStringItem ) ) 294*cdf0e10cSrcweir { 295*cdf0e10cSrcweir SfxStringItem& rItem = *(SfxStringItem *)pState; 296*cdf0e10cSrcweir ToolBox& rBox = GetToolBox(); 297*cdf0e10cSrcweir String aQuickHelpText = MnemonicGenerator::EraseAllMnemonicChars( rItem.GetValue() ); 298*cdf0e10cSrcweir rBox.SetQuickHelpText( GetId(), aQuickHelpText ); 299*cdf0e10cSrcweir } 300*cdf0e10cSrcweir SvxListBoxControl::StateChanged( nSID, eState, pState ); 301*cdf0e10cSrcweir } 302*cdf0e10cSrcweir else 303*cdf0e10cSrcweir { 304*cdf0e10cSrcweir aUndoRedoList.clear(); 305*cdf0e10cSrcweir 306*cdf0e10cSrcweir if ( pState && pState->ISA( SfxStringListItem ) ) 307*cdf0e10cSrcweir { 308*cdf0e10cSrcweir SfxStringListItem &rItem = *(SfxStringListItem *)pState; 309*cdf0e10cSrcweir const List* pLst = rItem.GetList(); 310*cdf0e10cSrcweir DBG_ASSERT( pLst, "no undo actions available" ); 311*cdf0e10cSrcweir if ( pLst ) 312*cdf0e10cSrcweir { 313*cdf0e10cSrcweir for( long nI = 0, nEnd = pLst->Count(); nI < nEnd; ++nI ) 314*cdf0e10cSrcweir aUndoRedoList.push_back( rtl::OUString( *(String *)pLst->GetObject( nI ))); 315*cdf0e10cSrcweir } 316*cdf0e10cSrcweir } 317*cdf0e10cSrcweir } 318*cdf0e10cSrcweir } 319*cdf0e10cSrcweir 320*cdf0e10cSrcweir SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow() 321*cdf0e10cSrcweir { 322*cdf0e10cSrcweir DBG_ASSERT(( SID_UNDO == GetSlotId() || SID_REDO == GetSlotId() ), "mismatching ids" ); 323*cdf0e10cSrcweir 324*cdf0e10cSrcweir if ( m_aCommandURL.equalsAscii( ".uno:Undo" )) 325*cdf0e10cSrcweir updateStatus( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GetUndoStrings" ))); 326*cdf0e10cSrcweir else 327*cdf0e10cSrcweir updateStatus( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GetRedoStrings" ))); 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir ToolBox& rBox = GetToolBox(); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir pPopupWin = new SvxPopupWindowListBox( GetSlotId(), m_aCommandURL, GetId(), rBox ); 332*cdf0e10cSrcweir pPopupWin->SetPopupModeEndHdl( LINK( this, SvxUndoRedoControl, 333*cdf0e10cSrcweir PopupModeEndHdl ) ); 334*cdf0e10cSrcweir ListBox &rListBox = pPopupWin->GetListBox(); 335*cdf0e10cSrcweir rListBox.SetSelectHdl( LINK( this, SvxUndoRedoControl, SelectHdl ) ); 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir for( sal_uInt32 n = 0; n < aUndoRedoList.size(); n++ ) 338*cdf0e10cSrcweir rListBox.InsertEntry( String( aUndoRedoList[n] )); 339*cdf0e10cSrcweir 340*cdf0e10cSrcweir rListBox.SelectEntryPos( 0 ); 341*cdf0e10cSrcweir aActionStr = String( SVX_RES( SID_UNDO == GetSlotId() ? 342*cdf0e10cSrcweir RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS ) ); 343*cdf0e10cSrcweir Impl_SetInfo( rListBox.GetSelectEntryCount() ); 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir // move focus in floating window without 346*cdf0e10cSrcweir // closing it (GrabFocus() would close it!) 347*cdf0e10cSrcweir pPopupWin->StartPopupMode( &rBox, FLOATWIN_POPUPMODE_GRABFOCUS ); 348*cdf0e10cSrcweir //pPopupWin->GetListBox().GrabFocus(); 349*cdf0e10cSrcweir 350*cdf0e10cSrcweir return pPopupWin; 351*cdf0e10cSrcweir } 352