How to identify a stale handle?

Lets suppose you are keeping handles of all processes running in a system using OpenProcess, now it’s just normal that some processes may exit, but since you have a valid handle there is no way to tell whether the process is still running or whether it has exited. You cannot check for NULL since the […]
Continue reading…

 

Redistributables for different VC versions starting from VC 2005

If you want to re-distribute the applications that you developed in different versions of VC then you need to install their redist packages on such target machines, following are the redists that I use… Redistributable for VC 2005 applications is here Redistributable for VC 2008 applications is here Redistributable for VC 2008 feature pack applications […]
Continue reading…

 

How to limit the text entered into an edit/richedit control?

Call CEdit::SetLimitText or send EM_LIMITTEXT windows message to an edit control. There are some caveats associated with this functionality… This limitation does not affect the amount of text entered via a call to SetWindowText, or WM_SETTEXT. This limitation does not hold true for paste operation. This limitation does not affect text already entered into an […]
Continue reading…