|
I have opened and successfully read from a text file using CreateFile and ReadFile api's, but how can I close the file.
Thank you
|
|
|
|
|
CloseHandle
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Thank you for the information, much appreciated!
|
|
|
|
|
I assume you are developing in Win32. Use CloseHandle() to close the file.
The following is taken from the Win32 documentation for CreateFile() :
"Use the CloseHandle function to close an object handle returned by CreateFile."
Note that it is very important to call CloseHandle(). Otherwise, the handle table of your application will continue to grow and you will run out of memory in the long term.
After closing the handle, it is best to set the value of your handle variable to NULL so that you do not close the handle again. Closing a handle twice will raise an exception.
|
|
|
|
|
I am interested in using Windows SQL CE for skip pattern surveying and metric analysis of said data. I will need to drill down 4-8 query references in a PDA environment with speed being a very important issue (less than 1 sec lag between acceptance of option and drill down to next layer).
|
|
|
|
|
We'd like to add a simple search button to an internal web site. Does anyone have some c# code for this? Searching the web, I found a few perl implementations but none so far in c#.
thanks,
Bryan
|
|
|
|
|
Hi everyone,
I'm new to programming in C++ and have the following problem: I would like to Drawing lines (and other objects, ie squares, circles, etc) with OpenGL(like the Paint program in windows)with a MFC application.
I've created a MFC application that is linked to OpenGL. How do I created functions like the ones we see in the "Paint" program found in windows accesories?
For example, if I click on the menu which as a "draw lines" function and after clicking on that, I would like to use the mouse to draw lines, (line starts when the mouse is clicked and dragged. Then the line stops when mouse is released).
I'm having great difficulty doing this and if anyone can help it would be greatly appreciated.
Thank you in advance!
Steve
|
|
|
|
|
1. Override OnLeftMouseDwn
Store the position of the mouse when clicked, set a flag to tell that the left button is down,
2. Override OnMove
Store the position of the actual position of the mouse,
ask for redraw, (InvalidateRect(NULL,FALSE);
3. In OnDraw,
check if left button is down, if so, draw a line from initial position to actual position,
4. Override OnLeftMouseUp,
unset the flag.
This is the basic idea, of course you can refine the concept.
Jonathan de Halleux, Belgium.
|
|
|
|
|
I am looking for a "unmanaged" implementation of the .NET DataSet and its
associated objects that is written in Visual C++ (with source if possible).
I need an implementation that does not rely on the .NET FrameWork, yet is
compatible with the .NET DataSet's so I can share the XML form of the
DataSet between unmanaged clients (.NET is not installed on the clients) and
a .NET web service. We will be using the DataSet's as our universal
datapacket to pass data between the client and server.
I am trying to put off having to implement a solution myself in ATL so I am
doing some research first.
Thanks in advanced for any information or assistance.
Send Replies to jwilliams@paymetric.com
|
|
|
|
|
I would like to have a Window in one of my dialogs that just displays
text. I do not want the user to modify it. However, I would like to
have the freedom of formatting the text (e.g. bold, italic etc...) and
using different fonts.
I thought the easiest way of doing this was to use a RichEdit control
set to ReadOnly. This works OK, but it still has a cursor flashing
in the rich edit box when the user gives it focus.
I have seen that other applications can display text /graphics in this
way, but without the cursor flashing (e.g. MSDN Library). Does anyone
know how this can be done?
|
|
|
|
|
See http://codeproject.com/winhelp/myhelpdialog.asp.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
This sample code is very nice - but it still does not supress the cursor. Any ideas?
|
|
|
|
|
How can I get the memory address of a bitmap, for which I only have the handle. I am writing a very basic screen capture routine in C, and need the memory address to write the bitmap to a file.
Thanks,
SAK
|
|
|
|
|
Very often when building large project I also like to modify sources. What I want to have is the macro which builds project, but then checks if any files were changed since that build and if so - builds again, otherwise stops.
I hope this replacement for standard build command will help many people.
Thanks.
Igor Proskuriakov
|
|
|
|
|
i need you all help to help me
do my project in c++.
my project title is a generate graph using c++
thanks.
viect
|
|
|
|
|
Need help in opening & closing palm serial port?Thanks.
|
|
|
|
|
can we insert a text into a database without having a submit button
|
|
|
|
|
text has notthing to do with database , u do the insertion using objects which are ment to play with database
Text, however is used to collect informarion from form
;client side
P.S. PATWAL
|
|
|
|
|
Anyone know code for the food ordering through the ip phone.
Thank confused:
|
|
|
|
|
Hi there everyone
I recently have a project on developing an Interactive Location Determintion System using GSM/SMS.It involves the study on using PDA (Handspring Palm) to control the Wavecom GSM module and the possibiltiy of multiplexing its control between a GPS module and the WaveCom GSM module.
Well,i really have no idea on how to start.The main purpose now is write a program for Handspring Palm to send SMS to a module which in transmit the message to a mobile phone will do.I have to use the codewarrior software with c language and AT commands.If this is successful, the next step would be for the mobile phone to auto send back the location of the user.Its like a small tracking device.For the second part,my supervisor told me to think about how to modify the serial ports on the palm to be able to mutliplex between the 2modules i mention earlier.Can anyone out there please give my some hints on how to start this project.I would be better if someone who had done something similiar please share your program with me.Right now,i need the codes for sending SMS.The SMS program need not be a complicated one.I"am now more on a rush on the SMS part.
Please reply ASAP if any one can help.Thanks a lot.
Student here
|
|
|
|
|
Can someone provide c++ source code on how to find out the ip address of a host computer, just by knowing the host computer name.
|
|
|
|
|
Check out the gethostbyname() function.
--Mike--
http://home.inreach.com/mdunn/
Trillian: What are you supposed to do with a manically depressed robot?
Marvin: You think you've got problems. What are you supposed to do if you are a manically depressed robot?
|
|
|
|
|
I have an Epson TM-T88II point of sale printer that is attached to a cash drawer. I have managed to find the escape sequence that opens the cash drawer but I cannot find the escape sequence that causes the printer to cut the paper at the end of printing a document. Can anybody help me out?
Thanks in advance for any info you can provide.
Steve.
|
|
|
|
|
Hi,
I need to implement graphical diagram for our product.
Its use is for graphical representation of data binding between controls and between tiers (right term? I mean which client to which server.).
I have littl idea about this yet, and would be very grateful if there are any good free code for starting point.
And..the worst act for my scenario is..
1.Say, when user loads data from disk, I know connection data between diagrams (controls) but have no information about graphical representation.
Then how can I draw visual connection between diagrams without intersection?
And how can I decide the best-viewing to user? Any Ideas?
2.Without #1's answer,should I archive all graphical connections between diagrams?
If so, how can I archive connection line's data to disk?
I guess there should be "node" concept, but it's hard to "HOW".
So I'm searching the best fitting free code for fast and reliable development.
Any suggestion? Thanks a million.
Regards,
Ryan
|
|
|
|
|
does anyone have an idea how I can cause a mouse drag programaticly. What api function could do this? Any help would be most appreciated.
Thank you,
SAK
|
|
|
|