|
I am studying for software engineer, but I am not (yet) very skilled. A relative asked me if I could help him. He has an eyeproblem and has trouble locating the mousecursor in Windows. He works with Autocad where the position of the mousecurosr is shown by a big cross. So a horizontal line covering the whole width of the monitor at the y position of the cursor and a vertical line covering the whole height of the monitor at the x position of the mousecursor. So where the 2 lines intersect there is the mousecursor.
I want to make a program that runs on top of every other program in windows and shows that cross. I searched 'The code project' and found some interresting articles. Here http://www.codeproject.com/bitmap/DeskShoot.asp abhinaba describes a way to shoot hole at your windows desktop and all the running application. The trouble with this is that 1 time a copy of the desktop is taken and the holes are painted on that copy and shown on top of everything else, so the programs that are running can be accessed until you close the shooting program.
My program should show the cross and the mouseposition on top of everything, but other programs must be able to get focus.
I already tried something with getDC. I am able to get a copy of the desktop, can draw on ii and also show it, but than the problem is that when I get the desktop for the second time the old cross pointing at the old position of the mousecursor I also visible. So eventually the screen will be filled with multiple crosses.
Is it actually possible to draw dynamically over the whole desktop with keeping the functionality to acces all the running programs? Am I looking in the right direction and can somebody help me further?
Oh by the way using a bigger mousecursor is not an option. Or maybe somebody knows a program that give this functionality?
English ins't my native language, so sorry for that
|
|
|
|
|
Instead of doing that i Guess you can increase the size of the Mouse cursor by selecting appropriate cursor and enable trailing mouse , which will certainly improve the visiblity of the cursor.
Hope this solves ur problem.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Yes I know this option, but it isn't sufficient. And also when you don't move the mouse there isn't a trail and the relative really asked a solution like the cross in Autocad. But thanks for your suggestion.
I have searched sites for visually impaired and option mentioned there do not help much. Many site don't come further then sugesting a bigger cursor and the trailing thing.
|
|
|
|
|
Tim Schuhmacher wrote:
Many site don't come further then sugesting a bigger cursor and the trailing thing.
This is because the operation system is supporting it.. Your solution sounds very good indeed. How about hooking the mouse events and draw the cursor of the mouse? But I am not conviced that its really a good idea, the horizontal and vertical line will be over so many applications, dont know what will happen if a animation gif is over one of the line.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
I am going to try the possible solution Shog9 gave. But thanks any way for your help. When it is finished I will make it public. Others people with less vision might find i usefull also
|
|
|
|
|
It is possible to create a window that sits above all other windows, yet draws on only a portion of that area, and passes all input through to the windows behind it. Probably the easiest method is simply to create a window with a region that excludes most of the area (see: Guide to WIN32 Regions and Creating holes in a window). So, a window in the shape of a very thin cross, that moves with the mouse.
---
the work, which will become a new genre unto itself, will be called...
|
|
|
|
|
Thanks, that sounds like a good plan, I will defenitely try that.
|
|
|
|
|
We have a number of apps that valiantly attempts to re-use the same core code components on a mtriad of platforms, including but not limited to:
1) Desktop Windows (must use MFC for the user interface because it's a MDI app with pretty much every UI component you could imagine)
2) PocketPC 2002/3 on a PDA (must use MFC for the user interface because it's already part of PocketPC and not taking advantage of that fact would be a waste of available memory)
3) A custom compiled CE 2.12 kernel used on proprietary hardware (has no windows user interface, and therefore no interface code in it at all but still uses the same core code)
I need a set of type-safe collection classes and a version of CString that meet the following criteria:
1) Does not require/use MFC
2) Does not require/use STL
3) Supports unicode by default (because of CE)
4) Does not use/require exception handling
Are there any libraries available that meet all of the above criteria?
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Hmm... STL?
John Simmons / outlaw programmer wrote:
2) Does not require/use STL
D'oh!
Have you thought about just copying the relevant bits from MFC? AFAIK, there's not a lot to the collection / CString classes, and you could probably just remove the bits that depend on the rest of MFC (resource loading, etc.)
---
the work, which will become a new genre unto itself, will be called...
|
|
|
|
|
Or even better; copy the CString-class from WTL 3.x. Much less MFCishness to cut away I imagine.
--
Meine Welt ist monoton und minimal, doch ganz total!
|
|
|
|
|
I can not see the member variables of a control in VS2003. Although I can see all the member varibles of the all controls of all dialog classes using MS VC6 Class wizard. What kind of wizards are the VS2003 class wizards ? I can not do some of the nice things I did with the MS VC6 Classwizard ?
|
|
|
|
|
To add: Right-click on control, select "Add Variable".
To view: Read the DoDataExchange() method of your dialog class.
---
the work, which will become a new genre unto itself, will be called...
|
|
|
|
|
Amen.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
|
Hello
i would like to know how to create and display a listbox dynamically (on the fly). For instance in the IDE's we use , list boxes in the editor window appear when we use the dot operator (.) after an object which lists all members and allows selection of any of its members. similarly with (->) operator (pointer to an object) or scope resolution (: operator (for a class). How can i produce a similar effect in my application to provide prompting and auto completion features.
-Nikhil
the me i see is the me i'll be
|
|
|
|
|
brainznbrawn wrote:
i would like to know how to create and display a listbox dynamically (on the fly).
CreateWindow()
Alternately, create it ahead of time, and just hide it (ShowWindow() ) when you aren't using it.
brainznbrawn wrote:
How can i produce a similar effect in my application to provide prompting and auto completion features.
The source code for an editor which provides these features (Scintilla) is available - you may want to give it a look...
---
the work, which will become a new genre unto itself, will be called...
|
|
|
|
|
Hi,
the problem is :
I click on a ToolBar button, it sends the ON_COMMAND message
--> I treate it in MainFrm.cpp , then, I want to send a "personal message" to all my dialog boxes to adapt their fields.
(The MainFrame know nothing about the dialog boxes)
so, how can I create my own messages and how can my dialog boxes intercept it ?
Have you got an idea ?
BrutalDeath0
|
|
|
|
|
RegisterWindowMessage()
SendMessage()
Alternately, set up a list of classes to notify (add to the list on dialog creation, remove from it on deletion), and just call a method on each when the time to update comes around.
---
the work, which will become a new genre unto itself, will be called...
|
|
|
|
|
Make sure the dialogs you popup has the mainframe as the parent window, after catching the event in the mainframe forward the message to all the descendent using this api
SendMessageToDescendants(...)
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
thanks but, I surely not explain well, so :
I have an MFC App, with :
- a CMyToolBar derived from CToolBar which contain a Button (PastDate)
- the View contain a Property Sheet with 3 Property Pages (CHoraire,...) which contains 3 Grids (CGridCtrl from C. Maunder)
- the ON_COMMAND of the PastDate button is done in CMainFrame.
What I want is :
when I click on the PastDate button , it has to change the data shown in the grids.
But how ???
I tried the ::PostMessage(HWND_BROADCAST, MY_MESSAGE,...)
but I have a link Error.
Thanks a loooooooooooooooot
BrutalDeath0
|
|
|
|
|
Since you have handled the message from the toolbar in the main frame, try using SendMessageToDescendants to send it to all the descedants. Or get the handle of the view and send the message to it.
Still Alive!!!
Thank you God.
|
|
|
|
|
In VS 2003, As far as understood I have to open add variable wizard for each new member variable adding and press finish button to add the varible. In VS6 I can add variables without calling wizard at each member variable adding. Is this also possible in VS2003 ?
|
|
|
|
|
Friends,
I am developing front end application using Netmeeting API in the back. I don't want to let user know that i am using netmeeting. But i am unable to get rid of small dialog box that appears while i ask API to dial a number. The dialog box shows the IP address or number i am dialing to. It gives clue that i am using NetMeeting.
Can anyone tell me how to get rid of this dialog.
Thanks.
|
|
|
|
|
Is there any way not to show the busy mouse pointer when memcpy is called? I am calling this function in the loop. Seemingly every time i call this function mouse pointer becomes busy and go back to original status. it is kinda bothering that is what my customer said! Is there any way to avoid this? I am using Vs6 on Windows2000
Thanks in advance
Shin
|
|
|
|
|
This is good joke!!!
well what you do is before you spend HUGE time in MEMCPY , use API SetCursor(IDI_YOUR_CURSOR)
or
use thread so that it wont get jammed in your function..I havent seen your code, so this might be the solution
regards
Balkrishna talele
|
|
|
|