ToolbarWindow.h


#pragma once
#include "atlwin.h"
#include "ToolbarButtonCtrl.h"
#include "const.h"
#include <tlogstg.h>

class CToolbarWindow : public CWindowImpl<CToolbarWindow>
{
public:
    DECLARE_WND_SUPERCLASS(TEXT("CTOOLBARWINDOW"), TOOLBARCLASSNAME)

    BEGIN_MSG_MAP ( CToolbarWindow )
        MESSAGE_HANDLER ( WM_CREATE, OnCreate )
        NOTIFY_CODE_HANDLER (TBN_DROPDOWN, OnDropDown )
        COMMAND_RANGE_HANDLER ( KUMA_BUTTON_ID_MIN, KUMA_BUTTON_ID_MAX, OnKumaButtonCommand )
        COMMAND_RANGE_HANDLER ( KUMA_MENU_ID_MIN,   KUMA_MENU_ID_MAX,   OnKumaMenuCommand )
    END_MSG_MAP()

    LRESULT OnCreate      ( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled  );
    LRESULT OnDropDown    ( int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
    LRESULT OnKumaButtonCommand ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
    LRESULT OnKumaMenuCommand   ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );

    CToolbarWindow(void);
    virtual ~CToolbarWindow(void);

    void SetBrowser (CComPtr<IWebBrowser2>    spWebBrowser2) { m_spBrowser = spWebBrowser2; }
    void SetTravelLogStg (CComPtr<ITravelLogStg> spTravelLogStg) { m_spTravelLogStg = spTravelLogStg; }

private:
    CToolbarButtonCtrl m_BtnCtrl;
    CComPtr<IWebBrowser2>  m_spBrowser;
    CComPtr<ITravelLogStg> m_spTravelLogStg;
};

戻る

コメントスペース