|
If the class has some pure virtual functions in it, then it means that you have to make a class that inherits from it and provide the methods which are missing.
Now, the fact that this class comes from a dll means that the class has to be exported. And importing a class from a dll works only with implicit loading, which means you must have an import lib file with the dll.
Now, on the other hand if the full code of the class resides only in the header file, then the fact that it is a dll doesn't change anything. You simply include the header file in your code and create a class that inherits from that class. But of course, this will only be useful if the dll provides a way to "register" your class with the rest of the code of the dll.
|
|
|
|
|
You got an unsatisfactory answer, because you posted an unsatisfactory question. Being a programmer (you're posting here, after all), you should expect the same stimulus will get the same response...
What is the gap in your knowledge that needs filling in?
Are you happy with inheritance, and abstract member functions?
Can you make a classic DLL? If not, there are articles here on codeproject that can help, as well as lots of help on the MSDN pages.
If you can export a function from a DLL, exporting a class is not much harder. Underneath, it just ends up being a bunch of ugly-named [*] exported functions anyway.
If you can do that, then just mark some abstract, or =0 as appropriate:
class CMyClass
{
public:
void MyMemberFunction () = 0;
...
};
In the executable or dll that loads your dll, the programmer will have to inherit from your abstract class before they can use it - but that's true even if all the classes are in the same module.
I might be expecting too much - maybe you're only marking your member functions as virtual, in which case you have no problems at all.
Your name is John, so I assume that English is your first language. If I'm wrong, and John is a nom-de-pleume, than I half apologise if I've used a bit too much complex english here!
Good luck,
Iain.
[*] Name decoration.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Hi all,
Im having .avi format files...how to transcode it using ffmpeg??
Any idea??
|
|
|
|
|
I assume you mean programatically, take a look at DirectShow[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Yes I need programatically.
Actually,I have written Mpeg4,mjpeg,h264 files into AVI container using AVIStreamWrite()..
(VFW.H).
Now,i want to transcode this AVI container format to mp4 container.
I have seen that ffmpeg tool is used for this purpose.
can u give me an example code??
Thanx.
|
|
|
|
|
I'm sorry, i misunderstood you, i thought you "simply" wanted to make mpegs of avi files, it didn't get to me that you explicitly want to use ffmpeg, i never used ffmpeg so i have no experience/examples whatsoever for it. Sorry...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
Hi all.
I want listen to a telephone line via a modem programmatically and save transferred data over it to a file.
How can I do this?
Could you, please help me.
Thanks a'lot.
|
|
|
|
|
Please do not post the same question in more than one forum; select one and stick to it.
It's time for a new signature.
|
|
|
|
|
hi friends,
i am using visual studio 2008...
when i am using VS2008 Editor its working fine...
when i am going run from Debug or release folder exe application is running...functionality is not working...
please help any body....
|
|
|
|
|
Member 3653751 wrote: .functionality is not working...
What does this mean? We have no way of guessing what you are referring to here. Does your code compile successfully, do you get an error, exception, system crash ... ?
It's time for a new signature.
|
|
|
|
|
hi
if i am running from exe its not working...
|
|
|
|
|
And you still believe I can guess what's wrong?
It's time for a new signature.
|
|
|
|
|
Member 3653751 wrote: its not working...
WHAT DOES "IT'S NOT WORKING" MEAN?
|
|
|
|
|
|
My guess is that he compiled/linked his application fine but it didn't work on other computers... applications developed using VC2008 would most likely require .NET framework to run, make sure your clients have .NET framework installed on their own machines.
|
|
|
|
|
Hi
how to transfer datas from one form to another form in sdi application..
I am using splitter window type application for my project.
and is ther any way to trigger an button click event...
Regard
Gany
|
|
|
|
|
In general, the forms in your SDI application should represent some part of your model (the document class). In general, you should avoid direct "comunication" between two forms but one form should update the document which in turn notifies all the views that its state has been updated. The other views can then request the new state of the document and update themselves.
On the other hand, if you really need direct access between the two forms, then this simply resolves to OOP: you just past the instance of one form to the instance of the other form. But if possible, you should avoid this solution.
|
|
|
|
|
you should disconnect data (and its processing) and view. Than you show the data in the views, and handle the "data changed" message to show actual data.
It gives you flexibility to change you GUI later
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
How to load swf from resources? any tutorial or steps ?
There are functions to load icon and dll but what to do with swf.
Is it possible?
|
|
|
|
|
You can get a resource into memory (as if you'd read it from a file) like this:
std::vector<BYTE> LoadFileFromResource(HINSTANCE hmodResource, LPCTSTR name, LPCTSTR type)
{
if (!type)
type = ::PathFindExtension(name) + 1;
HRSRC rsrcFile = ::FindResource(hmodResource, name, type);
if (!rsrcFile) return std::vector<BYTE>();
HGLOBAL gblFile = ::LoadResource(hmodResource, rsrcFile);
if (!gblFile) return std::vector<BYTE>();
DWORD sizeFile = ::SizeofResource(hmodResource, rsrcFile);
if (!sizeFile) return std::vector<BYTE>();
LPVOID filePointer = ::LockResource(gblFile);
if (filePointer)
{
return std::vector<BYTE> contents((BYTE*)filePointer, sizeFile);
::FreeResource(gblFile);
return contents;
}
return return std::vector<BYTE>();
}
I take a copy of it here, to make resource management easier, but you don't have to do that...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
YOu can also use the res://[^] protocol, which basically gives you an URI for the resource element.
|
|
|
|
|
Hello folks!
I have a few layered windows which use per-pixel alpha of 32 bit bitmaps to display graphics. I use WindowFromPoint and TrackMouseEvent (which probably uses WindowFromPoint also somewhere along the way of its processing but that's just a guess) to know when the mouse points at these windows. Now, here comes the catch, WindowFromPoint takes the alpha channel of layered windows into acount (also TrackMouseEvent does this when listening for mouse-leave events), so when the given point (e.g: mouse position) is above a transparent pixel of the window then it will ignore the window. This is very good that way 99.9% of the time. However, i would need WindowFromPoint and TrackMouseEvent to handle my layered windows as if they were not layered windows, so they were normal, everyday, non-transparent rectnagular windows. Is this trick possible somehow? I know i could just forget about these methods and try to write my own implementations, enumerating windows, checking Z-orders and so on to try and find the "pointed" window, but it is probably quite a hassle to implement and would probably turn up a lot of "i didn't think of this" cases when it fails.
Thanks in advance for any comments, ideas, answers.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
Hey, thanks for the suggestion, however, my layered windows are popup windows, not child windows (as far as i know you can't have layered child windows at all), and i believe the CWP_SKIPTRANSPARENT flag of ChildWindowFromPointEx refers to the WS_EX_TRANSPARENT window style rather than any transparent pixels in the window. Correct me if i am wrong.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|