- Function Create_OpenGL_Window: TDemoError;
- Const
- ParentWindow = 0;
- MainMenu = 0;
- Var
- WinStyle, ExStyle: LongWord;
- Begin
- //ExStyle:= WS_EX_LEFT;
- ExStyle:= WS_EX_APPWINDOW Or WS_EX_WINDOWEDGE;
- WinStyle:= WS_OVERLAPPEDWINDOW Or
- WS_CLIPSIBLINGS Or WS_CLIPCHILDREN;
- With DemoWindow Do
- Begin
- Identity:= 0;
- With BBox Do
- Begin
- Left:=100;
- Top:= 100;
- Width:= 512;
- Height:= 512;
- End;
- End;
- With DemoWindow,BBox Do
- Identity:= CreateWindowExW
- (ExStyle,
- PWideChar(WindowClassName),
- PWideChar('OpenGL_Demo'),
- WinStyle,
- Left,Top,Width,Height,
- ParentWindow, MainMenu, System.MainInstance, NIL);
- If DemoWindow.Identity <> 0
- Then Result:= ''
- Else Result:= 'Window could not be created';
- End;