hi i have this code:

Code:
...
          case ID_O_NAM:
            DialogBox(GetModuleHandle(NULL), 
                      MAKEINTRESOURCE(IDD_NAM), hwnd, PProc);
              break;   
...
//then in PProc

BOOL CALLBACK PProc(HWND hdlg, UINT Message, WPARAM wParam, LPARAM lParam)
{
  static HWND box;
    switch(Message)
    {
        case WM_INITDIALOG:
            box = GetDlgItem(hdlg, IDC_ED1);  
            SetDlgItemText(hdlg, IDC_ED1, "me");
        return true;
...
it's not working. it does not set the text. also if i add a check, box is NULL. but everything displayes ok, just no default text. what's wrong?