|
No, no, no !
Don't simple like that, why u don't try
Just Click'n'See
one time !
that all my mean !
The core of it's solution is :
- Hooking mouse or Keyboard
- Get position
- Invalid this screen and windows will re-paint it
- Hooking output stream and get what u want
But what i need is a sample source code
But, thank for your comments
|
|
|
|
|
Sorry but I cannot understand the program because it is in Vietnamese. My reply was intended to tell you that what you are after is not easy. I really cannot help you with your brainstorming because I have never attempted to read text from the screen and I don't think I will in the near future (I usually don't try things unless I have to). With that said and done let me remind you that Einstein (I think) said (not his exact words): "There is something that every man on this planet knows that it cannot be done. Here comes a person that doesn't know that and he solves the problem." Let's hope you will be that person.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Hi,
I'd also like to know a solution to this problem. I'm not proficient in windows programming, but I suggest this:
- get the handle of the active window
- send the window doubleclick message (this should select the word the mouse is pointing at)
- send a message that copies the selection into clipboard
- read the word from clipboard
maybe that once the word is selected it's also possible to retrive it by sending the window some getselection message or something like that.
what do you think?
Koxin
p.s. if you find a solution to this problem please let me know
|
|
|
|
|
here a example screen shot
Hi, Koxin, i've got a same idea in FAQ and have a example in MSDN but not easy ! And i'm sure have a solution didn't use Clipboard . Any one can suggest another idea ?
Coding for lv,lv & di
|
|
|
|
|
I am having trouble finding a direct way of setting a bitmap as the background of a CFormView. I've done this before using a CDialog class, but as I'm finding, the CFormView isn't quite the same. The bitmap is already defined in the resource file, not loaded at runtime. Thank you for any help anybody can give!! ;)
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
This should be done in the OnEraseBkgnd() handler.
In your view class .h file add:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
In your view class .cpp file add:
ON_WM_ERASEBKGND()
Then you can add this function:
BOOL CYourFormView::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
}
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Hi Douglas,
Check your email.
I hope that posted sources will solve your problem.
Vitali
|
|
|
|
|
I would like to use JTC.h in VC++ 7.0.
Can I use that? if yes, please tell me how.
I mean how I can link that to my project.
thanks!
|
|
|
|
|
can anyone tell me the proper way to disable and enable them within a dialog i know ive posted this thread 2 times already but neither asnwer worked
thanks for any help
|
|
|
|
|
send TB_SETBUTTONINFO with sendmessage...
TBBUTTONINFO.fsState = TBSTATE_INDETERMINATE;
Don't try it, just do it!
|
|
|
|
|
and how do i send that to send message and how do i tell it wich buttons to disbale/enable?
|
|
|
|
|
thats how its done if you tool bar control is a member of your dlg class
m_Tool.SetButtonStyle(1, TBBS_DISABLED);
m_Tool.SetButtonStyle(1, TBSTATE_ENABLED);
|
|
|
|
|
1) If you have a mapped variable for the dialog item:
1A) If it is a static item created with the visual editor:
itemmappedvariable.EnableWindow(BOOL);
1B) If it is a dynamic item created on the fly:
itemmappedvariable->EnableWindow(BOOL);
where BOOL is TRUE or FALSE. Setting to FALSE makes the item greyed out and not selectable by the user, which is what most people mean by disabled.
2) If you want the dialog item to completely disapear, you use:
2A) itemmappedvariable.ShowWindow(var);
2B) itemmappedvariable->ShowWindow(var);
where var=SW_SHOW to make it visible
var=SW_HIDE to make it disapear.
If you don't know what a mapped variable is, either:
1) Ggo to the item in the dialog editor. Click on the dialog item, Right click, select create variable. Fill in the name, hit OK. This makes all the coding changes so that you can use the A syntax above. If you search your dialog .h and .cpp you can see the simple changes and do others by hand. Pay attention to the lack of trailing semicolons if you do.
2) You can also use GetDlgItem(IDC_WHATEVER)->EnableWindow(BOOL) or GetDlgItem(IDC_whatever)->ShowWindow(var). Less efficient this way if you do it a lot.
Good luck!
tim
Founder, TMurgent Technologies
www.tmurgent.com
tmangan@tmurgent.com
|
|
|
|
|
Hiya I need to send a simple string through the com port from one pc to the other. I connected both of them together.
I have seen CreateFile to open the com port but can't get it to work for me properly.
Can someone give me simple code to show me how to make one computer listen and the other send the data..
Thanks,
|
|
|
|
|
|
Can anyone suggest a way to update an Edit box at run time while in a loop. I've tried using a declared CString variable and updatedata as well as directly updating the control with SetDlgItemText, but neither one update in real time, until the loop finishes execution.
Thanks
TDM
|
|
|
|
|
Painting is a deferred operation in Windows; WM_PAINT messages are only generated for your windows when the message queue is otherwise idle.
To force a repaint of a window immediately, call UpdateWindow .
|
|
|
|
|
Have you tried creating a thread, and passing the address of your variable control to it? If the contents of your edit box need to be changed as a result of something in your loop, you might be able to use CSemaphores to lock the thread until it needs to update the control, and unlock it from your loop. Just a thought, good luck.
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
After a few hours of frustrated searching, I have YET to discover whether or not or where Windows stores it's most recent boot time!! I am assuming it must be stored SOMEWHERE in the registry, but I haven't been able to find it thus far. Anyone know where I could find this information, assuming it exists?
|
|
|
|
|
GetTickCount() / 1000 = seconds since system boot
Don't try it, just do it!
|
|
|
|
|
Great suggestion!! Thanks a lot.
|
|
|
|
|
From the documentation for GetTickCount :
To obtain the time elapsed since the computer was started, retrieve the System Up Time counter in the performance data in the registry key HKEY_PERFORMANCE_DATA . The value returned is an 8-byte value. For more information, see Performance Monitoring[^].
|
|
|
|
|
HKEY_PERFORMANCE_DATA does only exist under windows Nt/2k/xp and this way is much more complicated!
Don't try it, just do it!
|
|
|
|
|
Yes, but it doesn't wrap around after 49 days.
|
|
|
|
|
Thanks, I've seen some of the documentation for Performance Monitoring, but true to Microsoft form, there isn't a simple way to do what I want that is OBVIOUS to find (hello, MS documentors, you reading this? Probably not....)
Between the two suggestions, I've got enough to work on.
Thanks.
J
|
|
|
|