16,019,618 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by PJ Arends (Top 43 by date)
PJ Arends
5-May-24 11:53am
View
Thanks for the reply. I like the idea of creating small polygons. Once I read your suggestion, I realized that the data from the geocode website contains a "boundingbox" array, and that the lat and lon returned is dead center of the bounding box, and is not actually even the lat and lon that I submitted to the website. My lat and lon are within the bounding box though. I am going to explore this angle some more. Thanks a bunch.
I am also glad that you think my proposed database layout should work. I am now going to start to play with it and see what I can get to work.
PJ Arends
5-May-24 11:44am
View
Thanks for the reply. If this becomes too much of a challenge (doubt it) then I may have a look at using Postgres.
PJ Arends
26-Feb-23 14:17pm
View
cls.two has not been initialized so it is pointing to just some random memory.
PJ Arends
28-Jan-22 15:23pm
View
What I have done in the past is simply enumerate all child controls and do a check sum of the data they contain. Grab and save a checksum at the start. If any controls are added or removed, or any data is changed then the checksum will be different. If the user undoes any changes then the checksum will not have changed.
PJ Arends
14-Mar-18 19:31pm
View
And also the bitwise AND operator.
PJ Arends
13-Sep-16 22:28pm
View
Thanks for your answer. I guess I will just end up writing a c++ script that will go through all the .htm files and update the version information in each one individually.
PJ Arends
14-May-16 15:18pm
View
Do not use void* if you can at all avoid it. You loose all type safety if you use it.
The cast you are trying to do is better done with reinterpret_cast.
PJ Arends
14-May-16 12:25pm
View
Ok, I can understand your point now that you have explained it. I probably would not have reacted the way I did if you would have made your point clearer to begin with.
I just hate to see newcomers to this site get down voted and their questions not answered for silly reasons like "terminology", especially as their first language may not be English.
PJ Arends
14-May-16 11:42am
View
Really ?!?
The OP asked a simple question that we all as beginners would have asked and you give him an English lesson on the difference between the words "conversion" and "formatting". You can clearly see from his use of the Format function and the char array that he was on the correct path to solving his problem.
You are obviously a very knowledgeable guy but sometimes you can be pretty dense too.
PJ Arends
26-Mar-16 19:28pm
View
Thanks. I do not reply for the points, but just to give the OP a hint in what I believe is the right direction.
PJ Arends
24-Mar-16 18:03pm
View
Thanks Matt T Heffron for updating my answer. I posted from my phone and was unable to fix it myself.
PJ Arends
8-Dec-15 16:00pm
View
Or he could just ask "gimme codez" questions. Seems to work for lots of people here.
PJ Arends
27-Nov-15 21:43pm
View
No. You did not answer the question.
MSDN
[
^
].
You are correct. The documentation says to call DefWindowProc(), not Default(). I stand corrected.
PJ Arends
27-Nov-15 19:52pm
View
Seriously? I did not post this question in order to get into a debate with you. All I want is an answer to the question: "Is it possible to tell from a base class function if the said function has been overridden in a derived class? And if so, how?"
Simple. If you know the answer then I will really appreciate it. If you can say with certainty that it is not possible, then I will appreciate that answer also. Just do not try to tell me about OOP and how to do this or that or the next thing.
I am not new to this game. I am just trying to do something I have never done before, because it is unconventional, and was wondering if anyone had actually done it before and could help me.
PJ Arends
27-Nov-15 10:28am
View
This is not an answer to my question. I know my real goal, you do not. And I know of a work around. But the work around could be considered a little messy so I was looking for a more elegant, neater way of accomplishing my goal.
If you have an answer, great, I would love to hear it. If all you are going to do is tell me I do not know what I am doing, or I do not know what my goal is, then just do not reply. You do not know what my goal is, you do not know what I am doing.
I just want to know if this is possible, and if so how? That is it. Nothing more, nothing less.
PJ Arends
2-Nov-15 14:22pm
View
I had tried that already, but you made me relook at it. My mistake was calling the CView::OnSetFocus() after calling SetFocus on my control.
Sometimes I can be such a dough head.
PJ Arends
2-Nov-15 11:13am
View
Looks like I am going to have to rewrite my control to make this work. All my public functions have to be handled via the SendMessage() API, not through the class instance function calls as I do now. Oh well, looks like I have coding to do.
PJ Arends
1-Nov-15 18:56pm
View
Thanks. I will look into it tonight when I get back home.
PJ Arends
22-Sep-14 2:58am
View
Reason for my vote of 1 \n Total garbage that should be removed from the site.
PJ Arends
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
26-Mar-14 22:28pm
View
Use std::vector< myclass>;
PJ Arends
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
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
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
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
2-Jun-13 19:02pm
View
These are messages sent by the windows OS to your applications window.
PJ Arends
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
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
26-May-13 17:28pm
View
Then look at TextOut, DrawText, ExtTextOut, TabbedTextOut etc.
PJ Arends
26-May-13 1:08am
View
You prefer
mov ah, 09h
int 21h
PJ Arends
25-May-13 18:38pm
View
printf
puts
putc
fwrite
_write
etc.
depends on what you want to do and what you want to output your data to.
PJ Arends
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
7-Mar-13 17:26pm
View
See my article
http://www.codeproject.com/Articles/1007/CRotatingLog-A-simple-rotary-text-file-class
PJ Arends
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
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 http://msdn.microsoft.com/en-us/library/windows/desktop/aa373163(v=vs.85).aspx) 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
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
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
30-Sep-11 16:03pm
View
Seen that, tried that, could not get it to work for some reason.
PJ Arends
30-Sep-11 16:02pm
View
Thanks a bunch, works perfectly :)
PJ Arends
30-Sep-11 15:46pm
View
What is the code for the GetFileList function?
PJ Arends
17-Jun-11 12:17pm
View
Tried it, and it works! Thanks
<pre>HRESULT hr = FileDialog2Ptr.CoCreateInstance(CLSID_FileOpenDialog);</pre>
PJ Arends
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
17-Nov-10 17:28pm
View
Thanks, works now. Kind of a weird solution though.
Show More