           p.Name);

I'd advise you not to mix and match your query expressions and dot notation so much though - it's quite confusing at the moment.



Q:

the dialog desn't show correctly when it's created in sub-thread

I'm trying to add a pop-up message function in my project.And I make it run in a subthread since I need a realtime notification.But I find if the notification dialog is created in my subthread(started by AfxBeginThread),all the elements(buttons,urls....) of the dialog are not shown.The message box is just a blank dialog. If I extract the function and start it by a button then it works fine.Here's the function,it's quite simple.
UINT sendNotification(LPVOID pParam)
{
   int x = GetSystemMetrics(SM_CXSCREEN);
   int y = GetSystemMetrics(SM_CYSCREEN);

   testPopDlg *testPop = new testPopDlg;
   testPop->Create(IDD_TEST,0);
   CRect lprect(0,0,0,0);
   testPop->GetWindowRect(lprect);
   int w = lprect.Width();
   int h = lprect.Height();
   testPop->web.Navigate("http://www.google.com",NULL,NULL,NULL,NULL);
   testPop->ShowWindow(SW_SHOW);
   for(int k=0;k<20;k++)    //slide out
   {
      testPop->MoveWindow(x-w,y-h*k/20,w,y-h*k/20,1);
      Sleep(20);
   }
   Sleep(5000);   //will close after 5 sec
   return 0;
}

Why this function doesn't work right in subthread?

A:

To use a dialog on a different thread in MFC you should create it on a UI thread. To create a UI thread you basically have to create a class derived from CWinThread. See also this code project article.



Q:

Proof strategy - Borel $\sigma-$fields

How does one go about proving the following:
Every open set $A$ in the topological space $(\mathbb{R}^d,\|\cdot\|)$ (with the norm topology) is the union of all the open balls $B_\epsilon(q)$ whose center $q$ and radius $\epsilon>0$ are rational.
In fact, the result that I'm aiming at is to show that $\mathcal{B}(\mathbb{R}^d)$, i.e. the Borel $\sigma-$field in $\mathbb{R}^d,d<\infty$ is the $\sigma-$field generated by the class of sets that are of the form
$$O:=\times_{j=1}^d(a_j,b_j]$