Splitting CString to array in MFC

The following function converts string to array in MFC & ATL. By default it trims each string in the array and also ignores empty strings. It uses CString MFC class and CAtlArray ATL class. //converts semicolon separated string to array of strings void StringToArray(CString & strValue, CAtlArray<CString> & arrValue, TCHAR szSeparator, BOOL bTrim/*=TRUE*/, BOOL bIgnoreEmptyString/*=TRUE*/)…

Read More

PositiveSSL, Azure & COMODO RSA Certification Authority

Recently SSL 1 was declared unsafe. So the certification companies started supplying SSL 2 certificates. My certificate for notezilla.net was about to expire so I purchased a new one from namecheap.com. It sells SSL certificate at very less price. The brand name is PositiveSSL. After purchase, I followed the instructions to install SSL certificate on…

Read More

Windows Azure Cloud Computing for Dummies

Seriously, if you don’t understand anything about Windows Azure Cloud Computing, here is a neat article that talks about Windows Azure with complete clarity. Love this article :) https://www.windowsazure.com/en-us/manage/windows/fundamentals/intro-to-windows-azure/ Following excerpt is taken from the article: Windows Azure is Microsoft’s application platform for the public cloud. You can use Windows Azure just to store data,…

Read More

CHARFORMAT to LOGFONT

Thought someone might require this conversion. CharformatToLogfont(CHARFORMAT & cf, LOGFONT & lf, COLORREF & cr) {   lf.lfCharSet = cf.bCharSet; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; lf.lfEscapement = 0; lf.lfOrientation = 0; lf.lfOutPrecision = OUT_DEFAULT_PRECIS; lf.lfQuality = DEFAULT_QUALITY; lf.lfPitchAndFamily = DEFAULT_PITCH;     if ( (cf.dwEffects & CFE_BOLD) == CFE_BOLD) { lf.lfWeight = FW_BOLD; }   CDC dc;…

Read More

LOGFONT to CHARFORMAT

Thought someone might require this conversion.   LogfontToCharformat(LOGFONT & lf, COLORREF & cr, CHARFORMAT & cf) {   cf.cbSize = sizeof(CHARFORMAT); cf.dwMask = CFM_COLOR | CFM_FACE | CFM_SIZE | CFM_CHARSET | CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT | CFM_OFFSET; cf.dwEffects = 0;   if (lf.lfWeight >= FW_BOLD) { cf.dwEffects |= CFE_BOLD; }   if…

Read More