home *** CD-ROM | disk | FTP | other *** search
- /* Project richctrl
- DHB Software
- Copyright ⌐ 1996. All Rights Reserved.
-
- SUBSYSTEM: richctrl.apx Application
- FILE: tolcmbbx.cpp
- AUTHOR: David H. Borg
-
-
- OVERVIEW
- ========
- Source file for implementation of ToolComboBox (TComboBox).
- */
-
- #include <owl\owlpch.h>
- #pragma hdrstop
-
- #include "tolcmbbx.h"
-
-
- //
- // Build a response table for all messages/commands handled
- // by the application.
- //
- DEFINE_RESPONSE_TABLE1(ToolComboBox, TComboBox)
- //{{ToolComboBoxRSP_TBL_BEGIN}}
- EV_WM_SETFOCUS,
- //{{ToolComboBoxRSP_TBL_END}}
- END_RESPONSE_TABLE;
-
-
- //{{ToolComboBox Implementation}}
-
-
- ToolComboBox::ToolComboBox (TWindow* parent, int id, int x, int y, int w, int h, uint32 style, uint textLen, TModule* module):
- TComboBox(parent, id, x, y, w, h, style, textLen, module), returnFocus(0)
- {
- // INSERT>> Your constructor code here.
-
- // modify default styles
- Attr.Style &= ~(WS_GROUP | WS_TABSTOP | CBS_SORT);
- Attr.Style |= style;
- }
-
-
- ToolComboBox::~ToolComboBox ()
- {
- Destroy();
-
- // INSERT>> Your destructor code here.
-
- }
-
-
- void ToolComboBox::EvSetFocus (HWND hWndLostFocus )
- {
- TComboBox::EvSetFocus(hWndLostFocus );
-
- // INSERT>> Your code here.
-
- // remember who sent us focus
- returnFocus = hWndLostFocus;
- }
-
-
- void ToolComboBox::RetWndFocus()
- {
- // give focus back to whomever sent it
- ::SetFocus( returnFocus);
- }
-
-
- void ToolComboBox::InformFocus( uint msg, WPARAM wParam, LPARAM lParam)
- {
- // forward the Windows message to the window who lost focus to us
- RetWndFocus();
- ::SendMessage( returnFocus, msg, wParam, lParam);
- }
-
-