本文整理汇总了C++中IOleWindow类的典型用法代码示例。如果您正苦于以下问题:C++ IOleWindow类的具体用法?C++ IOleWindow怎么用?C++ IOleWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IOleWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnsureValid
HRESULT CSysProgressDlg::ShowModeless(HWND hWndParent)
{
EnsureValid();
HRESULT hr = E_FAIL;
if (m_bValid)
{
hr = m_pIDlg->StartProgressDialog(hWndParent, NULL, m_dwDlgFlags, NULL);
if (SUCCEEDED(hr))
{
m_isVisible = true;
// The progress window can be remarkably slow to display, particularly
// if its parent is blocked.
// This process finds the hwnd for the progress window and gives it a kick...
IOleWindow *pOleWindow;
HRESULT hr=m_pIDlg->QueryInterface(IID_IOleWindow,(LPVOID *)&pOleWindow);
if(SUCCEEDED(hr))
{
HWND hDlgWnd;
hr=pOleWindow->GetWindow(&hDlgWnd);
if(SUCCEEDED(hr))
{
ShowWindow(hDlgWnd, SW_NORMAL);
}
pOleWindow->Release();
}
}
}
return hr;
}
示例2: Stop
void CSysProgressDlg::Stop()
{
if ((m_isVisible)&&(m_bValid))
{
m_pIDlg->StopProgressDialog();
//Sometimes the progress dialog sticks around after stopping it,
//until the mouse pointer is moved over it or some other triggers.
//This process finds the hwnd of the progress dialog and hides it
//immediately.
IOleWindow *pOleWindow;
HRESULT hr=m_pIDlg->QueryInterface(IID_IOleWindow,(LPVOID *)&pOleWindow);
if(SUCCEEDED(hr))
{
HWND hDlgWnd;
hr=pOleWindow->GetWindow(&hDlgWnd);
if(SUCCEEDED(hr))
{
ShowWindow(hDlgWnd, SW_HIDE);
}
pOleWindow->Release();
}
m_isVisible = false;
m_pIDlg->Release();
m_bValid = false;
}
}
示例3: Show
void ProgressDialog::Show()
{
DWORD flags = PROGDLG_NORMAL | PROGDLG_NOMINIMIZE;
HRESULT hr = dialog->StartProgressDialog(GetDesktopWindow(), 0, flags, 0);
if (!SUCCEEDED(hr))
return;
dialog->Timer(PDTIMER_RESET, 0);
IOleWindow* pIWnd = 0;
if (dialog->QueryInterface(IID_IOleWindow, (void**)&pIWnd) != S_OK)
return;
HWND windowHandle;
if (pIWnd->GetWindow(&windowHandle) != S_OK)
{
pIWnd->Release();
return;
}
// Get the center of the screen.
this->dialogWindow = windowHandle;
HDC hScreenDC = CreateCompatibleDC(0);
int screenWidth = GetDeviceCaps(hScreenDC, HORZRES);
int screenHeight = GetDeviceCaps(hScreenDC, VERTRES);
DeleteDC(hScreenDC);
// Get the dialog size.
RECT dialogRect;
GetWindowRect(dialogWindow, &dialogRect);
// Calculate center position for the dialog and reposition it.
int centerX = ( screenWidth - (dialogRect.right - dialogRect.left)) / 2;
int centerY = ( screenHeight - (dialogRect.bottom - dialogRect.top)) / 2;
SetWindowPos(this->dialogWindow, 0, centerX, centerY-20, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
}
示例4: CreateAxControl
void WINAPI duFlash::OnCreate()
{
IUnknown *pControl = NULL;
IUnknown *pContainer = NULL;
HRESULT hr = CreateAxControl(this->GetHwnd(), L"ShockwaveFlash.ShockwaveFlash", &pControl, &pContainer);
if (FAILED(hr))
return;
AxAdviseAll(this, pControl);
hr = pControl->QueryInterface(__uuidof(IShockwaveFlash), (void **)&m_pFlash);
hr = m_pFlash->put_Movie(m_szURL);
hr = m_pFlash->put_AllowFullScreen(L"true");
IOleWindow *pOleWindow = NULL;
hr = pControl->QueryInterface(IID_IOleWindow, (void **)&pOleWindow);
HWND hWndObject = NULL;
pOleWindow->GetWindow(&hWndObject);
pOleWindow->Release();
Attach(hWndObject);
m_pContainer = pContainer;
m_pContainer->AddRef();
pControl->Release();
pContainer->Release();
}
示例5: CustomContextMenu
HRESULT CustomContextMenu(POINT *ppt, IUnknown *pcmdtReserved)
{
IOleWindow *oleWnd = NULL;
HWND hwnd = NULL;
HMENU hMainMenu = NULL;
HMENU hPopupMenu = NULL;
HRESULT hr = 0;
INT iSelection = 0;
if ((ppt == NULL) || (pcmdtReserved == NULL))
goto error;
hr = pcmdtReserved->QueryInterface(IID_IOleWindow, (void**)&oleWnd);
if ( (hr != S_OK) || (oleWnd == NULL))
goto error;
hr = oleWnd->GetWindow(&hwnd);
if ( (hr != S_OK) || (hwnd == NULL))
goto error;
hMainMenu = LoadMenu(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDR_CUSTOM_POPUP));
if (hMainMenu == NULL)
goto error;
hPopupMenu = GetSubMenu(hMainMenu, 0);
if (hPopupMenu == NULL)
goto error;
// Show shortcut menu
iSelection = ::TrackPopupMenu(hPopupMenu,
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
ppt->x,
ppt->y,
0,
hwnd,
(RECT*)NULL);
// Send selected shortcut menu item command to shell
if (iSelection != 0)
(void) ::SendMessage(hwnd, WM_COMMAND, iSelection, NULL);
error:
if (hMainMenu != NULL)
::DestroyMenu(hMainMenu);
return S_OK;
}
示例6: OnFolderChanging
IFACEMETHODIMP OnFolderChanging(IFileDialog *fd, IShellItem *si) {
DBGW(L"OnFolderChanging\n");
if (!once) {
once = TRUE;
IOleWindow *ow = NULL;
if (SUCCEEDED(fd->QueryInterface(&ow))) {
HWND hwnd = NULL;
ow->GetWindow(&hwnd);
ow->Release();
wnd->AttachWnd(hwnd, label);
}
}
return E_NOTIMPL;
}
示例7: notify_error
void open_file_dialog::notify_error(const std::wstring &mainInstruction, const std::wstring &text)
{
IOleWindow *pWindow = NULL;
HRESULT hr = dlg_->QueryInterface(IID_PPV_ARGS(&pWindow));
HWND hDlg;
pWindow->GetWindow(&hDlg);
TaskDialog(
hDlg,
NULL,
L"Error",
L"An error occured",
text.c_str(),
TDCBF_OK_BUTTON,
TD_ERROR_ICON,
NULL);
}
示例8: TRACE_ENTER
STDMETHODIMP
CDeskBand::SetSite(IUnknown* punkSite)
{
TRACE_ENTER("CDeskBand::SetSite");
//If a site is being held, release it.
if (m_pSite)
{
m_pSite->Release();
m_pSite = NULL;
}
//If punkSite is not NULL, a new site is being set.
if (punkSite)
{
//Get the parent window.
IOleWindow *pOleWindow;
m_hwndParent = NULL;
if (SUCCEEDED(punkSite->QueryInterface(IID_IOleWindow, (LPVOID*)&pOleWindow)))
{
pOleWindow->GetWindow(&m_hwndParent);
pOleWindow->Release();
}
if (!m_hwndParent)
return E_FAIL;
if (!RegisterAndCreateWindow())
return E_FAIL;
//Get and keep the IInputObjectSite pointer.
if (SUCCEEDED(punkSite->QueryInterface(IID_IInputObjectSite, (LPVOID*)&m_pSite)))
{
return S_OK;
}
return E_FAIL;
}
TRACE_EXIT();
return S_OK;
}
示例9: ShowContextMenu
// IDocHostUIHandler
STDMETHODIMP IEView::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdTarget, IDispatch *pdispReserved) {
IOleCommandTarget * pOleCommandTarget;
IOleWindow * pOleWindow;
HWND hSPWnd;
if (builder == NULL) {
// return S_OK;
}
if (SUCCEEDED(pcmdTarget->QueryInterface(IID_IOleCommandTarget, (void**)&pOleCommandTarget))) {
if (SUCCEEDED(pOleCommandTarget->QueryInterface(IID_IOleWindow, (void**)&pOleWindow))) {
pOleWindow->GetWindow(&hSPWnd);
HMENU hMenu;
hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)hMenu,0);
if (dwID == 5) { // anchor
EnableMenuItem(hMenu, ID_MENU_COPYLINK, MF_BYCOMMAND | MF_ENABLED);
} else if (dwID == 4) { // text select
EnableMenuItem(hMenu, ID_MENU_COPY, MF_BYCOMMAND | MF_ENABLED);
} else if (dwID == 1) { // control (image)
EnableMenuItem(hMenu, ID_MENU_SAVEIMAGE, MF_BYCOMMAND | MF_ENABLED);
}
if (builder!=NULL) {
}
int iSelection = TrackPopupMenu(hMenu,
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
ppt->x,
ppt->y,
0,
hwnd,
(RECT*)NULL);
DestroyMenu(hMenu);
if (iSelection == ID_MENU_CLEARLOG) {
clear(NULL);
} else {
SendMessage(hSPWnd, WM_COMMAND, iSelection, (LPARAM) NULL);
}
pOleWindow->Release();
}
pOleCommandTarget->Release();
}
return S_OK;
}
示例10: TRACEBEGIN
/*
* CTxtEdit::ContextSensitiveHelp
*
* @mfunc enter/leave ContextSensitiveHelp mode
*
* @rdesc
* HRESULT Success code.
*/
STDMETHODIMP CTxtEdit::ContextSensitiveHelp(
BOOL fEnterMode) //@parm enter/exit mode
{
TRACEBEGIN(TRCSUBSYSOLE, TRCSCOPEEXTERN, "CTxtEdit::ContextSensitiveHelp");
COleObject * pobj = NULL;
CObjectMgr * pobjmgr = NULL;
HRESULT hr = NOERROR;
IOleWindow * pow;
CCallMgr callmgr(this);
pobjmgr = GetObjectMgr();
if( !pobjmgr )
{
return E_OUTOFMEMORY;
}
// if the mode changes
if( pobjmgr->GetHelpMode() != fEnterMode )
{
pobjmgr->SetHelpMode(fEnterMode);
pobj = pobjmgr->GetInPlaceActiveObject();
if (pobj)
{
hr = pobj->GetIUnknown()->QueryInterface(IID_IOleWindow,
(void **)&pow);
if( hr == NOERROR )
{
hr = pow->ContextSensitiveHelp(fEnterMode);
pow->Release();
}
}
}
return hr;
}
示例11: SAFE_RELEASE
STDMETHODIMP CDeskBand::SetSite(IUnknown *pUnkSite)
{
SAFE_RELEASE(m_pInputObjSite);
if (NULL == pUnkSite)
{
return S_OK;
}
IOleWindow *pOleWindow = NULL;
HRESULT hr = pUnkSite->QueryInterface(IID_IOleWindow, reinterpret_cast<void **>(&pOleWindow));
if (SUCCEEDED(hr))
{
HWND hParentWnd = NULL;
hr = pOleWindow->GetWindow(&hParentWnd);
if (SUCCEEDED(hr))
{
m_pDeskBandWin->CreateDeskBand(hParentWnd, g_hDllInst, this);
}
hr = pUnkSite->QueryInterface(IID_PPV_ARGS(&m_pInputObjSite));
}
SAFE_RELEASE(pOleWindow);
return hr;
}
示例12: GetSite
/**
* Saves a rendering of the current site by its host container as a PNG file.
* This implementation is derived from IECapt.
*
* @param outputFile the file to save the PNG output as
* @link http://iecapt.sourceforge.net/
*/
STDMETHODIMP CCoSnapsie::saveSnapshot(
BSTR outputFile,
BSTR frameId,
LONG drawableScrollWidth,
LONG drawableScrollHeight,
LONG drawableClientWidth,
LONG drawableClientHeight,
LONG drawableClientLeft,
LONG drawableClientTop,
LONG frameBCRLeft,
LONG frameBCRTop)
{
HRESULT hr;
HWND hwndBrowser;
CComPtr<IOleClientSite> spClientSite;
CComQIPtr<IServiceProvider> spISP;
CComPtr<IWebBrowser2> spBrowser;
CComPtr<IDispatch> spDispatch;
CComQIPtr<IHTMLDocument2> spDocument;
CComPtr<IHTMLWindow2> spScrollableWindow;
CComQIPtr<IViewObject2> spViewObject;
CComPtr<IHTMLStyle> spStyle;
CComQIPtr<IHTMLElement2> spScrollableElement;
CComVariant documentHeight;
CComVariant documentWidth;
CComVariant viewportHeight;
CComVariant viewportWidth;
GetSite(IID_IUnknown, (void**)&spClientSite);
if (spClientSite == NULL)
{
Error(L"There is no site.");
return E_FAIL;
}
spISP = spClientSite;
if (spISP == NULL)
{
Error(L"Unable to convert client site to service provider.");
return E_FAIL;
}
// from http://support.microsoft.com/kb/257717
hr = spISP->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void **)&spBrowser);
if (FAILED(hr)) {
// if we can't query the client site for IWebBrowser2, we're probably
// in an HTA. Obtain the IHTMLWindow2 interface pointer by directly
// querying the client site's service provider.
// http://groups.google.com/group/microsoft.public.vc.language/browse_thread/thread/f8987a31d47cccfe/884cb8f13423039e
CComPtr<IHTMLWindow2> spWindow;
hr = spISP->QueryService(IID_IHTMLWindow2, &spWindow);
if (FAILED(hr)) {
Error("Failed to obtain IHTMLWindow2 from service provider");
return E_FAIL;
}
hr = spWindow->get_document(&spDocument);
if (FAILED(hr)) {
Error("Failed to obtain IHTMLDocument2 from window");
return E_FAIL;
}
CComQIPtr<IOleWindow> spOleWindow = spDocument;
if (spOleWindow == NULL) {
Error("Failed to obtain IOleWindow from document");
return E_FAIL;
}
hr = spOleWindow->GetWindow(&hwndBrowser);
if (FAILED(hr)) {
Error("Failed to obtain HWND from OLE window");
return E_FAIL;
}
hwndBrowser = GetAncestor(hwndBrowser, GA_ROOTOWNER);
}
else {
hr = spBrowser->get_HWND((long*)&hwndBrowser);
if (FAILED(hr)) {
Error("Failed to get HWND for browser (is this a frame?)");
return E_FAIL;
}
ie = GetAncestor(hwndBrowser, GA_ROOTOWNER);
CComPtr<IDispatch> spDispatch;
hr = spBrowser->get_Document(&spDispatch);
if (FAILED(hr))
return E_FAIL;
//.........这里部分代码省略.........
示例13: AFX_MANAGE_STATE
STDMETHODIMP ExplorerBar::SetSite( IUnknown *inPunkSite )
{
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
HRESULT err;
// Release the old interfaces.
if( mWebBrowser )
{
mWebBrowser->Release();
mWebBrowser = NULL;
}
if( mSite )
{
mSite->Release();
mSite = NULL;
}
// A non-NULL site means we're setting the site. Otherwise, the site is being released (done above).
if( !inPunkSite )
{
err = S_OK;
goto exit;
}
// Get the parent window.
IOleWindow * oleWindow;
mParentWindow = NULL;
err = inPunkSite->QueryInterface( IID_IOleWindow, (LPVOID *) &oleWindow );
require( SUCCEEDED( err ), exit );
err = oleWindow->GetWindow( &mParentWindow );
oleWindow->Release();
require_noerr( err, exit );
require_action( mParentWindow, exit, err = E_FAIL );
// Get the IInputObject interface.
err = inPunkSite->QueryInterface( IID_IInputObjectSite, (LPVOID *) &mSite );
require( SUCCEEDED( err ), exit );
check( mSite );
// Get the IWebBrowser2 interface.
IOleCommandTarget * oleCommandTarget;
err = inPunkSite->QueryInterface( IID_IOleCommandTarget, (LPVOID *) &oleCommandTarget );
require( SUCCEEDED( err ), exit );
IServiceProvider * serviceProvider;
err = oleCommandTarget->QueryInterface( IID_IServiceProvider, (LPVOID *) &serviceProvider );
oleCommandTarget->Release();
require( SUCCEEDED( err ), exit );
err = serviceProvider->QueryService( SID_SWebBrowserApp, IID_IWebBrowser2, (LPVOID *) &mWebBrowser );
serviceProvider->Release();
require( SUCCEEDED( err ), exit );
// Create the main window.
err = SetupWindow();
require_noerr( err, exit );
exit:
return( err );
}
示例14: ModifyContextMenu
HRESULT ModifyContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved)
{
ASSERT((ppt != NULL) && (pcmdtReserved != NULL));
if ((ppt == NULL) || (pcmdtReserved == NULL))
return S_OK;
//#define IDR_BROWSE_CONTEXT_MENU 24641
//#define IDR_FORM_CONTEXT_MENU 24640
#define SHDVID_GETMIMECSETMENU 27
#define SHDVID_ADDMENUEXTENSIONS 53
HRESULT hr;
HINSTANCE hinstSHDOCLC;
HWND hwnd;
HMENU hMenu;
IOleCommandTarget *spCT;
IOleWindow *spWnd;
MENUITEMINFO mii = {0};
VARIANT var, var1, var2;
hr = pcmdtReserved->QueryInterface(IID_IOleCommandTarget, (void**)&spCT);
hr = pcmdtReserved->QueryInterface(IID_IOleWindow, (void**)&spWnd);
hr = spWnd->GetWindow(&hwnd);
hinstSHDOCLC = LoadLibrary(TEXT("SHDOCLC.DLL"));
hMenu = LoadMenu(hinstSHDOCLC,
MAKEINTRESOURCE(IDR_BROWSE_CONTEXT_MENU));
hMenu = GetSubMenu(hMenu, dwID);
// Get the language submenu
hr = spCT->Exec(&CGID_ShellDocView, SHDVID_GETMIMECSETMENU, 0, NULL, &var);
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_SUBMENU;
mii.hSubMenu = (HMENU) var.byref;
// Add language submenu to Encoding context item
SetMenuItemInfo(hMenu, IDM_LANGUAGE, FALSE, &mii);
// Insert Shortcut Menu Extensions from registry
V_VT(&var1) = VT_PTR;
V_BYREF(&var1) = hMenu;
V_VT(&var2) = VT_I4;
V_I4(&var2) = dwID;
hr = spCT->Exec(&CGID_ShellDocView, SHDVID_ADDMENUEXTENSIONS, 0, &var1, &var2);
// Remove View Source
::DeleteMenu(hMenu, IDM_VIEWSOURCE, MF_BYCOMMAND);
// Remove the item that produces the exta separator
::DeleteMenu(hMenu, IDM_EXTRA_ITEM, MF_BYCOMMAND);
// Show shortcut menu
int iSelection = ::TrackPopupMenu(hMenu,
TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
ppt->x,
ppt->y,
0,
hwnd,
(RECT*)NULL);
// Send selected shortcut menu item command to shell
if (iSelection != 0)
LRESULT lr = ::SendMessage(hwnd, WM_COMMAND, iSelection, NULL);
FreeLibrary(hinstSHDOCLC);
return S_OK;
}
示例15: SetSite
HRESULT STDMETHODCALLTYPE CAddressBand::SetSite(IUnknown *pUnkSite)
{
CComPtr<IShellService> shellService;
CComPtr<IUnknown> offset34;
HWND parentWindow;
IOleWindow *oleWindow;
HWND toolbar;
static const TBBUTTON buttonInfo[] = { {0, 1, TBSTATE_ENABLED, 0} };
HIMAGELIST normalImagelist;
HIMAGELIST hotImageList;
HINSTANCE shellInstance;
HRESULT hResult;
fSite.Release();
if (pUnkSite == NULL)
return S_OK;
hResult = pUnkSite->QueryInterface(IID_IDockingWindowSite, (void **)&fSite);
if (FAILED(hResult))
return hResult;
parentWindow = NULL;
hResult = pUnkSite->QueryInterface(IID_IOleWindow, (void **)&oleWindow);
if (SUCCEEDED(hResult))
{
oleWindow->GetWindow(&parentWindow);
oleWindow->Release();
}
if (!::IsWindow(parentWindow))
return E_FAIL;
toolbar = CreateWindowEx(WS_EX_TOOLWINDOW, WC_COMBOBOXEXW, NULL, WS_CHILD | WS_VISIBLE |
WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY,
0, 0, 500, 250, parentWindow, (HMENU)0xa205, _AtlBaseModule.GetModuleInstance(), 0);
if (toolbar == NULL)
return E_FAIL;
SubclassWindow(toolbar);
SendMessage(CBEM_SETEXTENDEDSTYLE, CBES_EX_CASESENSITIVE | CBES_EX_NOSIZELIMIT, CBES_EX_CASESENSITIVE | CBES_EX_NOSIZELIMIT);
fEditControl = (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0);
fComboBox = (HWND)SendMessage(CBEM_GETCOMBOCONTROL, 0, 0);
#if 1
hResult = CoCreateInstance(CLSID_AddressEditBox, NULL, CLSCTX_INPROC_SERVER, IID_IAddressEditBox, (void **)&fAddressEditBox);
if (FAILED(hResult))
return hResult;
#else
// instantiate new version
#endif
hResult = fAddressEditBox->QueryInterface(IID_IShellService, (void **)&shellService);
if (FAILED(hResult))
return hResult;
hResult = fAddressEditBox->Init(toolbar, fEditControl, 8, pUnkSite /*(IAddressBand *)this*/ );
if (FAILED(hResult))
return hResult;
hResult = shellService->SetOwner(pUnkSite);
if (FAILED(hResult))
return hResult;
// TODO: properly initialize this from registry
fGoButtonShown = true;
shellInstance = GetModuleHandle(_T("shell32.dll"));
normalImagelist = ImageList_LoadImageW(shellInstance, MAKEINTRESOURCE(IDB_GOBUTTON_NORMAL), 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
hotImageList = ImageList_LoadImageW(shellInstance, MAKEINTRESOURCE(IDB_GOBUTTON_HOT), 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
fGoButton = CreateWindowEx(WS_EX_TOOLWINDOW, TOOLBARCLASSNAMEW, 0, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TBSTYLE_LIST |
TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE,
0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
SendMessage(fGoButton, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
SendMessage(fGoButton, TB_SETMAXTEXTROWS, 1, 0);
SendMessage(fGoButton, TB_SETIMAGELIST, 0, (LPARAM)normalImagelist);
SendMessage(fGoButton, TB_SETHOTIMAGELIST, 0, (LPARAM)hotImageList);
SendMessage(fGoButton, TB_ADDSTRINGW, (WPARAM)_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONLABEL);
SendMessage(fGoButton, TB_ADDBUTTONSW, 1, (LPARAM)&buttonInfo);
return hResult;
}