ToolbarWindow.h
#pragma once
#include "atlwin.h"
class CToolbarWindow : public CWindowImpl<CToolbarWindow>
{
public:
DECLARE_WND_SUPERCLASS(TEXT("CTOOLBARWINDOW"), TOOLBARCLASSNAME)
BEGIN_MSG_MAP(CToolbarWindow)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
COMMAND_ID_HANDLER(1000, OnKumaButton)
//WM_NOTIFY且つTBN_DROPDOWN(ドロップダウン時)に、OnDropDown関数を呼ぶ
NOTIFY_CODE_HANDLER (TBN_DROPDOWN, OnDropDown)
END_MSG_MAP()
//WM_CREATE時の処理
LRESULT OnCreate ( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
LRESULT OnKumaButton ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
//ドロップダウン時の動作
LRESULT OnDropDown ( int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
CToolbarWindow(void);
virtual ~CToolbarWindow(void);
void SetBrowser (CComPtr<IWebBrowser2> spWebBrowser2) { m_spBrowser.Attach(spWebBrowser2); }
private:
HIMAGELIST m_hImageList;
CComPtr<IWebBrowser2> m_spBrowser;
};
戻る
コメントスペース