|
They hide that information in the documentation[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: They hide that information in the documentation
Your sentence is acquainted for me
|
|
|
|
|
Sweet link. I would comment on that pages link to "Signal to Noise Ratio" pertaining to internet forums etc., related to CPs forums, but you can't comment on it without being hypocritical.
Reading the page further it gets interesting regarding the rules adopted by other forums banning the poor attitude of an RTFM or JFGI response. Perhaps I need to go read that occasionally to keep myself in line.
Last modified: 14mins after originally posted --
|
|
|
|
|
Thnx for help.
Now I am using the Function given in the MSDN to Show the tooltip on one of Button in my Dialog based Application.
As it doesnt give any Error it also not showing any tooltip.
If you know anything more about this Tool tip please Inform me.
|
|
|
|
|
Now I Include the things and use the Functio given in MSDN and BAM !!!. No Error ! . but there is no Tooltip too.
Can u tell me what is goint on.
I am Using Win2000 Pack 4.
is it supported in this.
|
|
|
|
|
Hi all,
When I select or deselect multiple items on ListView control, I will get a lot of LVN_ITEMCHANGED messages. The problem is, how do I get the last one only, or how do I know it is the last one? I want to modify my data after it stop changing. Thanks for your help.
|
|
|
|
|
Look for the one whose state is LVIS_SELECTED .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Do you mean the information in NM_LISTVIEW structure? I have monitored the messages. Some previous messages also have this state on, and the last one doesn't always has this state either.
|
|
|
|
|
hsuch wrote: Do you mean the information in NM_LISTVIEW structure?
Yes.
hsuch wrote: Some previous messages also have this state on...
Which indicates your list control does not have the LVS_SINGLESEL style.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes. It doesn't have the LVS_SINGLESEL style. That's why I think it is difficult to deal with.
Right now I use a timer. I set a timer when I get the first message, after a short delay, I start to draw my window or something. If I handle each change message, my window will keep flashing during the processing. So I want to handle just once or in the last message. I'm looking for a better way to know when I get the last message. Thanks for your help.
|
|
|
|
|
In regards to your "I want to modify my data after it stop changing" comment, if some number of seconds elapse between selection messages, how are you to know if the subsequent selection is the last of the first group or the beginning of the next group? In other words, what defines "stop changing?"
To get a better understanding of what you are trying to accomplish, what exactly are you doing with each selection in the list control?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I click one item in the list-view control, hold down shift key, click another item, then I can select the items between the first and the last one. After that, I draw selection lines in another window for those items to indicate they are selected. Because I know windows will produce a bundle of messages to notify this operation, I draw my window just once after these messages to get better performance.
"stop changing" ==> windows won't generate selection messages anymore for this operation
Depending on windows' behavior, if there are few seconds between the messages, it should be the next selection operation. I know it is the first of the next group since it comes after my last timer event.
|
|
|
|
|
hsuch wrote: I click one item in the list-view control, hold down shift key, click another item, then I can select the items between the first and the last one.
This is the default behavior for a multiselect list control. Why are you having to intervene?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Well, because my drawing function always draw all selected objects, even only one object changes the state. ><" I'm trying to decrease the overhead. My idea is to draw as less as possible.
I google around and find some solutions like to set a timer or to add the owner-draw style. Maybe that's the way to go.
|
|
|
|
|
Do you have an owner-drawn control?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Sorry, the owner-drawn style also generates a lot of messages. But the LVS_OWNDERDATA style always generates 3 messages each operation. I have improved my timer logic and it works fine right now. Thanks for your help.
|
|
|
|
|
So if you are not using an owner-drawn control, why are you having to draw anything selection-related? That is handled by the control itself.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
When i create a MFC DLL with Automation option selected, wizard creates some functions for me. For example DllGetClassObject, DllRegisterServer
If i add second com class to my dll, how must i change the CoGetClassObject, DllRegisterServer code?
I see all the sample codes are about one class in one dll. i dont know what must be done if i want to add more than one class.
Also i wonder this:
If one dll contains 3 com class, it means there are 3 servers in one dll?
|
|
|
|
|
It's hard to explain COM in a small book let a lone in a short post so the best thing I can do is say try it and see. Try creating 3 separate Dlls, one object in each with the wizard and see where the code is the same and where it's different and if you can combine them manually. Also the theory of COM is different from the implementation of COM objects within a framework like MFC or ATL. Framework implementation details like COM Maps can be very confusing if you don't already understand what they're trying to achieve.
Learning by fiddling has always been the best way to learn programming and not just because that's how I did it.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
How to set fontsize while printing??
|
|
|
|
|
Select the correct font into the Print-DC.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Did you try to set font on the DC ?
|
|
|
|
|
use CreateFont to create a font of the size you need
|
|
|
|
|
Hi everybody,
i create a RibbonMenu with dynamically added Buttons.
each Button gets a Command ID of WM_USER+100+i (i is incremented by i++)
Now the two questions:
Is there a Handler to catch an array of commands from WM_USER+101 till WM_USER+110 ?
The RibbonBar searches the command ID into the StringResource and uses the string as ButtonText
and Button-Tooltip
Is it possible to create dynamically a StringResource?
Big thanks for help !
|
|
|
|
|
baerten wrote: Command ID of WM_USER+100+i
Does it button ID, like IDOK, IDCANCEL, etc. ?
- NS -
|
|
|
|