static HWND CreateControl(LPCTSTR         aType, DWORD           aStyle, HINSTANCE       aHInst, HWND            aHdlg, int             aId, const nsString& aStr, const nsRect&   aRect)
static HWND CreateControl(LPCTSTR          aType, DWORD            aStyle, HINSTANCE        aHInst, HWND             aHdlg, int              aId, const nsAString& aStr, const nsRect&    aRect)
static HWND CreateControl(LPCTSTR         aType,                          DWORD           aStyle,                          HINSTANCE       aHInst,                           HWND            aHdlg,                           int             aId,                           const nsString& aStr,                           const nsRect&   aRect){  char* pStr = nsDeviceContextWin::GetACPString(aStr);  if (pStr == NULL) return NULL;  HWND hWnd = ::CreateWindow (aType, pStr,                              WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | aStyle,                              aRect.x, aRect.y, aRect.width, aRect.height,                              (HWND)aHdlg, (HMENU)aId,                              aHInst, NULL);  if (hWnd == NULL) return NULL;  delete [] pStr;  // get the native font for the dialog and   // set it into the new control  HFONT hFont = (HFONT)::SendMessage(aHdlg, WM_GETFONT, (WPARAM)0, (LPARAM)0);  if (hFont != NULL) {    ::SendMessage(hWnd, WM_SETFONT, (WPARAM) hFont, (LPARAM)0);  }  return hWnd;}