|
I thought about it and used it already. But there is a problem:
Some times another window cause this window to loose capture, while mouse is still in the rectangle, like TaskManager.
It'll cause to ambiguity about current state, however I can remember a message from a window showing loosing focus.
Thanks for reminding me. I'll check that out.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: Some times another window cause this window to loose capture,
In this case you will get the WM_CAPTURECHANGED message.
|
|
|
|
|
That's the message I was talking about.
Got my 5, thanks.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: I thought about hooking to mouse LBDown and doing a PtInRect check to see if it is in my window, but I'm not familiar with hooking. Is there any other way or I shall learn that?
You are right about the LBDown. To know if it is inside your window why don't you get the handler for your dialog and use .GetWindowRect() to obtain the left, right, top and bottom variables.
Then inside the LBDown use those 4 variables and compare it with the CPoint parameter of LBDown.
|
|
|
|
|
and I have to write an OnLButtonDown for all childs, windows, etc!
No, there are better ways. Any way thanks for your effort.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
In addition to Naveen.R's comments...
Since you are going to create a menu similar to standard menu, you shuold have to manage the keys also. Am I right? If so I shall tell you some tricks
- NS -
|
|
|
|
|
NS17 wrote: a menu similar to standard menu,
It's in fact an addition to an EditBox to simulate autocomplete. The real data will be fetched using a query and the list should be filled with the result of the query. Unfortunately all auto complete controls here have a predefined list of texts and find a text that start with exact same prefixes. But I can't add all say 200,000 records in an OnInit() . Further than that it's not an interesting search.
I'm designing a live search box(like the one in Vista). A menu-like control that pops, shows a list of items, does not interfere with user typing text, and shows a different set of items on each change event in the edit control, it also has the ability to have a number (PK of the record in my project) assigned to each normal text.
I am not yet managing keyboard, but you are right. However if I need anything more than the following, I would be very happy to hear?
Something like:
BOOL CHToolMenu::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN)
{
}
return CWnd::PreTranslateMessage(pMsg);
}
Thank you so much. Your help is appreciated.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Ok.. I thought it is replacement the standard menu.
But if you need to handle the keyboard, your code sample might not work, since the focus is in the edit box.
- NS -
|
|
|
|
|
Thanks.
NS17 wrote: your code sample might not work, since the focus is in the edit box
Doh! Your right. I had to add this to edit box and pass the control to my menu first, then give back the control or continue processing key. I have to think more about the whole process.
Thank you anyway. If I need any help, I'll consider asking you first, if you don't mind.;P
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: If I need any help, I'll consider asking you first, if you don't mind.
That is not needed...
- NS -
|
|
|
|
|
Of course it is. Everyone might need help one day.;) specially a beginner programmer like me.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Done! but no need to shout like that actually
By the way, is this a new rule? I never did this already.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
does upper case alphabets means shout?
if it is like that, please tell me, i shall modify the content to lower case or delete it.
by the way,
it is not a new rule,
it is only a new standard (convention), just to show gratitude towards the guru who has solved it, and also to differentiate between solved and the not.
gud luck and thanks.
|
|
|
|
|
chandu004 wrote: does upper case alphabets means shout?
I think so. I read somewhere that in internet communities or chat rooms, uppercase = shouting! so a little bit impolite.
I didn't give that message a 1, but I think the reason for that uni-vote is exactly this.
chandu004 wrote: it is only a new standard...
Nice idea, and would be better to suggest it in the suggestion forum to add an icon for that type of message, for example. I also give a 5 to the true answers both to express my thanks and also the red text describes a true answer to other members.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
thanks for information about the uppercase letters.
actually,
i was not aware of hte caps lock on.
and however,
i have posted it in suggestions forum 3 days ago and i got good reply.
i request you also to suggest those who get their problems solved.
thank u.
|
|
|
|
|
Hi Freinds,
I have third party dll and header file. Can I do static linking of this dll? Can I generate entire library file out of this third party dll?
|
|
|
|
|
No, you need to have the source files and recompiled them as a static library. There is no way to statically link to a dll (or even generate a static lib without the source files).
|
|
|
|
|
But logically it has to be possible, right?
- NS -
|
|
|
|
|
Hi,
It is said that using the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Policies\System\DisableTaskMgr
we can disable Task Manager for all users of a computer.
Refere to :http://www.pctools.com/guides/registry/detail/163/.
As I test it, in both Win2k and WinXp, its not true. The registry key is only effective if used with HKEY_CURENT_USER, not with HKEY_LOCAL_MACHINE.
Can anybody help me with that, plz?
Plz, remember that I have to do this in a MFC C++ program, so I can't use Group Policy Editor of Windows.
|
|
|
|
|
If you will disable the task manager using registry key, any one who have the knowledge of Registry can enable it again.
I think try writing hook and disable the taskmgr.exe application itself.
|
|
|
|
|
Anurag Gandhi wrote: any one who have the knowledge of Registry can enable it again.
Permissions permitting.
Steve
|
|
|
|
|
I have already solved this problem using the 'Restrict Run' feature of windows(which also uses registry keys). Using this feature I inhibit running of all programs except the programs that I state. Hence, the user can't run regedit.exe program to edit the registry.
Plz, just help me with disabling task manager for ALL users of a PC.
Or tell me why HKEY_LOCAL_MACHINE does not work, despite being mentioned in many websites.
|
|
|
|
|
I was talking about the permissions on the registry keys in question. Just like files, registry keys can have permissions.
Steve
|
|
|
|
|
hi Friends,
My application has dependency on ws2_32.dll. Now this(ws2_32.dll) library has dependency on msvcrt.dll. Do I need to ship msvcrt.dll with my application installer or it comes by default with OS installation?
|
|
|
|
|
vikrams wrote: Do I need to ship msvcrt.dll with my application installer or it comes by default with OS installation?
It comes with os installation.
|
|
|
|