Click here to Skip to main content

Comments by PJ Arends (Top 24 by date)

PJ Arends at 27-Apr-14 19:34pm View
IMO using sounds is not an effective way, especially if you are validating in EN_UPDATE as the control maybe in an invalidate state while the user is typing and constant beeping would be really annoying.
A for a visual indicator things I have done include changing the background colour or border colour. Also disabling the OK button until everything is valid is a possibility as long as that does not hold up your users productivity. Sometimes it is better to allow invalid data so the work can be saved in order to get back to it later.
PJ Arends at 26-Mar-14 22:28pm View
Use std::vector< myclass>;
PJ Arends at 18-Feb-14 10:54am View
Yes, that is where the Updating flag comes in. It is used to prevent just this problem.
PJ Arends at 17-Feb-14 13:56pm View
I should also add, that the only the top left cell in the demo grid has this functionality, the rest of the cells are simple text edit controls.
PJ Arends at 17-Feb-14 13:34pm View
The validating is done in CInPlaceNumEdit::OnUpdate()
This function handles the EN_UPDATE message. This message is generated by the edit control just before it displays the text. What I did is validate the text in the control, and if it is not valid I restore the last previously valid text. This way it does not matter what is typed into the edit control, it will just appear to the user that all invalid text is rejected.
The tricky part for you now is that the CInPlaceNumEdit class works in concert with the CGridCellNumeric class. When the user finishes editing it ends up calling CGridCellNumeric::SetText() with the user entered text, which in turn calls CGridCellNumeric::Format() to format the final text in a locale specific format.
That should now be as clear as mud. Just look at CInPlaceNumEdit::OnUpdate and CGridCellNumeric::Format()
PJ Arends at 13-Jun-13 11:27am View
IE9 totally failed multiple times to get it, but I did manage to get it using Firefox. Thanks for the information about the file size, exactly what I needed.
PJ Arends at 2-Jun-13 19:02pm View
These are messages sent by the windows OS to your applications window.
PJ Arends at 30-May-13 11:27am View
Not enough information.
What brand of mobile device? Did you check with the manufacturer?
Did you check your network settings as the error message suggested?
Does the device connect normally when not using your code? are other programs successful at using it?
If you did the above then post the relevant code so we can see what you are doing.
PJ Arends at 29-May-13 19:44pm View
There are many ways to skin this cat, using events and WaitForMultipleObjects etc. Either way it is always a good idea to use thread synchorization to avoid deadlocks, even if it is DIY.
PJ Arends at 26-May-13 17:28pm View
Then look at TextOut, DrawText, ExtTextOut, TabbedTextOut etc.
PJ Arends at 26-May-13 1:08am View
You prefer
mov ah, 09h
int 21h
PJ Arends at 25-May-13 18:38pm View
depends on what you want to do and what you want to output your data to.
PJ Arends at 17-Apr-13 1:38am View
Yes it is lacking. Using "check screensaver running" I was able to find that I just need to use the SystemParametersInfo function and specify the SPI_GETSCREENSAVERRUNNING parameter.
Thanks for the tip.
Now it is time to go to bed and recharge the brain.
PJ Arends at 7-Mar-13 17:26pm View
See my article
PJ Arends at 26-Feb-13 11:12am View

unicode / non-unicode conflict. use the the neutral _tcsspn version or the unicode wcsspn version. Or better yet, use the function suggested by SoMad.
PJ Arends at 25-Oct-12 19:36pm View
The Control Panel has a setting (Power Options - System Settings) where one can choose what the Sleep button does. I can change it to 'Do nothing' and the Sleep button becomes disabled.
It does not require a reboot to do it this way, so it must be either a registry setting or a power management function (see that is used. Not sure which one.
I followed your link and was able to disable the Windows key, but I was unable to disable the sleep key via key mapping. The only problem is the windows key functionality is now totally disabled, not quite what I was looking for.
PJ Arends at 25-Oct-12 16:59pm View
Thanks for the info, I may end up doing it this way. Although I was hoping to be able to disable these keys only when my app is running. Your solution involves editing the registry and rebooting the machine. Not quite what I had in mind.
PJ Arends at 24-Oct-12 18:58pm View
The problem (as stated earlier) is that the Sleep and Win+L keys have their default actions taken before my hook procedure is called. So my hook procedure can not filter them out and catch them, thus blocking their default actions.
PJ Arends at 30-Sep-11 16:03pm View
Seen that, tried that, could not get it to work for some reason.
PJ Arends at 30-Sep-11 16:02pm View
Thanks a bunch, works perfectly :)
PJ Arends at 30-Sep-11 15:46pm View
What is the code for the GetFileList function?
PJ Arends at 17-Jun-11 12:17pm View
Tried it, and it works! Thanks
<pre>HRESULT hr = FileDialog2Ptr.CoCreateInstance(CLSID_FileOpenDialog);</pre>
PJ Arends at 17-Jun-11 3:07am View
The link you gave talks about IFileDialog, IFileSaveDialog, and IFileOpenDialog. These were new in Vista. The MSDN link I gave above is for IFileDialog2 that is new in Win7. I got the older ones to work just fine, but I want the functionality of IFileDialog2 where I can limit the scope with SetNavigationRoot().
PJ Arends at 17-Nov-10 17:28pm View
Thanks, works now. Kind of a weird solution though.

Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid