|
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!".
|
|
|
|
|
|
|
1/ The article wasn't copied from that page!
My article was written 20th June 2007... The MSDN article says it was written on 30th July 2009.
2/ I found the information a little hard to gather initially...
3/ The original question you're in the thread of (how tangled is that!? ) answers your question of "why write this article". There were several related questions not long before I wrote it, and I could not see an appropriate resource on CP.
4/ I think my code is a little better wrapped up in a program than MSDN's.
5/ Maybe my other articles are more to your liking. I look forward to reading your more useful ones.
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/[ ^]
|
|
|
|
|
I want to write data in xls file programaticaaly how ??
Trioum
|
|
|
|
|
I never used this[^] before but...can it be any help?
> 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. <
|
|
|
|
|
Using C++? #import the Excel type library (as shown here[^]), then use the Excel object model to do whatever you want.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
Is there any way to store the output of CreateProcess("C:\\Windows\\System32\\cmd.exe", command, NULL, NULL, 0, 0, NULL, NULL, &si, &pi); .so that it can be stored in an array.Basically i want to say that if in command i put /K dir then it will show all the directories but i want to store that name of directories or whatever which is output in an array. Is it possible?
|
|
|
|
|
ravi 12 wrote: .Basically i want to say that if in command i put /K dir then it will show all the directories but i want to store that name of directories or whatever which is output in an array.
You can actually get the list of files/folders in a folder using the FindFirstFile(), FindNextFile() functions. The method of using "dir" command to get the list of file doesn't seems good.
|
|
|
|