From: <zou...@us...> - 2007-12-01 23:05:17
|
Revision: 924 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=924&view=rev Author: zouzou123gen Date: 2007-12-01 15:05:03 -0800 (Sat, 01 Dec 2007) Log Message: ----------- tab handling in HubFrame Modified Paths: -------------- dcplusplus/trunk/win32/HubFrame.cpp dcplusplus/trunk/win32/HubFrame.h Modified: dcplusplus/trunk/win32/HubFrame.cpp =================================================================== --- dcplusplus/trunk/win32/HubFrame.cpp 2007-12-01 21:15:53 UTC (rev 923) +++ dcplusplus/trunk/win32/HubFrame.cpp 2007-12-01 23:05:03 UTC (rev 924) @@ -86,16 +86,17 @@ { WidgetTextBox::Seed cs = WinUtil::Seeds::textBox; - cs.style = WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE; + cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE; message = createTextBox(cs); addWidget(message, true); + message->onRaw(std::tr1::bind(&HubFrame::handleMessageGetDlgCode, this), SmartWin::Message(WM_GETDLGCODE)); message->onKeyDown(std::tr1::bind(&HubFrame::handleMessageKeyDown, this, _1)); message->onChar(std::tr1::bind(&HubFrame::handleMessageChar, this, _1)); } { WidgetTextBox::Seed cs = WinUtil::Seeds::textBox; - cs.style = WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY; + cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY; chat = createTextBox(cs); chat->setTextLimit(0); addWidget(chat); @@ -105,7 +106,7 @@ { WidgetTextBox::Seed cs = WinUtil::Seeds::textBox; - cs.style = WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL; + cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL; filter = createTextBox(cs); addWidget(filter); filter->onKeyUp(std::tr1::bind(&HubFrame::handleFilterKey, this, _1)); @@ -671,6 +672,11 @@ return false; } +LRESULT HubFrame::handleMessageGetDlgCode() { + // override the MDIChildFrame behavior, which tells the Dialog Manager to process Tab presses by itself + return DLGC_WANTMESSAGE; +} + bool HubFrame::handleMessageChar(int c) { switch(c) { case VK_TAB: Modified: dcplusplus/trunk/win32/HubFrame.h =================================================================== --- dcplusplus/trunk/win32/HubFrame.h 2007-12-01 21:15:53 UTC (rev 923) +++ dcplusplus/trunk/win32/HubFrame.h 2007-12-01 23:05:03 UTC (rev 924) @@ -229,6 +229,7 @@ void runUserCommand(const UserCommand& uc); + LRESULT handleMessageGetDlgCode(); bool handleMessageChar(int c); bool handleMessageKeyDown(int c); bool handleUsersKeyDown(int c); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |