I am not particularly interesting in using Mouse/Keyboard hooks since they may affect over-all computer response. Is there a way to tell MS Windows to wake up a certain CALLBACK if the user doesn't input for a certain period of time?
If you run Windows 2000 or above, you can use GetLastInputInfo() API.
My app shows the dialog box in a modal (topmost) window.
The purpose of the app is to give feedback to the user about the button pressed on the keyboard, however, whenever I press the ESC or Space keys, the IDCANCEL or IDOK buttons are "pressed".
Is it possible to prevent this behavior ?
(I want those buttons only to be used by the user via mouse click to exit the app. The "Default Button" property for the buttons is set to False)
This one has been bugging me all day. I'm trying to fill a consoles screen with null characters using FillConsoleOutputCharacter() passing '\0' as the character. This works flawlessly in a non-unicode build, but after switching to unicode it just doesn't work.
After reading the buffer it becomes apparant that the screen was filled with spaces 0x0020. Thinking it was a problem with the null character I then tried '0x0A' and '0x000A' both of which fill the buffer with '0x25D9'.
Do I need to do anything special before trying to fill with a unicode null character, or does the function just not work in a unicode build?
I have installed Visual Studio 2005 8 in D:\Program Files\ and WM SDK 5.0 in C:\Program Files\.
The WM5 SDK comes with a few samples, and I've chosen the bluetooth one, named BTSeach (I've seen it between codeproject's articles, too). I've launched it from the default directory: C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Bluetooth
When I compile it i get 2 errors, and I didn`t modify anything (anyway it's an linking error, so I guess the filepaths aren't correctly set). The output is:
------ Build started: Project: btsearch, Configuration: Debug Windows Mobile 5.0 Pocket PC SDK (ARMV4I) ------
btsearch.obj : error LNK2001: unresolved external symbol __GSHandlerCheck
Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug/btsearch.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\Bluetooth\btsearch\Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug\BuildLog.htm"
btsearch - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Does any of you know where I should write the paths for files which should resolve this linking issues?
Thank you a lot!
I`re solved this problem, and I`d like to post here, to help one who gets stuck in the same spot.
The problem seems to be the Service Pack 1 update. This is a known issue, and on microsoft site ( http://support.microsoft.com/kb/928957/ ) it`s posted this:
Error LNK2019: unresolved external symbol __GSHandlerCheck
Samples in both the Windows Mobile 5.0 SDK for Pocket PC and the Windows Mobile 5.0 SDK for Smartphone are affected by this issue.
Visual Studio 2005 SP1 updates the Visual Studio compilers with the /GS support that is already available in Windows CE 6.0 compilers. Link errors will occur in native C++ Smart Device projects that do not explicitly link to “libcmt.lib” or that have turned off /GS, and that are running on pre-Windows Embedded CE 6.0 platforms.
To resolve this issue:
1. Explicitly include "libcmt.lib" in the list of additional libraries to link against.
2. Turn off the linker warning (/nowarn:4099)
I didn`t actually manage to do this, but I've done something else. I`ve basically searched my WM5 SDK for 'libcmt.lib' (found around 7 results) and picked the one addressing the platform I was writing code for (that is AVRM4I). And simply added it to my project (add file to project > existing file). The warn doesn`t bother me.
To more projects to u all
Last Visit: 31-Dec-99 18:00 Last Update: 13-Apr-21 4:40