|
In a nutshell, it's a special interface for a COM object. To be automatable, the object should support the IDispatch interface. You can then automate (call functions, etc.) that object with another program, or a VB script, or what have you.
You can write these interefaces in a speical langauge (IDL I think it's called), and create a type library so that other programs can link to the COM object easier.
Just a fancy addition on top of COM.
No generalization is 100% true.
Not even this one.
|
|
|
|
|
i have a static library built with VC6. internally, it uses STL.
when i try to link that into a VS.Net project (an MFC project, not C# or anything), i get a set of linker errors relating to std::logic_error, std::length_error and std::out_of_range - all unresolved externals.
did MS make changes to these classes ? does this mean any static lib built with VC6 will not work in VC7, if it uses STL ? WTF ?
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Sure they did a lot of changes to the internals of STL containers as well as some of the interfaces (like the inclusion of standard-compliant allocators.) So one could expect this kind of problems.
That said, maybe the particular problems you have are minor and could be solved without having to recompile the lib. Could you post them in length? (if you please )
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
vhcLib error LNK2001: unresolved external symbol "public: __thiscall std::logic_error::logic_error(class std::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z)
vhcLib error LNK2001: unresolved external symbol "public: __thiscall std::logic_error::logic_error(class std::logic_error const &)" (??0logic_error@std@@QAE@ABV01@@Z)
vhcLib error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::out_of_range::out_of_range(class std::basic_string,class std::allocator > const &)" (__imp_??0out_of_range@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z) referenced in function "protected: void __thiscall std::vector >::_Xran(void)const " (?_Xran@?$vector@PAUCFileDataTag@@V?$allocator@PAUCFileDataTag@@@std@@@std@@IBEXXZ)
they're all unresolved externals in STL.
this really pisses me off. i already maintain 7 different VC6 builds of my libraries (a single DLL and then 6 static builds: release and debug of multi DLL, multi and single). i don't have the time to build and maintain another 7.
i guess i could write my own std::queue, std::string, etc..
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Yup, it is frustrating, but there is little MS can do about it. They can't make STL more compliant while still supporting the old broken STL.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I'm afraid you have no option but to rebuild your lib with VC++7.0. I've tought hard about possible workarounds but alas found none --maybe someone brighter can come up with a solution.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Dear All,
In a dialog-based application, i have an image list (with scrollbar). The images can be displayed in another window
when double click the image in image list. But, in another way, the image
is displayed by a timer function (time-code based) automatically. When a new image is shown in display area, I also want the image list to show same image (It seems that the scrollbar should be also updated automatically).
How should i do?
Thanks in Advance!
chen
xyz
|
|
|
|
|
Help me, I want Set my font for My Menu, how to write it in MFC???
thanks !!!
|
|
|
|
|
As far as I know, there's no other way to achieve this than ownerdrawing the menu, which is no easy task. Look around the net for Ownerdraw menu controls (For one I found ShuiGui Lu's Owner Drawn Menu With Free Color & Font.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Is there a way to remove the 'cancel' button from the property page? I've used the 'CPropertyPage::CancelToClose' method to disable the'cancel' button on the page. Is there a way to remove the 'cancel' button instead of disabling it?
Any help would be much appreciated.
Robert
|
|
|
|
|
You need to inherit a class from CPropertySheet and in your own OnInitDialog for it remove the Cancel button.
Heres an example of what I did in an app:
BOOL CMyPropertySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
CRect rect ;
GetDlgItem(IDCANCEL)->ShowWindow(SW_HIDE) ;
GetDlgItem(IDHELP)->GetWindowRect(&rect) ;
ScreenToClient(&rect) ;
GetDlgItem(IDOK)->MoveWindow(&rect) ;
GetDlgItem(IDHELP)->ShowWindow(SW_HIDE) ;
return bResult;
}
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
The cancel button does not belong in the property pages, but rather in the enclosing property shhet. From there, you can get to the button with GetDlgItem(IDCANCEL) , and hide it with ShowWindow .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Can anyone tell me if MFC provides any support for converting a file format, say, Microsoft Word Document format into TIFF format or atleast into raw data stream . I am told that most file formats have ActiveX event libraries which provide the interfaces to the file format. But i am still not very clear on this. If somebody could throw some light on this.
Acer
|
|
|
|
|
no, it doesn't. you can use some of the system COM stuff to read a few image formats (there are plenty of articles here on how to do that).
you'll find many image file format readers, but i'd be very surprised if you found any .Doc reading components.
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Thanx Chris,
So how is it possible that certain applications convert any file format into TIFF format. More specifically , i thought that for any given file format it should be possible to retrieve the raw data stream. Can u tell me more about file format conversions.
PS: I found image file format readers as u said. But my interest lies in Text based files.
Acer
|
|
|
|
|
Acer wrote:
So how is it possible that certain applications convert any file format into TIFF format
read it, render it, output as TIFF.
the format for .Doc files i not public knowledge - MS doesn't publish the specs. so, there are few apps that even attempt to read .Docs. part of the reason is that, even if you know the data format, writing the code to display the document as Word would is just about the same as writing Word itself - no small task.
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Thanx again,
If u could be a little more elaborate abt that line
"read it, render it, output as TIFF".
I didnt really get this.
Acer
|
|
|
|
|
1) read it - this is where you read the input data.
2) render it - draw it in some context (maybe on-screen, maybe in memory, maybe to a DIB, whatever). this is where you interpret the data and make a visual representation.
for .Doc files, this is the hard part because you would have to write code to handle all of the things that Word can do (tables, formatting, effects, columns, etc.). for something like a photoshop file, this is where you take all the layers, paths and blending options and combine them to form the final image. for 3d packages, this is where you read all of the object shapes, shading, colors, motions, etc. and render them using the 3d engine.
3) output as TIFF. take whatever you drew in step 2, convert it to a form that your TIFF writer understands and output it.
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
Thanx a lot Chris..
I'll look into this and get back to u if i have more queries..
Acer
|
|
|
|
|
Have you considered asking that the Word files be saved as Rich-Text-Format (.rtf), which you could read quite easily using RichEdit controls, including all the formatting and embedded objects. If anyone is creating Word compatible documents, there is a good chance they creating them using Rich-Text-Format, which I believe is a publicly available format. (my guess)
Gaulles
|
|
|
|
|
StarOffice on Linux generates Microsoft Office compatible .DOC files.
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
writing is much easier than reading because you can always stick to a known subset of features. reading requires that you handle any number of features (none of which are documented, in the case of .Doc files)
-c
There ain't no second chance
Against the thing with the forty eyes
|
|
|
|
|
If i write a program in UNMANAGED VC++ 7.0 using ATL 7.0 and\or MFC 7.0, do I have to install the .Net framework or can I just supply the required ATL\MFC DLL's to the users machine?
Is installing the framework just for Microsoft's CLR?
|
|
|
|
|
You only need the framework for Managed C++ and for VB.NET and C#. Your ATL and MFC code will run without the framework, you'll just need to distribute the new DLLs.
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
My Shortcut Keys are not shown on the main menu. I've put in the '&' before the relevant letter, but the letter is not underlined.
If I use the shortcut it does work, and strangely if there is a sub menu (like 'Alt+F' for File) then the shortcuts do appear on that and the main menu until I go back to just the 'normal' main menu, then the shortcuts have gone again.
I'm sure its something stupid I have done, but I cannot think what.
Any ideas?
ali p
|
|
|
|