|
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
|
|
|
|
|
|
You can find your answer in MSDN.
|
|
|
|
|
I need code urgently. Pls help.
|
|
|
|
|
ratprita wrote: I need code urgently.
BTW: its a quite simple task and you're a developer, aren't you? The documentation is your best friend.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
ratprita wrote: I need code urgently.
Then why not go and look for it? It's all here[^].
|
|
|
|
|
Yes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
you are fullfilling most conditions of bad questioning in forums.
tip: listbox <-> string <-> file
Do your homework by reading the docs (aka RTFM)
SCNR
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
A list box or an edit box? A list box is not some sort of a "text container" that you can dump text into. So, you'll have to do a bit of work (parse entries and add it to the list box).
I'm sure all those functions are documented and there are plenty of examples out there. Not to mention if you're using MFC, things will be easier.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
wangningyu wrote: you can use struct.
That is about as useful as telling him to use butter and cheese.
|
|
|
|
|
At least your suggestion leads to a sandwich. Mmmm, food...
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Michael Schubert wrote: That is about as useful as telling him to use butter and cheese.
I guess butter & cheese are more useful.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi to All,
Here is a question i came across , but could not find an answer,Could anyone please tell me the reason
output of the line
printf("%d %d %d",++i,i++,++i);
according to me it should be 3,1,1 (since, when the control comes to the third(right to left)incrementation ,the value of i is 2,...and since its a preincrement, it should give a result 3...and at last since printf is based on stack....results will pop out like 3,1,1....
But its showing 2, 1, 1
also when I tried with
printf("%d %d %d",++i,i,++i);
it still shows 2, 1, 1
why so?
-----------------------------
I am a beginner
|
|
|
|
|
It may depend on the compiler. Besides, there should not be more than one expression like "++i" or "--i" in a statement.
|
|
|
|
|
The compiler is at liberty to evaluate those arguments in any order it wants. Which means you can't rely on the results of statements like that. Which means don't do it. Never try and fight against the compiler - it's too hard and ain't worth it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Just additionally to what others told you:
I assume i at the beginning is zero.
So if it comes to the first "part" (right to left), ++i will make it 1, then there's the second part which is simply i so it remaints 1 and then it comes to the third part, ++i again which will increase i to 2, thus 2,1,1.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
correct, but what about the other statement
printf("%d %d %d",++i,i++,++i);
whcih also gives the same result
using VC++6
-----------------------------
I am a beginner
|
|
|
|
|
Is i equal to 3 after printf ? If so, then i'd say, i++ is executed after printf finished.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
What is the function used when USB Storage Device removed? When we click on safely remove hardware it remove the USB Storage Device .I want to know that function .Actually i want to do is whenerver i remove USB Storage Device from WindowsXP it will show a message box as "your Device is safely removed" like Windows Vista.i know that how to write a code for the message box but i don't know the code which is used when USB Storage Device is removed.
I simply want to say that how to code a program for USB Storage Device, which can show a messagebox when USB Storage Device is removed?
|
|
|
|
|
|
Thanks for the shout out for that article. I wrote it after seeing one too many of these questions.
You've made my day by using for the intended purpose. "I don't have to give you an answer - go look at this!".
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: "I don't have to give you an answer - go look at this!".
|
|
|
|
|
|