|
I want to write a program that comunicates with another on the same network. There are probably a couple ways to do this but i have no idea where to look up info on doing this. Im completly new to this so if there are any tutorals on thos or examples links would be apperciated
|
|
|
|
|
Search for "Beej's Guide to Network Programming" on google.. easily available online.. It is very good beginning resource for socket programming to communicate on network
hope that helps
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
For a quick tutorial on winsock, check out this site.
http://www.tangentsoft.net/wskfaq/
I highly recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.
Kuphryn
|
|
|
|
|
|
Hi all, ibe imported a bitmap to my app, and now i get the following warning:
Build : warning : failed to (or don't know how to)build 'D:\Code\FixDesp\vsp.bmp'
i imported the bitmap the "usual" way via the resource pane ->import... context menu option.
im using VC6 in a WTL7 project
any idea of what im doing wrong?
Thanks!
UPDATE:
ibe imported an icon, and i got another warning for it!
WTF??
|
|
|
|
|
Perhaps your file is a mis-named .bmp file ? perhaps it's a JPG or something like that ?
Try to open it with ms-paint and see what happens, same goes for the icon.
|
|
|
|
|
Thanks for your answer.
the bitmap is a "standard" .bmp file, same goes for the icon its a normal .ico file.
I just spent about 40 minutes triple-checking everything, and i have no clue as to what im i doing wrong, ibe imported bitmaps, icons, .wav files, and even custom resources tons of times before and i never had any trouble.
|
|
|
|
|
It's starting to soudn interesting
The next thing I'd try if I were you was to create a New Blank MFC App and throw the resources in there, see what happens.
If it works it means something is messed up with your current-project, so you can start comparing project settings.
If it doesn't work, well then either the bitmaps end up being corrupt or your VC is malfunctioning
|
|
|
|
|
This is weird!, i just created a new project, imported the exact same icon & bitmap and got no warnings at all, i compared every project setting (twice) and they are excacly the same!, yet i still get the same warnings on the original app!
as a side note, the original app works just fine (even with the warnings)
weird isnt it??
|
|
|
|
|
I used ODBC "dBase files" to access a file GSTAT.DBF, my code is the following :
DBName = GlobalDSN + "Gstat;UID=;PWD:";
ErrMsg = "";
res = "SELECT DATUM,CASHT,MCASHT,NETROOM,MNETROOM from GSTAT WHERE (DATUM = #08/01/2004#)";
gDB.OpenEx(DBName,CDatabase::noOdbcDialog);
TRY
{
rs.Open( CRecordset::forwardOnly, res );
NbRecord = rs.GetRecordCount();
}
CATCH(CDBException, e)
....
The problem is that it works perfecly on the 1061 first records, but it refuses to find me the records 1062-1068 (1068 being the last record in file)... and I wonder why ?
I thought that it could be due to a problem with MSjet 4.0 dll because mine is quite "old" (as far as I can see, my version 4.0.4431.3 is from SP5.
I downloaded the SP8 from MS, but when I was to install it, I receive a message from the installation program saying that my version is too old and that I should have at least the SP3 ... Once again, I don't know why
Any idea on 1st or 2nd of my problem will be appreciated
DD
|
|
|
|
|
ok, i have found my 1st problem ... it is due to the wrong date format I passed in the WHERE clause, it must me in the US format (MM/DD/YYYY) and I was giving it in french format (DD/MM/YYYY) ...
So, I don't need to upgrade the MSJet stuff
Nevertheless, I would like to know if anyone has an idea on the strange message displayed by the prog supposed to upgrade MSJet ...
Regards
DD
|
|
|
|
|
who knows a good way to compile .asm files (like microsoft did with files like "memset.asm")?
thx for your answers,
Alexander M.
Don't try it, just do it!
|
|
|
|
|
|
I've recently joined a project where the #includes are a little out of control. Changes in header files trigger compilation of unrelated source files. I've done a little reduction by hand, but it is only a drop in the proverbial bucket. Is there a utility out there that identifies redundant #includes in C++ projects?
|
|
|
|
|
|
please tell me, i want to know it very much... thanks!~
|
|
|
|
|
c++ is a programming language that uses object oriented paradigms.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Hey now. You can use object oriented paradigms with C++, as well as procedural and functional paradigms. It isn't necessarily OO, which is exactly what makes C++ great.
--
If there was a problem, Yo, I'll solve it!
Check out the hook while my DJ revolves it.
|
|
|
|
|
|
For a simple and nice intorduction to CPP, please refer the following link. Dont worry. its too simple. And you can find many simple tutorials about CPP for beginners in this site.
http://cprogramming.com/begin.html[^]
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
I'm trying to write a program that will retrieve a list of file names (under windows) from a folder (e.g - Atually tell me (or the program) what the folder contains).
When it has the list of names, I want the program to copy the respective files to a different folder and then rename them systematically (e.g - 1, 2, 3, 4, 5...etc).
Later on, I want the program to give the copied files the same names as their original files.
(The files will either be (.doc) or (.html))
I've pretty new to programming, and have read about file streams, but have only managed to find out how to work with them when I know the filename beforehand (e.g - "File.open ("Doc1.txt", ios::out); ").
I'd be grateful if anyone could help me out with this, or at least give me the title of a book that might explain things.
Hope you can help.
Thanks!
|
|
|
|
|
First, the file enumeration. You can use the MFC class CFileFind to enumerate a directory for files. You can extract each filename in question seperately from the object, there is a member function available that will return the filename of a matching file.
Using this filename, you open the file into a CFile object. Then, you construct and create a new CFile object to the target directory. After that, it is just reading from the first CFile stream and writing into the second one.
Alternatively, if you are not bound to platform-independency (that is, you can use system console commands), then you should consider using the system to copy files directly. For example, commanding system("copy *.* <target dir> ) would copy all files to the target directory on a Windows platform.
See the documentation for CFile and CFileFind. These MFC classes encapsulate the Win32 API concepts File and FileFind. Both MFC documentations have links to the respective Win32 ones if you are unable to use MFC.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I suggest taking a look at this API functions in your MSDN documentation
CopyFile()
MoveFile()
FindFirstFile()
FindNextFile()
FindClose()
you can go thru an entire directory (or even drive)with the Find functions, writte your own file-renaming alogarithm via CString manipulation routines (or just the good old strcat, strcpy, etc), and use MoveFile() and CopyFile() to rename / copy the files.
As a tip, i suggest using a recursive function to do the file ennumeration.
HTH.
|
|
|
|
|
I want to detect if an application on the desktop (other than my application) has fired up a file open or file save dialog?
In other words I want my application to receive an event when any application on the desktop causes a file open/save dialog to pop up.
Is this possible using hooks? If so then how?
Any suggestion would be greatly appreciated.
Thanks in Advance.
Regards,
Zahid
|
|
|
|
|
Install a WH_CBT hook and check the classname of every window created , if it matches the FileOpen Dialog's classname do ur stuff
Hope it helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|