|
A callback function is one whose pointer you give to an object or function, and it gets called by the other object or function when a certain condition arises.
For example, the SetTimer() Win32 API function can take a pointer to a function that gets called when the timer period elapses. The function that you pass to SetTimer and gets called is the callback function.
A slightly different example is used with the EnumFontFamilies() function. You pass a pointer to a callback function, and the callback function gets called once for every font that matches the criteria specified in the call to EnumFontFamiles() . In this case, the callback function is called as many times as needed before the EnumFontFamilies() function returns, as opposed to SetTimer() above, where the callback function is called sometime in the future.
Hope this explains it more
Ryan "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"
|
|
|
|
|
Yes that covers it thanks.
|
|
|
|
|
You're welcome
Ryan "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 have an application and want to add a simple HTML editor to it.
All I need is to allow the user to use bold, underline and italics to standard text - no scripts, activeX etc.
IHTMLView is a bit bulky for my needs and developing from scratch is not an option right now.
Does anyone know of an implementation that I could use, either free or for purchase (preferably free of course).
thanks,
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|
|
Forgot to mention: VC++ 6.0
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|
|
What type of application do you have ?
if it is MDI, you could use two views of your document, one scrollview for editing, associated to a HTMLView for previewing.
~RaGE();
|
|
|
|
|
Hello,
I'm also looking for a WYSIWYG HTML editor : bold, underline... Very simple. Java does include such a component in its SWING package.
My solution would be to use an ActiveX control but I can't find any. I'm not an ActiveX control but Web components should work fine for a desktop application, am I right ?
Actually I just found : XEditor (120$ !) at http://download.com.com/3000-2403-10184818.html?tag=lst-0-25
Google search for : ActiveX HTML Editor
http://www.itwriting.com/htmleditor/index.php (in C#) : I have no idea how he did it, he used the MS HTML engine !
codeproject search for : MSHTML
http://www.codeproject.com/dotnet/mfchtmledit.asp?target=mshtml
User comments : http://www.azsoft.free.fr/HtmlEdit/HTMLEdit.VC6.zip
I think that last link is the solution to our problem. Check out the demo it's perfect : bold, underline...
JM. Molina
|
|
|
|
|
When I compile a program, I get a C1083 error message saying that my header could not be found. I checked out the MSDN site and it said I'm missing the C run-time library. How might I resolve this?
Thanks
VC++ 6.0
|
|
|
|
|
Missing the CRT library? More likely, your #include directives are wrong, (like using #include <myheader.h> instead of #include "myheader.h") or you haven't set up the include directories correctly (in VC6, that's Tools... Options... Directories, or for your project: Project... Settings... C/C++... Category: Preprocessor)
|
|
|
|
|
I've created and added my own header to the project. Why do I need the CRT library at all? I only am using one header file, the one I added.
#include "LinkedList.h"
I'm stuck on this one.
VC++ 6.0
|
|
|
|
|
CRT is the C runtime library. It includes the standard C functions, such as printf, strcpy, etc...
Which header can't it open, though? Post the full text of the error message. I still find it rather difficult to believe it's the CRT that causes this.
|
|
|
|
|
I'm still trying to learn the VC++ 6.0 compiler, it's more challenging than C++ itself. Anywho, I lost my code somehow. I'll see if I can recreate the C1083 error.
Thanks,
Dave
|
|
|
|
|
I am writing a DLL and I have to use the function OpenDriver() to open a DLL,but it fail.is it forbided to open a dll in another dll??.how can i do?thanks a lot.
a good man
|
|
|
|
|
Use LoadLibrary() , same as an application
Ryan "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"
|
|
|
|
|
but if i use the loadlibrary(),i find i can't make it work
properly ,even in a application
a good man in china
|
|
|
|
|
Why doesn't it work? I've never had any problems using LoadLibrary() in a DLL or an application. Is the DLL located in the windows system directory or in the PATH?
Ryan "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"
|
|
|
|
|
i am doing the SDK programing. there is a sample appliaction in the SDK.the SDK document tell us to use the
OpenDriver() to open a dll (Impeg32.dll)before we can use the API listed in the document,and it’s simple application does so ,and it is ok,but now my task is to write a dll.
and i have try to use the LoadLibrary() instead the OpenDriver in it's simple application ,but it can work properly.
a good man in china
|
|
|
|
|
Ok. It makes sense now . You're trying to open a device driver, not a simple DLL like I though you meant. Sorry about that
I haven't actually used had to use OpenDriver() , so I can't help much, but there's nothing that suggests it wouldn't work from inside a DLL. In fact, now I think of it, it should work no problem at all - gdi32.dll must use it to load the display device drivers.
Does the driver you're using actually exist on the computer?
Are you passing the correct registry entry (or DLL file name) as the first parameter?
Are you passing NULL as the second parameter?
Are you passing a valid value for the third parameter? Some drivers may fail to load if this value is incorrect.
That's about all I can think of at the moment
Ryan "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"
|
|
|
|
|
yes,i had passed the correct registry entry (or DLL file name) as the first parameter.but why to pass NULL as the
second? In fact ,i only try to rewrite the simple application to a dll.when i step to debug the dll,i found the problem is that OpenDriver() fail ,but i hadn't changed the argument the former application use
a good man in china
|
|
|
|
|
gdzfy wrote:
yes,i had passed the correct registry entry (or DLL file name) as the first parameter.but why to pass NULL as the
second?
The second parameter tells Windows which registry key the registry key in the first parameter is located in. If you pass NULL, is uses the default: Drivers32 . If you pass in the DLL file name for the first parameter, then the second parameter is ignored.
gdzfy wrote:
In fact ,i only try to rewrite the simple application to a dll.when i step to debug the dll,i found the problem is that OpenDriver() fail ,but i hadn't changed the argument the former application use
So the application worked, and you copied the code exactly, but now it doesn't work?
Ryan "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"
|
|
|
|
|
yes ,the application works well ,but my dll don't.I copy the
code exactly and only change few .
that is this line:
hReelDrv=(HDRVR)OpenDriver(L"reeldrv",L"Drivers32",0L);
another thing:the code file is *.c but i change it to
*.cpp.
thanks a lot!!
a good man in china
|
|
|
|
|
Ok, I can't actually help much more, but couple of things you could try:
Try creating a completely blank Win32 app from scratch (ie. with just a WinMain() function) and add only this line to it. Does it work? If not, then there's something else in the other application that causes it to work.
If it does work, do exactly the same thing but create a blank DLL and add this line in DllMain() and see if it works. If it does, then there's something in your DLL that is causing it not to work.
If the clean app works, but the clean DLL does not, then it doesn't look like your going to have much success, unless there's another API function you have to call first to get drivers to work in DLLs (I don't think there is, but I'm not an expert on drivers)
If the app doesn't work, then look in the sample app for something else that might cause it to work (I have no idea what, but something might).
That's about all I can offer. Perhaps someone else can help more
Ryan "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"
|
|
|
|
|
well,thank you very much!
a good man in china
|
|
|
|
|
I am trying to send data between to sockets. Initially I am trying to send an array of short ints (fourteen to be exact) and on the receiving end use another array of short ints to hold the data. Unfortunately this doesn't seem to be working for me. When I use a string for a buffer on the receiving end just to see if anything is coming through I get nothing. Is this attempt of mine futile, and would a struct with fourteen member varialbes be able to fix this problem?
|
|
|
|
|
What is the size of the data received via WSARecv() or recv() in bytes?
Kuphryn
|
|
|
|