- //
- // check to see if the new window is a standard control
- //
- if (dwClass & (ULONG)WC_BUTTON ||
- dwClass & (ULONG)WC_COMBOBOX ||
- dwClass & (ULONG)WC_CONTAINER ||
- dwClass & (ULONG)WC_ENTRYFIELD ||
- dwClass & (ULONG)WC_LISTBOX ||
- dwClass & (ULONG)WC_MENU ||
- dwClass & (ULONG)WC_NOTEBOOK ||
- dwClass & (ULONG)WC_SCROLLBAR ||
- dwClass & (ULONG)WC_SPINBUTTON ||
- dwClass & (ULONG)WC_STATIC ||
- dwClass & (ULONG)WC_TITLEBAR ||
- dwClass & (ULONG)WC_VALUESET
- )
- nControlId = vId;
-
- wxString sClassName(zWclass);
-
- if (GetWindowStyleFlag() & wxNO_FULL_REPAINT_ON_RESIZE )
- {
- sClassName += wxT("NR");
- }
-
- m_hWnd = (WXHWND)::WinCreateWindow( hParent
- ,(PSZ)sClassName.c_str()
- ,zTitle ? zTitle : wxT("")
- ,dwStyle
- ,nX1
- ,nY1
- ,nWidth
- ,nHeight
- ,NULLHANDLE
- ,HWND_TOP
- ,vId
- ,NULL
- ,NULL
- );
- if (!m_hWnd)
- {
- wxLogError("Can't create window of class %s!\n", zWclass);
- return FALSE;
- }
+ //
+ // We will either have a registered class via string name or a standard PM Class via a long
+ //
+ m_hWnd = (WXHWND)::WinCreateWindow( (HWND)hParent
+ ,zClass
+ ,(PSZ)zTitle ? zTitle : wxT("")
+ ,(ULONG)dwStyle
+ ,(LONG)lX1
+ ,(LONG)lY1
+ ,(LONG)lWidth
+ ,(LONG)lHeight
+ ,NULLHANDLE
+ ,HWND_TOP
+ ,(ULONG)ulId
+ ,pCtlData
+ ,pPresParams
+ );
+ if (!m_hWnd)
+ {
+ vError = ::WinGetLastError(vHabmain);
+ sError = wxPMErrorToStr(vError);
+ wxLogError("Can't create window of class %s!. Error: %s\n", zClass, sError);
+ return FALSE;