|
That sounds great. I've had reasonable success using the built in Windows Forms and such based on the tutorial at:
http://www.codeproject.com/csharp/dotnetbandobjects.asp?target=custom%7Cinternet%7Cexplorer%7Ctoolbar
(for anyone else looking to implement a toolbar in .NET)
|
|
|
|
|
Hi,
I didn't follow Erik's recipe for a deskband, but it is essentially the same dish. I used Visual C++ 6, but i am getting following error when compiled with VS7. Any ideas?
I have a smartpointer typedef on ATL::CComQIPtr<iinputobjectsite>.
Thanks
Rao
Beginning make of tasklink on: Wed Mar 31 16:32:27 EST 2004
Compiling out-of-date source files [BandObj.cpp tasklink.cpp]
BandObj.cpp
c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcomcli.h(471) : error C2787: 'IInputObjectSite' : no GUID has been associated with this object
c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcomcli.h(495) : error C2955: 'ATL::CComQIPtr' : use of class template requires template argument list
c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcomcli.h(503) : see declaration of 'ATL::CComQIPtr'
l:\source\app_src\tasklink\tasklink\BandObj.h(94) : see reference to class template instantiation 'ATL::CComQIPtr<t>' being compiled
with
[
T=IInputObjectSite
]
tasklink.cpp
c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcomcli.h(471) : error C2787: 'IInputObjectSite' : no GUID has been associated with this object
c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcomcli.h(495) : error C2955: 'ATL::CComQIPtr' : use of class template requires template argument list
c:/Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlcomcli.h(503) : see declaration of 'ATL::CComQIPtr'
l:\source\app_src\tasklink\tasklink\BandObj.h(94) : see reference to class template instantiation 'ATL::CComQIPtr<t>' being compiled
with
[
T=IInputObjectSite
]
Generating Code...
|
|
|
|
|
Problem Fixed! Here is Erik's fix:
Rao,
In your STDAFX.H file replace the standard system includes with the following relative paths to where you installed your VS.NET environment.
//#include <shlguid.h>
//#include <shlobj.h>
#include "C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ShlGUID.h"
#include "C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ShlObj.h"
// needed for IInputObject and _bstr_t
//#include <comdef.h>
#include "C:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ComDef.h"
Then it will compile.
-Erik
|
|
|
|
|
How to change the caption of toolbar on running!
thank you!
|
|
|
|
|
You have to notify the toolbar that you want to change the caption. You can do that as follows:
IInputObjectSite* pSite = NULL;
m_pBand->GetSite( IID_IInputObjectSite, (void **)&pSite );
IOleCommandTarget* pCmdTarget = NULL;
HRESULT hr = pSite->QueryInterface(IID_IOleCommandTarget, (LPVOID*)&pCmdTarget);
if (SUCCEEDED(hr))
{
pCmdTarget->Exec( &CGID_DeskBand, DBID_BANDINFOCHANGED, NULL, NULL, NULL );
pCmdTarget->Release();
}
This will call your GetBandInfo function where you can set the caption on DESKBANDINFO.
Hope this helps.
|
|
|
|
|
hi, any have idea of launch from button one application like outlook express, try to navigate and function ok, but with c:\\.... not.
tanks,
|
|
|
|
|
I have created single IE Toolbar with an ATL Object Wizard.
Please show me how correct add buttons on this toolbar?
I try to do that
I attempted:
BOOL CVGBand::RegisterAndCreateWindow()
{
RECT rect;
::GetClientRect(m_hWndParent, &rect);
HWND m_hWndChild = ::CreateWindow(
TEXT("STATIC"),
NULL,
WS_CHILD,
rect.left, rect.top,
rect.right - rect.left,
rect.bottom - rect.top,
m_hWndParent,
NULL,
NULL,
NULL);
TBBUTTON tbb[] =
{
STD_FILEOPEN, 0, TBSTATE_ENABLED, TBSTYLE_BUTTON,0, 0, 0, 0,
STD_FILESAVE, 1, TBSTATE_ENABLED, TBSTYLE_BUTTON,0, 0, 0, 0,
STD_FILENEW, 2, TBSTATE_ENABLED, TBSTYLE_BUTTON,0, 0, 0, 0
};
TBADDBITMAP tbbitmap = { HINST_COMMCTRL, IDB_STD_SMALL_COLOR };
rect;
::GetClientRect(m_hWndChild, &rect);
m_hWnd = ::CreateWindowEx(0,
TOOLBARCLASSNAME,
(LPSTR)NULL,
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | CCS_TOP | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT | CCS_NODIVIDER,
rect.left, rect.top,
rect.right - rect.left,
rect.bottom - rect.top,
m_hWndChild,
(HMENU)IDC_PANEL,
NULL,
0);
ToolBar_ButtonStructSize(m_hWnd);
ToolBar_AddBitmap(m_hWnd, 1, &tbbitmap);
ToolBar_AddButtons(m_hWnd, 3, &tbb);
return ::IsWindow(m_hWnd);
}
|
|
|
|
|
How to create transparetn toolbar?
|
|
|
|
|
Hi all,
Would you help me, I am finding away to add more menu item into menu popup in existed application such as: Outlook , Explorer...
for example:
In outlook Express application, at contact lists, select one member and then you right click, the pop up open, but there are some ready menu items, How can I add one more my menu item into this menu pop up, and how can we handle it.
Thank you for your help.
David,
|
|
|
|
|
I made toolbar for IE and it works, althugh I am beginner (dummy ). But what about Opera ? I can't find any info about Opera Toolbars. Only custom buttons and sidebars.
Any help ?
|
|
|
|
|
I use the MFC standard method to create a toolbar ,but it don't send the message of WM_COMMAND when i press the button .why?
|
|
|
|
|
Hi, First I want to say to Eric that your wizards have saved me a tremendous amount of time - as I implement toolbars all the time. So thank you!
My question is for anybody. I cannot seem to get variable size buttons within the toolbar. Lets say the I have an image list for button "A", and that button width is "X". Then I have an image list for button "B" and that button width is "Y". My toolbar buttons take the width of the greatest sized button. No matter what I do - it seems not to work. Am I doing something wrong? Is there a setting that I am not setting correctly? I think it is me! I have searched MSDN and cannot find anything about variable sized buttons.
any help would be appreciated.
Thank you.
Tom Lee
|
|
|
|
|
I have tried doing this with the child CToolBarCtrl of the deskband, but it did not work. However, when I put TWO CToolBarCtrl into the deskband... well, you guessed it!;)
|
|
|
|
|
I want to get some event from IE
How can I get the title and url to show on my toolband ?
|
|
|
|
|
Even i would like to know about this,Erik can you please guide us how to go about this,
can we use AfxConnectionAdvise create an event sink and trap the event?
thanks
-raj;)
|
|
|
|
|
Hi,
I have downloaded and installed the RBDeskBand wizard. Then I generated a new ATL project and opened the Insert | New ATL Object dialog. I selected the RadBytes category. There was just one entry there called DeskBand (no icon). I selected it and clicked Next, and I got the following error message:
"Sorry! An error occured while generating the project".
Running VC++ 6.0 latest SP.
--Patrick Philippot
|
|
|
|
|
Also, I'm unable to recompile since the source files package seems to be missing a lot of files. Or should I reconstruct a wizard project manually?
Thanks.
--Patrick Philippot
|
|
|
|
|
Forget it. Sorry. Templates files where missing in my template folder.
--Patrick Philippot
|
|
|
|
|
I am also having this prob...how did u solve this one?
|
|
|
|
|
You must be in a ATL COM AppWizard Project only.
FILE>NEW>Select ATL COM AppWizard from the list view
|
|
|
|
|
Like Windows and Unix(and variants) all newer programming languages suffer from internal BLOAT. The programming skills of computer pioneers, writing vast programs in 8K of memory, sh*t all over modern programmers. For example - the space probes dont have 256MB RAM and a 60GB HDD. Newer trends are RAM/HDD are cheap - fill them up! And this is reinforced by the newer editions of commercial programming languages which bloat software. Why should I write a program that runs at a snails pace and takes 5MB when I can make it fly for 600kB??
|
|
|
|
|
I suppose your retired now there is not much call for assembler programmers, except for embedded systems and Operating System and device driver program?
Horses for courses my friend:
If you#re doing the above, then I would choose assembler/C.
If you're writting a word process I would choose C++.
If you're writting a Stock control system I would choose C#.
;P;P
Normski. - the next bit of code is self modifying ... jmp 0xCODE
|
|
|
|
|
agree. Write viruses or do hacking using assembler/C if you are too free during leisure.
|
|
|
|
|
Well, I've programmed C, C++ (Win32, MFC), Delphi, Java, Visual Basic, C#. I can tell that assembler (for Windows, called Win32 Assembler) is the best programming language to build small, very eficient programs. But it's not easy and is only capable of building some kind of programs. I've never seen a COM+ component built in Assembler, but I've seen a good utility program in Win32 Assembler.
What I mean is that each programming language is good at certain aspects:
- C is for DOS applications.
- C++ Win32 is for very effective and high speed performance programs (my favorite).
- C++ MFC is for those who wants to build easy programs at high capable programming language.
- Delphi is the best programming language to build high scalable programs. Good for learning programming. It's not so speedy, but it runs well on nowadays systems.
- Java is for cross-plataform applications. Not speedy.
- Visual Basic is good for COM+. Not speedy.
- C# is good for dummies.
|
|
|
|
|