Joan Murt wrote: KEYBOARD AND MOUSE 2 (CTRL ALT DEL):
In order to capture those keystrokes, in NT you MUST write down a GINA DLL, this DLL is a security DLL that controls those kind of things, it's for security purposes, you cannot expect that an OS would be secure and to allow any programmer to execute any code that would be able to get the users passwords. (that DLL must be installed in the system and must be placed in it's own registry key).
Using Windows API functions
g_hMsgHook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC)Msg_HookProc, hInst, 0);
g_hKeyHook = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Key_HookProc, hInst, 0);
you can hook (block) any keys in win9x/NT except ctrl+alt+del.
In win 9x ctrl+alt+del can be locked by SystemParametersInfo(SPI_SCREENSAVERRUNNING, TRUE, &g_bKillAllSysKeys, 0);
In NT ctrl+alt+del can be blocked by writing your own Gina.dll (exported function WlxLoggedOnSAS), but be carefull with Gina...
For more details, see description of these functions in MSDN
In my application, when I click the minimize button in the upper right corner nothing happens. When I click the maximize button, the application in minimized. I put the following code in CMainFrame, and when I debug, I find that it is never accessed when I click the minimize button. Any suggestions as to why the minimize button is being ignored would be appreciated.
Thanks for the observation. What happens, is that if I hold the cursor over the minimize button, there is no tooltip showing, and if I click it, I never get to OnSysCommand. If I hold the mouse over the maximize button, I get a minimize tooltip, and if I click the maximize button, the app minimizes, and I do get into OnSysCommand. If I hold the cursor just between the maximize button and the close button, I get a maximize tooltip, and if I click, i go into OnSysCommand. Its as if XP is not recognizing the location of the buttons. This only happens with XP. With Win98, it works as it should.
Yes I did both. The problem is that the maximize button is being treated as if I had clicked the minimize button, while when I click the minimize button nothing happens, and if I click exactly between the maximize buttonb and the close button the application maximizes. This only happens when I run the app under XP. I put this OnSysCommand code in to see if I could figure out what was happening
I found out what was causing the probelm with the minimize and maximize buttons. I was using a class which did a gradation in windows 98, however it was causing problems when the program was run under XP. So I removed the class, and now it works well/
Scratch my last reply. Here's a function I wrote that will simulate a double click on a point in the tray. I'm sure it can be adapted to simulate a single click. Note that I only ran this on XP, the identifiers I pass to GetDlgItem might be different on other systems.
CommoDave wrote: Ok, i've found that clicking the tray's icon does nothing, what i want to do is click on the tooltip that the icon brings up. Is there any (easyish) way to do this?
I'm really not sure how you would go about doing that. A windows hook could probably be used to monitor when the tooltip is displayed, then the click could be simulated (now that we would have the tooltip window). Maybe there's an easier way to get the end result you are trying to get though. What are you trying to do with this? Are you trying to just hide the tooltip or are you trying to do something more complex?
You can stash and you can seize
In dreams begin, responsibilities U2 - Acrobat[^]
Stop being PC and accounting for everyone and his momma's timeframe. Just enjoy your - Rohit Sinha in the content-challenged thread
I'm trying to work around a conflict for an automated driver installation program. Windows installs the windows certified device driver for the hardware id of the device, but comes up with a window asking for driver files. It will not allow us to use the better device driver. The window must be cancelled, then the driver windows installed is updated to the newer driver.
I can cancel the window that comes up, but the window will not come up for about 30 secs if the tooltips are not clicked on....
I am trying to develope an application that runs on Windows 95, 98, ME, NT, 2000 and XP. I develope on a nice new/fast PC running Windows XP. After getting most problems worked out on the desktop I started testing on other version of Windows. Boy was I surprized how the same executable would run differently on different version of Windows.
Here are some examples: I have a dialog box that has a property sheet with 3 property pages. On the pages there are buttons that call up a CColorDialog. It works fine on XP, but hangs the machine on ME. For this case I re-designed the dialog to be stand alone property sheet with the same 3 property pages. This approach works on XP and ME, still need to try on others.
Another example is the CRectTracker. On XP the code uses a CRectTracker and the handles and cursor change when the tracker is displayed. On ME the cursor disapears when the CRectTracker::Track function is called.
I am quickly comming to the conclusion that to have an application that runs on 32 bit windows, it cannot be any more complicated that a list box and a few buttons. Does anybody from Microsoft read these pages?
So my question is how do you develope an app for all these version of windows? Do you develope on 95 (the worst one) and once you have it working there, there is a good chance it will work on the others? Do I need to build the exe on a PC running each of the different versions? Is building the exe on XP and delivering it to a customer running 95 an approach that will work?I don't even have access to some of these versions. Does anybody have any ideas?
It really depends on your target market. If you are writing apps that target your average home user, then chances are that a fair number of them are still using Win95/98.
In my market (healthcare), we still find a lot of standalone developers using our tools on Win98, but most of the runtime environments are WinNT 4.0 SP6a - they are reluctant to upgrade in a hurry even though W2K SP3 is probably far more stable.
Haven't run into anyone using our tools with ME though - probably just as well
Hi, all experienced Win32 guys will get a laugh here, I'm sure, but I'm stumped.
In our forms code, a checkbox is created using CreateWindow. Unfortunately, suddenly all our checkbox text has a white background (it should be windows grey).
Any idea why this might have suddenly stopped working, or even better how to fix it?
Any help appreciated - but no I can't not use CreateWindow.