I noticed something strange with this code:

Code:
INT_PTR CALLBACK procPopup(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	UNREFERENCED_PARAMETER(lParam);

	RECT rc;
	memset(&rc,0,sizeof(RECT));
	GetWindowRect(hDlg, &rc);
	
	TCHAR szBottom[5] = {0};
	_itot_s(rc.bottom,szBottom,5,10);

	TCHAR szRight[5] = {0};
	_itot_s(rc.right,szRight,5,10);

	TCHAR szTop[5] = {0};
	_itot_s(rc.top,szTop,5,10);

	TCHAR szLeft[5] = {0};
	_itot_s(rc.left,szLeft,5,10);

	TCHAR marameo[256] = {0};
	_tcsncat_s(marameo, _T("Bottom: "),10);
	_tcsncat_s(marameo, szBottom,5);
	_tcsncat_s(marameo, _T(" Width: "),10);
	_tcsncat_s(marameo, szRight,5);
	_tcsncat_s(marameo, _T(" Top: "),10);
	_tcsncat_s(marameo, szTop,5);
	_tcsncat_s(marameo, _T(" Left: "),10);
	_tcsncat_s(marameo, szLeft,5);


	switch (message)
	{
	case WM_SIZE:
		SetWindowText(hDlg, (LPTSTR)marameo);
		break;

	case WM_MOVE:
		//SetWindowText(hDlg, (LPTSTR)marameo);
		break;
	}

}
even if I just move the window that will affect "bottom" and "right" vars...so I think using the values from RECT might be wrong approach