|
Hi,
I've installed the ATL object in the right directory, and ran regsvr32 on it.
Ok.
Then I try to start a new ATL project - to insert the deskband object;
Firing up the ATL Object Wizard: No Radbyte folder - or Deskband object
Can anyone help me?
Regards,
Lars Wilhelmsen
|
|
|
|
|
hello,
i also has above problam.
i solve the problam.
it's i use not default regsvr32.
there is be two kind regsvr32 in my computer.
select /system/inetsrv/regsvr32.
then is success.
good luck!
|
|
|
|
|
Button[6].idCommand = IDM_XXXX;
Button[6].fsState = TBSTATE_ENABLED;
Button[6].fsStyle = TBSTYLE_BUTTON;
Button[6].dwData = -1;
Button[6].iString = BTCaptionIndex6;
Button[6].iBitmap = 3;
::SendMessage(m_hWnd,TB_ADDBUTTONS ,6,(LPARAM)&Button);
//--------------------------------------
TBBUTTONINFO tbi;
tbi.dwMask= TBIF_STYLE;
tbi.cbSize= sizeof(TBBUTTONINFO);
GetButtonInfo(IDM_XXXX, &tbi);
tbi.fsStyle |= TBSTYLE_DROPDOWN;
SetButtonInfo(IDM_XXXX , &tbi);
Drop down Menu Not work With ON_NOTIFY
//-----------------------------------------------
ON_NOTIFY(TBN_DROPDOWN, ID_TOOLSBAR , OnToolbarDropDown)
//-----------------------------------------------
void MyToolBar::OnToolbarDropDown( NMHDR * pNotifyStruct, LRESULT * result)
{
CMenu menu;
menu.LoadMenu(IDR_MENU1);
CMenu* popup = menu.GetSubMenu(0);
popup->TrackPopupMenu(TPM_RIGHTBUTTON |TPM_LEFTALIGN
, CurrPoint.x, CurrPoint.y, this);
}
//--------------------------------------------
How to Handle WM_NOTIFY and ON_NOTIFY
Gixx
|
|
|
|
|
I emailed erik a similar question on how to deal with the TBN_DROPDOWN message
"
No worries. This message is sent to the parent of the toolbar window, which can then redirect it back to the child window if needed. You might want to use FORWARD_NOTIFICATIONS macro in your ATL message map of the parent window and put the message handlers in your toolbar class.
Cheers,
-Erik
"
i need a bit more info on exactly what he means to figure out what to do
can anyone else help?
bryce
|
|
|
|
|
Thank So much .....;)
gixx
|
|
|
|
|
I used the function SetOwner of the CToolbarCtrl of my toolbar, and it's great :
Just do :
SetOwner(this);
in the init or create of your toolbar and all messages will be redirected by your toolbar
Looks fine for me.
|
|
|
|
|
Does anybody know how to install automatically a toolbar (.dll) in the client IE browser in the same way google toolbar does?
And what is the html code to do that?
Shin
|
|
|
|
|
Take a look at the <object> tag for IE. You also have to create a CAB installation (which contains a .INF file for instructions). It's not difficult but you have to understand it. I would download the the ActiveX SDK (which I believe no longer exists) or the Java SDK (it has instructions on creating CABs with .dll in there and .inf files to actually do the work). You could download the Platform SDK but this is overkill for what you want.
If you're using VS 6.0 (which I assume you are), there's also CAB setup tools. Just create a new CAB project in your DeskBand's Workspace and figure out how to use that. I know that it also works but I've never used it for installs - just compression of a group of files.
---
Heath Stewart
Network Administrator / Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu
|
|
|
|
|
But google is not using any .inf file in the cab file.
.cab file is only having GoogleNav.dll.
Clsid of GoogleNav.dll and the Toolband's clsid is also different. can any body know exactly how google is working
for installation of toolband.
Thanx in advance.
HArish Chouksey
Software Engineer
Learnet India Limited
Mumbai-India
|
|
|
|
|
When using a single-file CAB, IE will automatically self-register it and add it to the "Downloaded Programs" folder in your Windows folder. INF files are recommended for all archives, but only necessary for multiple files or for more complex installations.
I suggest you see the Setup section of the Platform SDK. Also check the MS Java SDK, which has information about this distribution mechanism as well, since the MSDN docs don't exactly get right to the point, but the Java SDK ones, doo.
Please note, I don't mean the JDK for Sun, but Microsoft Java SDK 4.0.
---
Heath Stewart
Network Administrator / Developer
College of Veterinary Medicine
Iowa State University
http://www.vetmed.iastate.edu
|
|
|
|
|
Hi, does anyone here know how it is possible to make the toolbar automatically visible after installing it?
What I want is that my little installer program that I've written, registers the dll and then assures that the toolbar is already enabled in new explorer windows. Also, it would be nice if I can adjust it's position in Explorer before hand.
Cheers.
|
|
|
|
|
Any luck on that one? Even I am looking out for that one...
|
|
|
|
|
Use a Browser Helper Object in conjunction with the toolband object. A BHO ensures that everytime IE launches, your objects SetSite is called. Read more about BHO's and customozing IE at earlier issues of MIND. www.microsoft.com/mind or do a search on BHO. basically you have to insert a coupleof registry entries to make your COM object a BHO. viz. HKLM->Microsoft->Windows->Current Version->Explorer->Browser Helper Objects.To set initial position you also have to make a couple of registry entries. read the article on writing customized deskbands/toolbands etc at MIND.
HTH
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
Not a very elegant solution. I've actually found a better solution already:
Use OleRunInstance to start an instance of IE, this gives you access to an IWebbrowser2 object. On this object the method Show_toolbar can be called with which toolbars can be made visible (you can identify the toolbars with there GUID). This can be done once from the installer, after you've registered the toolbar-dll
Now to make the toolbar take up a whole new line. This needs to be done from within your toolbar. In the function ShowDW it is posiible to send a message to the tollbars parent (m_hWndParent) this parent is the rebarcontrol managing all the bands. Now armed with your Band ID (m_dwBandID) you can query your parent for your index (A REBAR control message) and with this index you can query the rebarcontrol for your rebar style and modify this style to als contain the flag RBBS_BREAK. This makes your toolbar to always take up a new line when it is switced from disabled to enabled.
|
|
|
|
|
I've been getting some questions about how exactly to get a toobar to display on a new line, so here is a codesnippet:
STDMETHODIMP CProclareBar::ShowDW(BOOL fShow)
{
//Here the rebarstyle RBBS_BREAK is set in the parent, so that the toolbar
// is always made completely visible when activated.
//first retrieve the index of the toolbar
int Index = SendMessage(m_hWndParent, RB_IDTOINDEX, m_dwBandID, 0);
if (Index != -1)
{
// fill a rbbi so that the current style is retrieved.
REBARBANDINFO rbbi;
rbbi.cbSize = sizeof(REBARBANDINFO);
rbbi.fMask = RBBIM_STYLE;
//retrieve the style
if (SendMessage(m_hWndParent, RB_GETBANDINFO, Index, (long)&rbbi))
{
//add the RBBS_BREAK style to the style
rbbi.fMask = RBBIM_STYLE;
rbbi.fStyle |= RBBS_BREAK;
//send the style to the parent.
long rc = SendMessage(m_hWndParent, RB_SETBANDINFO, Index, (long)&rbbi);
}
}
HRESULT hr = S_OK;
m_bShow = fShow;
ShowWindow(m_hWnd, m_bShow ? SW_SHOW : SW_HIDE);
return hr;
}
|
|
|
|
|
but the toolbar is not remaining visible after launching then IE ?
|
|
|
|
|
This makes the toolbar appear on a new line when it is made visible...
If you want the toolbar to start visible, you can use the the follwing functions from an installer:
//Runs an instance of Internet explorer and let's the pIE point to the Iwebbrowser2 interface
int RunIe( IWebBrowser2 *&pIE )
{
if (pIE == NULL) // Can only start one instance
{
CoInitialize( NULL );
// Create an instance of Internet Explorer
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER,
IID_IWebBrowser2, (void**)&pIE);
if (SUCCEEDED(hr))
{
// Make IE visible
pIE->put_Visible(VARIANT_TRUE);
return TRUE;
}
}
return FALSE;
}
// in: CLSID-string of a IE-Bar element (toolbar or toolband), and IWebBrowser interface
void ShowBandObject(IWebBrowser2 *pIE, WCHAR *pszBarCLSID, bool bShow = true)
{
// Show
VARIANT vtBandGUID;
VARIANT vtShow;
VARIANT vtNotUsed;
vtBandGUID.vt = VT_BSTR;
vtBandGUID.bstrVal = SysAllocString( pszBarCLSID );
vtShow.vt = VT_BOOL;
vtShow.boolVal = bShow;
vtNotUsed.vt = VT_INT;
vtNotUsed.intVal = 1;
HRESULT hr = pIE->ShowBrowserBar(&vtBandGUID, &vtShow, &vtNotUsed);
SysFreeString(vtBandGUID.bstrVal);
}
If you invoke these functions from another program, they will open IE and make the toolbar visible
|
|
|
|
|
I looked at how google is doign theirs (did you notice you can't tab to their search edit control). They package their DLL in a cab, download it, install it from the cab, then embed a webbrowser into the webpage using the GUID of the webbrowser. Then they call ShowBrowserBar() with the guid of their control. Then they close the window and open a new one with the toolbar already visible.
Now you can do it too.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
hi
i have created a toolbar menu with toolbuttons and popupmenus like ie's main menu
and when i need shortcuts like Alt+S and Ctrl+B
i used ie's main window proc hook to get keyboard input
and it worked.
now im looking for a better way which is less dangerous for ie
i saw TranslateAcceleratorIO in InputObject
i have no edit box or any other input object in my toolbar
so possible to get those input without them?
thanks in advance
Ozgur YASAR
Mikro YAZILIMEVi
Istanbul / Turkiye
|
|
|
|
|
You would need to create a hidden window and have it catch the TranslateAccelertatorIO information which it could then wrote to the correct actions on your toolbar and popup menus. Look at the MS KBbar.exe example in their Knowledgebase.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
I've just built my toolband(toolband.dll)
How do I to add it to IE?
Shin
|
|
|
|
|
Once you have it built and deployed, you have to run it against RegSrv32.exe to register it on the target system for IE to find it. If IE has already enumerated the toolbars and bands you may need to logoff and log back on or if you have a new version of IE you can set a registry key that IE will pickup and re-enumerate the listings without the need to logoff or kill the explorer windows.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Thanks
|
|
|
|
|
I have tried to add a button to the band.
Unfotunately the band is displayed without
any button.
I am listing below the method used in creating
the band and adding the button and would
appreciate it very much if
the reason(s) could be explained.
Thanks for your help
************************************************************************/
BOOL CToolBand::RegisterAndCreateWindow(void)
{
//If the window doesn't exist yet, create it now.
if(!m_hWnd)
{
//Can't create a child window without a parent.
if(!m_hwndParent)
{
return FALSE;
}
//If the window class has not been registered, then do so.
WNDCLASS wc;
if(!GetClassInfo(g_hInst, TB_CLASS_NAME, &wc))
{
ZeroMemory(&wc, sizeof(wc));
wc.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
wc.lpfnWndProc = (WNDPROC)WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = g_hInst;
wc.hIcon = NULL;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)CreateSolidBrush(RGB(192, 192, 192));
wc.lpszMenuName = NULL;
wc.lpszClassName = TB_CLASS_NAME;
if(!RegisterClass(&wc))
{
//If RegisterClass fails, CreateWindow below will fail.
}
}
RECT rc;
GetClientRect(m_hwndParent, &rc);
//Create the window. The WndProc will set m_hWnd.
CreateWindowEx( 0,
TB_CLASS_NAME,
NULL,
WS_CHILD | WS_CLIPSIBLINGS,// | WS_BORDER,
rc.left,
rc.top,
rc.right - rc.left,
rc.bottom - rc.top,
m_hwndParent,
NULL,
g_hInst,
(LPVOID)this);
}
SendMessage (m_hWnd, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0);
TBBUTTON tbb[1];
char szBuf[16];
int iCopy;
//add button string
LoadString(g_hInst, STD_COPY, szBuf, 16);
// Save room for second null terminator
szBuf[lstrlen(szBuf) + 1] = 0; // Double null terminate
iCopy = SendMessage(m_hWnd, TB_ADDSTRING, 0, (LPARAM) (LPSTR) szBuf);
// Fill TBBUTTON array
tbb[0].iBitmap = -1;
tbb[0].idCommand = STD_COPY;
tbb[0].fsState = TBSTATE_ENABLED;
tbb[0].fsStyle = TBSTYLE_BUTTON;
tbb[0].dwData = 0;
tbb[0].iString = iCopy;
SendMessage (m_hWnd, TB_ADDBUTTONS, (WPARAM) 1, (LPARAM) (LPTBBUTTON) &tbb);
SendMessage (m_hWnd, TB_AUTOSIZE, 0, 0);
return (NULL != m_hWnd);
}
================= END ========
|
|
|
|
|
Have you tried stepping through the code? Are you actually getting inside the first if block? I can't tell since I dont' know what the values of m_hWnd and m_hWndParent are. Also, g_hInst should be _Module.GetResourceInstance(). The other problem I see is that you have set the text for the button but not the image. Since text is not displayed except if some extended styles are set and a button style is set, the text that you have set will only show as a tooltip. Look at the BTNS_SHOWTEXT style below.
BTNS_SHOWTEXT Version 5.81. All buttons can have text, but only those buttons with the BTNS_SHOWTEXT button style will display it. This button style must be used with the TBSTYLE_LIST style, and the TBSTYLE_EX_MIXEDBUTTONS extended style. If you set text for buttons that do not have the BTNS_SHOWTEXT style, the toolbar control will automatically display it as a tooltip when the cursor hovers over the button. This feature allows your application to avoid handling the TBN_GETINFOTIP notification for the toolbar.
As a side note; Even though my example created from the wizard uses an api call to create a label, you can use the CWindow or CContainedWindow class to build up your toolbar.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|