|
Dear
you can not Access the not static member of Class.
whether you have to create the object of class
|
|
|
|
|
ashukasama wrote: you can not Access the not static member of Class.
I think you might have mentioned "can not Access the not static member of Class with scope resolution operator". Am I right?
Best Regards,
Suman
|
|
|
|
|
|
I have a class drived from CTreeCtrl,I add OnContextMenu function to it and ON_WM_CONTEXTMENU() macro to it.but when I use such class,the function would not correspend for my right mouse right-clicked.
Why? and how should I resolve it?
GOOD LUCK
|
|
|
|
|
will you post your code
, one who can see what is exact problem
|
|
|
|
|
The codes is such simple,
If I delete all the code from OnContextMenu(),but using a AfxMessageBox() instead.The messagebox remain couldn't be reach!
|
|
|
|
|
Dear
if you post your code , one can solve the problem.
|
|
|
|
|
for example, the picture:
http://www.codeproject.com/Feature/VBInterop/VBExpress_70.JPG
I am a jackaroo in network programming,so "The simplest,the best!"
I think the best way to learn the protocal is writing the simplest console programme, If you have any advise or source code or article to show me,that's the best present to me.
Thank you very much!
zyshan
|
|
|
|
|
try "URLDownloadToFile" which is part of the shell API.
You have to include "Urlmon.h" and "Urlmon.lib" !
See MSDN for further details...
|
|
|
|
|
The SourceInsight 3.5 sort items in it`s relation window, so that i can`t get the order to function be called in source code ! How can i avoid it???
|
|
|
|
|
Hello everyone!
I gave up trying to convert my CPP files to CPP/H files...
The problem is this. I regularly use GCC for C++ coding, but I'm on Vista and that compiler doesn't work correctly on it. So I'll use Visual Studio instead.
But Visual Studio seems to compile each CPP file into its own object file and then link them all together, so I get a lot of undefined references... Is there any way to just compile index.cpp (my main file, where all other CPP files are called from)?
Thanks!
Windows Calculator told me I will die at 28.
|
|
|
|
|
It's not really an answer to your question, as I don't know how to do it, but you might give a try in the compiler / linker options. Might be able to customize the build rules for your project.
Anyways, shouldn't you have used .h files in the first place ? They do serve a purpose :P
|
|
|
|
|
Lord Kixdemp wrote: But Visual Studio seems to compile each CPP file into its own object file
That is normal (for every compiler I’ve used), as each file represents a separate unit. Undefined references are a different problem all together.
If you want a single object file, then use the #include syntax to include all the ‘.cpp’ files in a file called “index.cpp” and then only include that file in the project. Of course this is not normal and you may not have enough memory to do it, but it should work.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
OK, since everyone seems to be against not using header files, I gave it another try.
This time it worked. Thanks everyone!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Old UNIX guy trying to learn some new tricks!
I am attempting to port some UNIX code to Visual C++.
I have found some code snippets, but need some high-level info. such as, in Windows speak, what am I looking for?
Can anyone point me to:
- Methods to do Async I/O on IP sockets? I use poll() or select() in UNIX.
- Does Windows have an equivalent of hostid()?
- What is the Windows equiv. of signals?
Any suggestions on good books would be appreciated, especially those geared to porting UNIX to Visual C++.
Thanks,
Dan
|
|
|
|
|
|
|
Did you see that price they're asking for "Network Programming for Microsoft Windows, Second Edition (Paperback)"?
1 new & used $499.00
Makes me feel much better about the $49.00 I dished out for a new one way back when and the $7.00 I paid for a home copy at 1/2 price books recently.
(And people thought I was crazy when I went on a book buying binge right before all the good books disappeared)
Good list by the way.
|
|
|
|
|
bob16972 wrote: 1 new & used $499.00
I think I have a copy - I didn't know it was worth its weight in gold!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I noticed they still haven't made you a CodeProject MVP yet (You definitely qualify IMO). I clicked your profile to see if you broke the 5,000 message barrier yet and I noticed your looking a bit, well, er... different?
|
|
|
|
|
Thanks. I haven't been here long. Alot of the regulars have been here YEARS! I try to
help and at the same time I learn new stuff all the time. It's cool to me to see many solutions
to similar problems.
The filet-o-fish pic is from a running joke with led mike here at code project. Sadly I don't
have a copy of the original quote that started it all!
Cheers
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
In addition to Nemanja's great link...
*EDIT* and Hanz's links (sorry man, I was typing while you<br />
were posting - I'm slow :))!
For sockets, there's several methods for asynchronous I/O -
select()
overlapped I/O
I/O on separate threads
IOCompletion ports
A good reference for all things Winsock is Windows Sockets 2[^]
I'm not sure about hostid(), but if it's the MAC address of the network adapter on the machine,
one way you can get that info is using the IP Helper API GetAdaptersInfo()[^]
For reference material to all things Windows, the Platform SDKs have a wealth of information.
Here's the link for Windows versions through Windows Server 2003 SP1 -
Windows® Server 2003 SP1 Platform SDK Web Install[^]
Mark
-- modified at 19:50 Friday 8th June, 2007
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Using Visual C++ 6.0
I need my app to scan (with wildcard) files on another Workgroup computer on the LAN.
Network Neighborhood finds and reads the other computer's drive just fine.
I am unclear about the syntax to use to see the other computer's drive.
The other computer's "name" is: Music1
Music1 shares it's c drive as: Music1_C
I have placed a text file, a.txt at the c drive root of Music1.
I have tried to get _findfirst() to see it - to no avail.
None of these work:
\\Music1\c:\a.txt
\\Music1\c$\a.txt
Music1_c\a.txt
Interestingly, the only one of these that work from the Windows command line is:
\\music1\c$\a.txt
Any help is much appreciated.
Robert
|
|
|
|
|
This form should work:
\\computername\sharename\pathrelativetoshare\filenameorwildcards
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks Mark,
My big "whoops" was that I was searching for \nul rather than
*.* or some exact filename. the \nul is an old DOS
technique to search for the nul file in a directory, which
means you are just looking for the existance of the directory
itself.
Again thanks, it all works now
Yup, mnay years programming in DOS .... will be 59 next month.
All the best,
Robert
|
|
|
|