|
yes, you are correct! i'll cry, how can i do, it can't communicate between process, but i need this character
|
|
|
|
|
Here is some code I used with a low-level key hook to attach my thread input to the ones of the other
process. I used it in combination with ToUnicodeEx to get the displayed char. But I don't think this will solve your problem but I would give it a try.
Attach:
DWORD dwThreadWindow = GetWindowThreadProcessId(pVirtualLLKeyBoard->GetMessageWnd(), NULL);
DWORD dwThreadForeWin = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
BOOL bAttach = FALSE;
BOOL bAttached = FALSE;
if(dwThreadWindow != dwThreadForeWin)
{
if(dwThreadForeWin != 0)
bAttach = TRUE;
}
if(bAttach)
bAttached = AttachThreadInput(dwThreadForeWin, dwThreadWindow, TRUE);
"pVirtualLLKeyBoard->GetMessageWnd()" is the window of my app.
Detach:
if((bAttach)&&(bAttached))
AttachThreadInput(dwThreadForeWin, dwThreadWindow, FALSE);
After you got the hWnd from the other process, I would try to attach your thread to the window owning thread of the external application. On exit just detach it.
Greetings
Covean
|
|
|
|
|
|
Does it really work?
Greetings
Covean
|
|
|
|
|
i didn't try, but i create a parent window in the same process, it works!
|
|
|
|
|
Thanks for your reply this is nice to know!
Greetings
Covean
|
|
|
|
|
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
|
|
|
|