|
Hi,
MFC CListctrl flickers when i delete all the items and reload the list control at a frequency of 1 second. I am using .DeleteAllItems() method to delete all the items and .InsertItem() method to insert the items one by one. I am using a timer at a frequency of 1 second to delete and reload my CListCtrl.
So everytime it come across the DeleteAllItems() method, it shows a large flickering on the dialog window contains the CListCtrl.
Please suggest me any method to reload all the items without any flickering.
|
|
|
|
|
m_List.SetRedraw(FALSE);
m_List.SetRedraw(TRUE);
m_List.Invalidate();
m_List.UpdateWindow();
|
|
|
|
|
Thank you very much LunaticFringe for the above method. That worked for me.
Regards and Thanks
|
|
|
|
|
Hi All,
While building the COM DLL i am getting these three linking errors:-
1. error LNK2001: unresolved external symbol "public: virtual long __stdcall CScriptObject::QueryInterface(struct _GUID const &,void * *)" (?QueryInterface@CScriptObject@@UAGJABU_GUID@@PAPAX@Z) ScriptObject.obj
2. error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CScriptObject::AddRef(void)" (?AddRef@CScriptObject@@UAGKXZ)ScriptObject.obj
3.error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CScriptObject::Release(void)" (?Release@CScriptObject@@UAGKXZ)ScriptObject.obj
Please provide me some suggestions.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
|
Hi Rajesh,
Yes is an ATL COM DLL.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Are you overriding default AddRef, Release and QueryInterface implementations?
|
|
|
|
|
Yes Rajesh i was doing the same, but after removing these functions now i didnt get linking error.
But now only i have created one client and importing the dll, but when i am trying to use methoda ( mylib:: ) i am not getting any methods, so can you please tell me what changes i should make in my dll.
thanks for your support.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Hai all,
i am using leadtool13 in my application ,and i am facing some problem in that,i have loaded five image in image viewer . i started to draw markups in first image ,without relesing left mouse button(without completing markups on that page) i am going into next page by pressing shotcut keys(like page down key) then my application is crasing.
can anyone tell me where that problem would be. Anyone who used the leadtool can u please check this Scenario and let me know pls.
how can i solve this crasing issue.
thanks in advance.
mahe
|
|
|
|
|
if i select the segment of one edit content, its background color is blue, how can i make it transparent?
you can figure it if you drag mouse over my question, it arise blue background, how can i avoid it?
|
|
|
|
|
By using something like a custom edit control, possibly? That's one which you pretty much write yourself...
The blue selection thing is kind of built into the standard controls - and into the standard Windows UX. How are you going to indicate a selection?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
If you are using MFC, then you can try subclassing the editbox and call SetSel(-1, 0) in its OnMouseMove() handler.
|
|
|
|
|
i use windows api, not mfc.
|
|
|
|
|
In that case you can handle WM_MOUSEMOVE message for your editbox and in the handler you can send EM_SETSEL to the editbox with wParam = -1 and lParam = 0
|
|
|
|
|
if i do just like your way, it'll lose selection area, won't it?
i still want the select effect of draging operation
|
|
|
|
|
Yes you are correct. In this case entire selection will be lost. May be you can think about using a transparent layered window to show selection rectangle.
|
|
|
|
|
|
It is possible to do by changing behavior of the control.
What do you mean by i still want the select effect of draging operation?
Just saved selection beginning and ending positions?
Your requirement however, will hide the selection and that would be frustrating for users.
JohnCz
MS C++ MVP
|
|
|
|
|
yes, you are right, i still want the information ofselection begining and ending positions
|
|
|
|
|
OK, as I have stated, as many other functionality changes it is possible but it is against Windows standard.
Is an edit control you are using a multiline or single line? Do you know how to subclass window, because you will have use subclassing ti begin with.
JohnCz
MS C++ MVP
|
|
|
|
|
i have known subclass window, and my edit control is multiline
|
|
|
|
|
Rejeesh.T.S:
How window can receive mouse messages from a control? It does not. If you want to handle control’s messages, you have to subclass it.
JohnCz
MS C++ MVP
modified on Friday, November 27, 2009 3:24 AM
|
|
|
|
|
How window can receive mouse messages from a control? It does not. If you want to handle control’s messages, you have to subclass it.
JohnCz
MS C++ MVP
|
|
|
|
|
CODE:
int k = 35;
printf( "%d %d %d", k == 35, k = 50, k > 40 );
When i compiled same code in Turbo C++ then its giving output as:
0 50 0
and in Microsoft VC++ its giving output as:
0 50 1
Can anyone tell me why there is difference in outputs when i change the compiler?
Thanks
Nilesh
http://nnhamane.googlepages.com/
|
|
|
|
|
Different compilers might -and will- interpret the code differently, don't be surprised at this because either some compilers follow standards, some don't, ot they interpret them differently, or the standard itself does not specify every possible aspect of a given problem so the guys making the compiler are free to handle it as they see fit. Based on your code sniplet, i'd say that the Turbo C version will "run" from right to left, so:
k > 40 -> 0, since k is at this point 35 which is less than 40
k = 50 -> 50, since k is 50
k == 35 -> 0, sinke k is 50 which is not 35
While the MS compiler is probably doing it in this order:
k = 50 -> 50, makes k 50 at first
k == 35 -> 0, since k is 50, not 35
k > 40 -> 1 since k is 50 which is greater than 40
There might be other explanations too i guess.
> 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. <
|
|
|
|