hi, I use SetSystemCursor to change the normal mouse cursor to something else, and 2 seconds later change it back to it's original. I can change the cursor the first time. but the second change does not happen until the first change is called once again. Please advise. thanks a million:rolleyes:, see below. ps. CopyCursor doesn't seem to work. this is inside a function that is called every 4 seconds: at the end of 1 second change mouse cursor from normal to appstarting hCurCopy = LoadCursor(NULL, IDC_APPSTARTING); SetSystemCursor(hCurCopy,OCR_NORMAL);
later in the code at the end of 3 seconds change cursor from appstaring to normal hCurNorm = LoadCursor(NULL,IDC_ARROW); SetSystemCursor(hCurNorm,OCR_APPSTARTING)
5iveboy
Posts
-
SetSystemCursor in VC++ -
how to highlight a menu item when its position (x and y coordinate) is knownDear programmers, We use a device to provide X and Y coordinates similar to a mouse. Using VC++ I create a very small dialog box and refresh its position using the SetWindowPos funtion (at a rate of 120 HZ and setting it as TopMost window). I can also left-click by bringing the mouse to the corner of the small dialog's position and clicking and sending back the mouse cursor to its original position. This way I fully simulate a mouse cursor. Everything works perfect. Except when the window clicks on a menu (i.e. File, Edit, View, Tools, ...). Then the menu that contains all the menu items covers the small dialog box and user cannot see where they are pointing at. Is there anyway I can highlight menu items when the position of my small dialg box is within the menu item's region? Just like when the mouse moves over the menu item? By the way, remember that the menu item is not a part of my program. It can be in any program. This is the last part of my project. PLEASE PLEASE if you can think of a solution let me know. I have worked on this project for 4 months. I can further explain the program if you want. Thank you in advance,
-
SetCursor outside client areaHi everyone, I am using the SetCursor function of VC++ and I want to be able to set the cursor type not just when the mouse is over my program (client area). I want the mouse cursor to change wherever it is. Any suggestion would be most greatly appreciated. Thanks,
-
how to minimize all windowsHi, I want to minimize all windows before I start my dialog. Is there any command I can use or I should run the ShowDesktop.scf file? I know the file contains Windows Explorer Command as the following: [Shell] Command=2 IconFile=explorer.exe,3 [Taskbar] Command=ToggleDesktop Thank you in advance, 5iveboy
-
ShellExecute questionDear all, I want to execute a separate program from my dialog using a button. I have used WinExec, ShellExecute and CreateProcess and get the same problem. The button works fine as long as I build and run my program from Visual C++. But when I run the program independently by double-clicking its exec file from its folder and try the button, it does not work and the other application does not start. This happens on any operating system I tried. Here is the code: HINSTANCE HINSCursorsd = ShellExecute (NULL,"open","../TestExeNew.exe",NULL,NULL,SW_SHOWNORMAL); Your help is most greatly appreciated. Thanks,