|
When all of the dust settles, does it even matter when, or even if, he votes?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Not really that it matters, but IMO they should be thankful when they get help, but they don't do..
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Last time I checked, "thanks for answer" was being thankful. That in itself is all that's necessary to express thanks. Voting is nothing but extra.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Here's a Win95 compatible way of doing it:
DWORD dwAttrib = GetFileAttributes(psPath);
if(0xFFFFFFFF == dwAttrib)
dwAttrib = 0;
if(0 != (dwAttrib&FILE_ATTRIBUTE_DIRECTORY))
|
|
|
|
|
Hello,
thank you for help
regards
termal
|
|
|
|
|
Hi all,
I am writing one win32 Application using VC++.NET 2003. I am getting one wired error in my thread proc. I am creating one thread using CreateThread() function.
this->m_threadHwnd = CreateThread(NULL, 0, ThreadFunc, this, 0, NULL);
But when I am using Sleep() function in this ThreadFunc() it gives me error like “There is no source code available for the current location” . Sleep() function is working fine with other methods but not with ThreadFunc(). Can I know hoe can I solve this problem?
Thanks in advance,
Priyank
|
|
|
|
|
priyank_ldce wrote: “There is no source code available for the current location”.
Possibly, you are trying to step in to Sleep API while debugging, isn't it ?
|
|
|
|
|
Perhaps a little bit off topic, but it may solve your problem anyway...
The call to ::Sleep() should probably be removed.
When mentioning a sleep operation together with multithreading, chances are that the multithreading concept is not quite understood. Even the use of ::Sleep() is a warning sign itself.
Read about why ::Sleep() should be avoided here[^].
Read about how multithreading should be done here[^].
I humbly advise you to read the articles since they will prevent you from doing common mistakes that you will have a hard time tracking down later.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Excellent source material – I’ll try to remember it.
(You are forgive! for the VB phase)
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
John R. Shaw wrote: Excellent source material
Yep, Joe's entire site is quite a gold mine in my opinion.
John R. Shaw wrote: You are forgive! for the VB phase
Thanks John, it took me a little while to understand what you meant though.
I didn't expect anyone to actually read the bio.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: Yep, Joe's entire site is quite a gold mine in my opinion.
My best source of that kind of information is CP; meaning you and others on the boards.
Roger Stoltz wrote: Thanks John, it took me a little while to understand what you meant though.
I didn't expect anyone to actually read the bio.
VB was ok and VB.Net is much better, and we can use that. They are programmers, but it is what they do not know that bothers me.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hai,
Greetings of the day!. My doubt is how to update the data's present in the Listcontrol. I am having a List control in VC++ dialog based application, populated with some datas. As soon as i get a new data, the old data has to be updated with new one. Is there any way to solve to my problem. Please help with giving a sample program.
Regards
Jagan
|
|
|
|
|
Look at CListCtrl::Update and CListCtrl::RedrawItems
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Thanks Brahmma.
I will try with your suggession and let you know.
Regards
Jagan
|
|
|
|
|
First use
CListCtrl::DeleteAllItems()
then use
for(i=0; i < n; i++)
CListCtrl::InsertItem(i, 0);//row, column
then use
for(i=0; i < n; i++)
CListCtrl::SetItemText(i, 0, _T("hallo"));//row, column, value string
|
|
|
|
|
Ranjoy Guha wrote: First use
CListCtrl::DeleteAllItems()
You don't need to delete all items and redraw everything again. This is the worst way of doing it. CListCtrl::InsertItem is enough to insert new items.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Suppose previously there was 15 items
later there is 10 items
then the previous 5 will stay
|
|
|
|
|
Ranjoy Guha wrote: Suppose previously there was 15 items
later there is 10 items
then the previous 5 will stay
I don't understand what you tell. It is simple logic, you don't need to delete everything to add something new and display it.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Suppose There are different Criteria
1. Student: having Properties (Name, Class, Roll, Age)
2 Teacher: having Properties (Name, Degree, Designation)
And u need to update them depending on the selected Criteria(Student/Teacher)
Now if you dont perform DeleteAllItems then the List Control will keep on growing with each selection. Isn't It ?
|
|
|
|
|
The OP asked how to add new data and update the view. Link[^]
Now on what grounds do you ask someone to delete all items?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Ranjoy Guha wrote: then the previous 5 will stay
This is why DeleteAllItems() should be used. It's the two for loops that you had that were in question. The second one was unnecessary.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I use Visual Studio 2005
Are there a limitation of number of controls (for example CStatic) in same dialog.
I try to add a static in my dialog, i save but when i reopen my dialog in Visual Editor, i don't have my control added. Impossible to add a other controls.
Anybody know about it?
Thanks
|
|
|
|
|
Yes, but it's REALLY big.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
it seem limitation is 256 not very big
|
|
|
|