|
Dear Joe,
I am ashamed and deeply embarrassed by my earlier post. It was meant to be sarcastic joke. But I forgot to mark it as joke
In fact if your read the content, it does not make sense. There is no way using your code as is to enter any book title, nor is it possible to exit the loop. I was amused by your code, and thought I throw a joke, but that went south.
Oh, well, better I modify the post before I throw other people off the cliff.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Are you kidding? You made me laugh. (My reply may have fallen flat; it's what the professor should say to the student.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
modified on Sunday, March 29, 2009 9:21 PM
|
|
|
|
|
|
Hi all,
I have a report view type ListCtrl.here i m inserted number of items.
i m created a button remove to remove list items.
i m select multiple items from list than click on remove button.
than all selected ites are not delete.
i m using this::
for (int n=0;n < m_List.GetItemCount();n++)
{
if(m_List.GetItemState(n, LVIS_SELECTED) == LVIS_SELECTED)
{
m_List.DeleteItem(n);
}
}
please help me for this thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Of course: if you remove a specific item in your list, all items that follow will have another index (one lower). For instance if you remove the first item (index=0), then the index of the second item will change from 1 to 0 (because it become the first one).
You should reverse your loop: start from the end of the list to the begining.
|
|
|
|
|
But why all (not some) selected ites are not deleted?
|
|
|
|
|
Thanks its works.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
As another poster pointed out, when you delete an item it alters the indices of all the items that follow. For example, after item 0 is deleted what used to be item 1 is now item 0. Try modifying your code as follows:
for (int n=0;n < m_List.GetItemCount(); )
{
if(m_List.GetItemState(n, LVIS_SELECTED) == LVIS_SELECTED)
{
m_List.DeleteItem(n);
}
else
{
++n;
}
}
Even better, as the other poster indicated, go backwards and the problem goes away without the need for the above complications.
Steve
|
|
|
|
|
Hi,
im using Ccheckboxlist..and suppose im adding items to Ccheckboxlist as follows....
test
tester
testing
All
and later i want to change the position of "All" to first ie
All
test
tester
testing
Pls help me regarding the same....
|
|
|
|
|
I'd suggest you would delete item 3 from the list (the indices are zero-based) and insert a new item. Look at the DeleteString and InsertString methods.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
It's logically correct to do either of the 2 things.
Either make the list sorted.
Or add the items in the required order.
In this particular case, you should insert "All" at index 0.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi friends,
How can I use the MSChart Control in a MFC. I have problems with finding a way to put the data in the Chart control. I have stored my data both the data for the x axis and y axis in the access database. How to get the data from the database and then plot the graph in MS chart in MFC.
Quick reply is appreciated
Thanks a heap...
|
|
|
|
|
Hi friends,
How can I insert time information to the access database.I am working in MFC. Pl. help me how to insert time to access database.
Is there any format for insertion????
Quick reply is appreciated....
Thanks a heap...
|
|
|
|
|
How are you interfacing to the database? What's the data type of the relevant column in the database table?
Using (for example) OLE DB with an Access table containing a Date/Time typed field, you interface via a rowset that will have a member variable of type DATE, rather than a string.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
how to make the dialog transparent but the control is not transparent?
|
|
|
|
|
Could you explain a bit more what you mean?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Do none of the transparent[^] dialog[^] articles[^] on CodeProject help? Or couldn't you see them (they are transparent, after all).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Use setlayeredwindow() api
|
|
|
|
|
I have got three 2D images about the height of one object int three different angle of view. Now, I want to transform the three images with Rotation matrix into one global reference frame. But I don't
know how to do with the datas in the overlap area of three different angle of view's images with C/C++.
|
|
|
|
|
It sounds to me like you need to extrude each of the images in the plane of the image, then perform intersection operations[^] to shape the object?
Can you use a package like Blender or somehting to do that rather than writing your own? Alternatively, there are several libraries that will help you do that[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I do some optical measurement in 3D recently. I really don't know how to rotate and splice the datas
in 3D space with the C.
|
|
|
|
|
How to find others tray icon from task bar?
I want to track my application tray icon from another application.
Consider outlook express tray icon it will be display only the time of new message arrival.
Like that My application will display tray icon for some time. At that time i have to do some operation from
another application. For that how can I track that whether tray icon is displayed or not?
So please help me
|
|
|
|
|
I don't think you can track whether a tray icon is visible or not.
Even if you could, there are so many better ways to send messages between processes.
Look at Interprocess Communications[^] and Interprocess Synchronization[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
See if this article is of help to you:
Shell Tray Info[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Why am I not able to handle WM_KEYDOWN on a dialog? Pretranslate is the only way? Also what's the reason the event is not getting dispatched to the dialog?
|
|
|
|