|
Having read some material about toolbar part of MFC, I can't find how to implement the output window(the same as workspace window) in VC6.0, does it inherit from some CControlBar?I don't know how to add the triangle and close button beside it? does anybody know?
Thanks.
have a good day
|
|
|
|
|
WorkSpace Window and the output window are two different windows, the first one showing the class and file information and the second one showing the information regarddng the build,debug,find etc.
While Workspace window is implmented using property sheet ,and list controls .
Output Windows using a richedit control.
if you want more info u can use spy for it .
And i feel it should be derived from CDialogBar with the property sheets embedded in it .
Regards,
FarPointer
|
|
|
|
|
currently I have to convert it into the access 97 version. is there any way I can use it directly? e.g. is there any service pack or something like this?
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
|
this is exactly what I am looking for!
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
hey, working with winpcap and trying to create a dll, my source is working, except the compiler will not build my project because it is complaining about unreferenced identifiers, which are referenced in the wpcap.lib file. I added the lib to my files using project > add to project > files.. and that didn't work. I then tried adding the reference via ALt + F7 > link tab and that didn't work either. I am rather new to visual studio and am at a loss. What do I need to do to link the library to my project? thanks in advance.
nada
|
|
|
|
|
You do not add lib files to project, instead you have to add them to
project -> settings -> link tab. There should be something called additional libs. I don't remember what exactly it is called and I dont have vc 6.0.
-Saurabh
|
|
|
|
|
OK, I tried:
1. Project
2. Settings
3. Link Tab
4. Switched 'Category' to 'Input'
5. A Text field appeared with the name, 'Additional Library Path'
6. I typed the path: c:\mylibs
7. OK
Doesn't work. Repeat steps 1 - 6, but included the name of the lib with path. Clicked OK, and still not working.
Does it matter that I am writing a dll, because the lib works in the exe I wrote but not in the dll project. I didn't create the initial exe project, so I don't know how it was linked, I simply built off the example.
Anymore help, anyone? thanks in advance.
|
|
|
|
|
|
I've just recently tried that as well, however, that did not work either. I ahve no idea why not. I figure if I specfied the directory the lib is in and include it in the list, I should be able to use it in my project --that is not the case.
I absolutley NEED this lib to link up, otherwise my code is completly functionless. What else should I be doing? I looked at my exe project: the one that the lib is currently linked and working --I saw no reference to the lib in links. Instead, the lib was listed amongst the source, def, header, etc.. files. I have no idea how it was linked.
I am currently learning how to write dlls, and it would be a great help to get this working, so thank you thus far, any more ideas, and thanks in advance.
|
|
|
|
|
try #pragma comment(lib,_T("yourlibaray name"))
|
|
|
|
|
I put that in stdafx.h, right? Well, I tried it there and it said:
[quote]
Line (13) : warning C4083: expected 'string'; found identifier '_T'
[/quote]
...then I tried it in the main source file and it said the same. I have seen that suggested in other forums, do I need to put the path as well or just the name? Do I still need to add the references to the lib in the link tab or no? BTW, since I have read to use the pragma thing, I have tried it this way:
[quote]
#pragma comment( lib, "wpcap.lib")
[/quote]
...and that did not work as well. I thought the added _T() thing would be the solution. thanks anyway.. any more ideas from anyone? thanks
|
|
|
|
|
borono wrote: #pragma comment( lib, "wpcap.lib")
What is the exact error when you try using this? Can you copy and paste the output from the bottom of MSVC.
|
|
|
|
|
sure, here it is:
--------------------Configuration: test - Win32 Release--------------------
Compiling...
test.cpp
C:\test.cpp(24) : error C2065: 'pcap_findalldevs_ex' : undeclared identifier
C:\test.cpp(24) : error C2065: 'PCAP_SRC_IF_STRING' : undeclared identifier
Error executing cl.exe.
test.dll - 2 error(s), 0 warning(s)
thanks in advance
|
|
|
|
|
This is not a lib error, this error means you are trying to use a function which the compiler cannot find. Did you include the header file for winpcap
#include <pcap.h>
-- modified at 0:42 Sunday 2nd April, 2006
|
|
|
|
|
yes. I added it to the project via project > add to project > files... then in code as you have above. I looked in the header and the pcap_findalldevs_ex identifier is not listed, only pcap_findalldevs is, and neither is PCAP_SRC_IF_STRING.. those are identified in the wpcap.lib file. That is why I assumed the lib was not linked properly. I have the associated .dll for the lib, so it should work if linked properly, I assume. I must have screwed something up in the transition. It has to be in the way I am linking the header or lib. Assuming the header is present, the lib is linked via the links tab, what else could be the problem and/or possible soultion? I appreciate the help guys. thanks
|
|
|
|
|
borono wrote: those are identified in the wpcap.lib file
A defined function is only a function name, these will be in your header files and they tell the compiler that there is a function of that type, the linker then tries to find it.
A declared function is a function and all of it's code, this would be in a source file, or in your case a lib file.
The problem you are having is that the compiler doesn't know that the function exists.
Add this line directly before you include pcap.h #define HAVE_REMOTE
and let me know.
-- modified at 1:09 Sunday 2nd April, 2006
Another note, you can't find them in the header file because you are looking in the wrong one. Take a look in the remote-ext.h header file
|
|
|
|
|
I dont know if I did the equivalent. I did this and it compiled with no errors, just a minute ago.
1. Project
2. Settings
3. C/C++ tab
4. Change Settings For to All Configurations
5. Preprocessor Defintions add: HAVE_REMOTE
6. OK
I now have to figure out why the dll when called is crashing the app. At least I can start working on the code again, that was rather annoying to deal with, indeed. I will try to do it your way to see if that makes a difference at run time. I appreciate the help a lot, I might come back once I get a handle on this dll and actually start coding something. I will most likely have questions. haha
Anyway, I guess this is solved. Thanks again
best regards
|
|
|
|
|
borono wrote: I dont know if I did the equivalent.
There is no difference, they will both do the same thing
|
|
|
|
|
Hi Nish,
I was visiting your site recently and about the method of showing a message box after the main window is closed on an mfc app, i have 2 alternatives. (I decided to contact you here)
1) Removing the WM_QUIT message from the queue after dlg.DoModal() returns.
2) Calling AfxOleLockApp() at the beginning of InitInstance and then calling AfxOleUnlockApp() and AfxPostQuitMessage(0) when i really have to quit.
Best regards and great articles you have,
Mauro Leggieri.
-- modified at 4:45 Sunday 2nd April, 2006
|
|
|
|
|
Mauro Leggieri wrote: i have 2 alternatives. (I decided to contact you here)
How about contacting him directly? or Posting the question in related forum.
http://www.voidnish.com/ContactMe.aspx[^]
Got Signature?
|
|
|
|
|
Hi,
He wrote in his site to contact him by email or any can found him on codeproject's lounge and I was unsure if I post the message in other forum he would see it.
It was a simple choice and my intention was not to offend anyone.
Best regards, Mauro.
|
|
|
|
|
Is this shot priceless or what?
Young Nish
and cool Window Sizer app - I was looking for something like that for making consistently sized screencasts.
Montreal great Guy Lafleur, quoted by CBC on being mugged while vacationing recently in Buenos Aires: "I didn't have any time to react before I got a sucker-punch in the eye. It was like one of the players from the Bruins."
|
|
|
|
|
Hi!
I have got a dialog application that incorporates an openGL Window. When I call an AfxMessageBox my whole application just stalls when it is supposed to come up. Does anyone know why that would be? I am just using the normal command
AfxMessageBox("Errormessage");
Thanks in advance!
|
|
|
|
|
Its because AfxMessageBox creates a model dialog box, which is supposed to prevent interaction with application. I you want to be able to interact with application while a dialog is being showed look for modeless dialog in msdn.
-Saurabh
|
|
|
|