I'm going nuts. I cant figure out whats wrong, RegisterClass isnt working, and the window isnt creating.

Code:
RECT rc;
 GetWindowRect(db,&rc);
 WNDCLASS wc;
 const char* szAppName = "richclass";
    
    wc.style = 0;
    wc.lpfnWndProc = WndProc;
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
    wc.cbClsExtra = 0; 
    wc.cbWndExtra = 0; 
    wc.hInstance = OurSelf; 
	wc.lpszMenuName = NULL;
    wc.lpszClassName = szAppName; 

	if (!RegisterClass(&wc)) { 
		lstrcpy(data,"no"); 
		return 3; 
	}
   CHAR szBuf[80]; 
    DWORD dw = GetLastError(); 
 
    wsprintf(szBuf, "%s failed: GetLastError returned %u\n", 
        "ok", dw); 
 
    MessageBox(NULL, szBuf, "Error", MB_OK); 
 HWND newrich = CreateWindow(szAppName,szAppName,WS_CHILD, rc.left, rc.top, (rc.right - rc.left),(rc.bottom - rc.top),db,NULL,OurSelf,NULL);
ShowWindow(newrich,SW_SHOW);
 UpdateWindow(newrich);