Tuesday, August 22, 2017

Young vs Old

At any age human is not well equipped. At young age he has lots of energy to fight all the odds but has less understanding to figure out that there are some odds which can be sorted out without fighting them. As he matures he gains lots of experience but lacks energy to fight odds.

Wednesday, February 1, 2017

Peacock Theory

A peahen selects a peacock one who has biggest and flashy plumage. Although this plumage proves life threatening for peacock in case of danger. Because of heavy load of it's plumage, peacock finds it very difficult to run faster.
Exactly same case applies to humans. A young good looking man who has got farari from his father and having no real life skills, is exactly same as peacock. His owned assets do not add any real value to him. Females attracting towards him are like peahen.

Rule of parenting

The moment any living individual reproduces, it's biological growth slows down, it slows down consuming natural resources. It starts degrading. It's whole life becomes dedicated to nourishment of next generation.

So going by this natural rule of biology,
  • Complaining about kids sucking all your energy is totally rubbish.
  •  Enjoying and splurging on yourself is waste thinking, if it is not for nourishment of next generation.
  •  After having kids, everything should be planned and executed for kids only.

Tuesday, January 31, 2017

Sex is men's previlege in India

Looks like sex is men's privilege in India.
If a man has affair in office then everyone think that man is doing for pleasure.
If a women is doing same then everyone think that she is doing to take undue advantage. Why can't she do for pleasure ?

Monday, December 1, 2008

custom draw a CButton

create a calss

class CBDButton : public CButton

overwrite void DrawItem function and draw your button

void CBDButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
// TODO: Add your code to draw the specified item
UINT uStyle = DFCS_BUTTONPUSH;

// This code only works with buttons.
ASSERT(lpDrawItemStruct->CtlType == ODT_BUTTON);

// If drawing selected, add the pushed style to DrawFrameControl.
if (lpDrawItemStruct->itemState & ODS_SELECTED)
uStyle |= DFCS_PUSHED;

CDC dc;
dc.Attach(lpDrawItemStruct->hDC);

// Draw the button frame.
dc.DrawFrameControl(&lpDrawItemStruct->rcItem, DFC_BUTTON, uStyle);

CRect rect = lpDrawItemStruct->rcItem;
rect.left = rect.left + 1;
rect.right = rect.right - 2;
rect.top = rect.left + 1;
rect.bottom = rect.bottom - 2;
dc.FillSolidRect(rect, m_clrBk);

// Get the button's text.
CString strText;
GetWindowText(strText);
// Draw the button text using the text color.
COLORREF crOldColor = dc.SetTextColor(m_crText);
dc.DrawText(strText, strText.GetLength(), &lpDrawItemStruct->rcItem, DT_SINGLELINE|DT_VCENTER|DT_CENTER);
dc.SetTextColor(crOldColor);

dc.Detach();
}