|
It's very simple. Read file character by character and send this character to another PC by your serial interface. Another PC read these character and save them on a new file!
This article[^] has a sample demo for transferring files by Serial Port!
A. Riazi
|
|
|
|
|
Just sending characters is Ok for a simple application. To do it "properly" you need to use some protocol to prevent the loss of data, such as XMODEM, YMODEM, KERMIT etc.
I am sure you can easily find a freeware library for XMODEM or YMODEM, with these protocols you can also send the name of the file you are transfering, I can't rember if that one is XMODEM or YMODEM.
Happy hunting
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Hi,
how can i show a CFrameWnd derived class like a modal dialog box (launched from a dialog box)?
The CFrameWnd derived class has a view attached.
regards....
Hari Krishnan
|
|
|
|
|
Interesting. Try creating main frame via Create().
Kuphryn
|
|
|
|
|
hi,
here is the code to show on command click event of the parent dialog box
CMainFrame* pFrame = new CMainFrame;
// create and load the frame with its resources
pFrame->LoadFrame(IDR_MAINFRAME,
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
NULL);
pFrame->ShowWindow(SW_SHOW);
pFrame->UpdateWindow();
i want it here to be modal. Any other ideas ?
Hari Krishnan
|
|
|
|
|
Disable your top level window in the OnCreate of your "modal" frame, and re-enble it in the OnDestroy.
onwards and upwards...
|
|
|
|
|
2 questions about VC++:
first, when I close VC++ and then reopen an MFC project in VC++, my resources file is gone...where did it go. I clicked on the .dsw to open my workspace but the resource folder doesn't even show up.
second, I get the following message in my debug window:
"fatal error LNK1104: cannot open file "nafxcwd.lib""
It appears that my library is not linked properly, no? How do I remedy this problem?
tanks much, Dave
|
|
|
|
|
Hi,
I use OleCreateFromFile to create some ole bitmaps at the start of my program. This bitmaps are embeded in some richeditctrl's. The problem is the more bitmaps I have, the longer it takes for my program to load (because it reads the files from the disc).
I want to use OleCreatePictureIndirect which creates ole's from HBITMAPS that I can build from my resource bitmaps, reducing in this way the loading time. But I dont seem to get this function in vc7.0. Can you help me with this, please?
Thanks
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Hi friends,
I have create an SERVICE same as diiffernet service that run on WINDOWS.I want build the service in VC++ so any body plz help me out ,,how should i start for this
Thanks in anticipation
Deepak
|
|
|
|
|
|
|
I have run into the problem of not knowing which headers files I need to declare with functions I want to use. Is there a way in VC++ to determine which header goes with which function? Also, I would like to know what the hundreds of different standard windows functions do, is there a book or a website that could help me learn?
Thanks
|
|
|
|
|
If you know function name and want it's header file, simply press F1 (help) when you are on function!
MSDN will show you detail of function and it's header file and library.
A. Riazi
|
|
|
|
|
Hi all, does anyone know where I can download the source for the ScopeGuard classes from Andrei Alexandrescu's CUJ article? The code is no longer with the article... does anyone have a copy they could send me?
Thanks
|
|
|
|
|
Have you looked in the Code Archive.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
The url in the article works OK for me:
ftp://ftp.cuj.com/pub/2000/1812/alexandr.zip[^]
Email me if you still can't get it and I'll send you a copy.
Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live.
Awasu 1.0.5 (beta)[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
In an application, i paint the caption bar myself. And i come across one problem, how to get the size and position of Maximizebox ,Minimizebox? So i can leave them alone,just paint the spare area.
|
|
|
|
|
Call GetSystemMetrics() with SM_CXMENUSIZE and SM_CYMENUSIZE to get the width and height of these items. You can compute their position from the window's dimensions. You'll need to use SM_CXBORDER and SM_CYBORDER (i.e. passed as args to GetSystemMetrics() ) in your calculations.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i feel boring that in XP, the width and height of SM_CXMENUSIZE && SM_CYMENUSIZE is 18, but obviously the maximizebox and minimizebox are larger.
Here are some values got from GetSystemMetrics:
2000 ____________ XP
SM_CXICON 32 ____________ 32
SM_CYICON 32 ____________ 32
SM_CYMENUSIZE 18 ____________ 18
SM_CXSIZE 18 ____________ 25
SM_CYSIZE 18 ____________ 25
SM_CXSMICON 16 ____________ 16
SM_CXSMSIZE 12 ____________ 27
SM_CYCAPTION 19 ____________ 26
SM_CYSMCAPTION 16 ____________ 18
|
|
|
|
|
I've tried several ideas and so far nothing seems to work. I'm simply trying to add some code to keep a console 32 program open. This is the release version of the program being opened from Windows Explorer. I've tried _getch(); and even a while(!getch());
ANy ideas?
tanks
|
|
|
|
|
_getch() always worked for me. You must be doing something wrong. Posting some code that "doesn't work" would help. (is my depth of perception increasing?)
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
getch() usually does the trick. however, if there are any keys in the queue, it will see them, so you should use
while (kbhit()) getch();
getch();
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
I don't think so Toni...
Thanks Pete,will try
|
|
|
|
|
One important question: What happens when you are in the debugger? Does it make it to the _getch() statement?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|