|
At the moment I'm trying to write an Office XP (specifically PowerPoint) add-in based on the excellent article by Amit Dey http://www.codeproject.com/com/outlookaddin.asp[^]
When I try to use the import directive to add MSO.DLL to the project I get the following linker error.
StdAfx.obj : fatal error LNK1179: invalid or corrupt file: duplicate comdat "_IID_CanvasShapes"
The build environment is VC6 SP5, with Office XP, SP1.
Any Ideas?
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Solved the problem, was missing an .olb file,
I think I'm just having one of those days after working out what I'd done I realised that I'd made a spelling mistake in the .rgs file
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I would like to create a COM object with all my ADO methods. I then would like to have Visual Basic pass a recordset pointer to my COM DLL. Is this possible? If so how would I go about it?
Thanks
|
|
|
|
|
I would like to create a COM object with all my ADO methods. I then would like to have Visual Basic pass a recordset pointer to my COM DLL. Is this possible? If so how would I go about it?
Thanks
|
|
|
|
|
Hi,
I am developing an application with Visual C++ 6.0.
In the Visual C++ IDE, I can run my application in debug mode.
However, I can't run it in release mode.
How can I correct this behavior ?
Thanks,
Claude
|
|
|
|
|
|
Hi,.
I have a Visual C++ 6.0 application. I have saved numerous files with this
application with the Doc/View architecture of MFC.
I want to add variables to save and retreive. I know that we can have
version number in the context of serialization with IMPLEMENT_SERIAL(CMyDoc,
CDocument, version).
Does it creates a problem to change DECLARE_DYNCREATE to DECLARE_SERIAL in
the CMyDoc ?
Thanks,
Claude
|
|
|
|
|
Gagnon Claude wrote:
Does it creates a problem to change DECLARE_DYNCREATE to DECLARE_SERIAL in
the CMyDoc ?
No, it should work just fine. DECLARE_SERIAL() incorporates DECLARE_DYNCREATE() plus serialisation.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I wish to have two different views of the document (in a MDI app) but with different menus for each view.
I basically want to use a class A and use it for different methods. Each method
would require a different view and different options - hence a new menu system.
I have two class extensions of the view and do AddDocTemplate for each new template.
However it only brings up the dialog to choose the view if the IDR menu resource is the
same.
When I use the same menu for each call to new CMultiDocTemplate it works as wanted
except that the menu is the same. I don't want to dynamically carve the menu at runtime
so there must be any easier way.
Does anyone know what I am doing wrong?
Regards,
flip
|
|
|
|
|
I've used a solution from an article on this site: http://www.codeproject.com/docview/replacingview.asp[^]. To change the menu as well, just call AfxGetMainWnd()->SetMenu(pMenu) .
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Thanks Ryan.
That worked. I just put
HMENU hMenu = ::LoadMenu(NULL,MAKEINTRESOURCE(IDR_MYNEWMENU));
::SetMenu(AfxGetMainWnd()->GetSafeHwnd(),hMenu);
::DrawMenuBar(AfxGetMainWnd()->GetSafeHwnd());
in OnInitialUpdate() in the (second) doc.
I just mistakenly thought that specifiying a unique view and a unique menu resource in an MDI app with document templates should work the way I intended.
|
|
|
|
|
flip wrote:
That worked
Good
flip wrote:
I just mistakenly thought that specifiying a unique view and a unique menu resource in an MDI app with document templates should work the way I intended
Unfortunately, it doesn't
Well I've never got it to work, anyway
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hello
I'm writing an application which needs to be run in Systray. This systray icon has a popup menu attached with it. The problem after activating that menu if I click on any other application or any other part of desktop the menu is not deactivated. It's only deactivated if I choose one of the menu elements. I'm using MFC dialogs and my class is subclassing CDialog. I'm creating invisible window in this class. I'm not able to solve this problem.
If anyone knows how to solve this problem please help me with an example.
anxiously waiting for reply
Thanks in advance
Hari.
|
|
|
|
|
|
This is documented in the MSDN docs. The solution is to set your hidden window to be the foreground window before calling TrackPopupMenu() and send a dummy message to your window afterwards:
SetForegroundWindow();
menu.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RIGHTBUTTON, point.x, point.y, this, NULL);
PostMessage(WM_NULL); Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
My Program is trying to open a file, I it comes back with a CFileException::sharingViolation, Is there any way i can find our the process that has the file open/locked?
|
|
|
|
|
|
Thank you, I Used this to work out what was holding the file open, But what i was hoping for was to be able to report from my program the PID of the Naughty Process.
|
|
|
|
|
|
IHTMLWindow3::get_screenLeft(),IHTMLWindow3::get_screenTop() and IHTMLElement2::getBoundingClientRect() seem promising, but i had difficulties to make them work with iframe elemens TIA
|
|
|
|
|
While creating my owner-drawn button class I encountered such a mmm... problem.
E.g. when you launch your app in Visual Studio you can press a button on the toolbar or Ctrl+F5. In the first case standard Windows buttons doesn't draw the focus rectangle untill you press the Tab button, but in second case they draw that damn rect.
How can I do the same.
|
|
|
|
|
I would like to be able to create a CFrameWnd derived class that doesn't need a toolbar. Right now I have a single doc/view architecture and if I remove IDR_MAINFRAME (default menu item), I get an error about not being able to create an empty document. How does one get rid of the toolbar?
Cheers,
Clint
|
|
|
|
|
One way would just be to hide it before the app becomes visible.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Your toolbar is a member variable inside your CFrameWnd-derived class. Just delete the variable and all references to it, and it won't be there.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
clintsinger wrote:
How does one get rid of the toolbar?
Go to CMainFrame::OnCreate() and remove the line that creates the toolbar.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|