Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

92 lines
2.0 KiB
C++

#ifndef __WINDOWSHPP__
#define __WINDOWSHPP__
#include <windows.h>
#include <utils\utils.h>
#include <dib surface\dibsection.hpp>
class CWindow
{
protected:
int m_BackWidth,m_BackHeight;
HWND m_Window;
bool m_Scale;
public:
CWindow (void);
~CWindow (void);
virtual void Create (const CString& title,int width,int height,int offw=0,int offh=0,bool scale=false);
void Window (HWND newwnd)
{
m_Window = newwnd;
}
HWND Window (void) const
{
return m_Window;
}
bool IsValid (void) const
{
return m_Window != NULL;
}
operator HWND() const
{
return m_Window;
}
virtual LRESULT WndProc (HWND thewnd,UINT themsg,WPARAM wParam,LPARAM lParam);
virtual void Render (HDC thedc,LPPAINTSTRUCT data = NULL) {}
virtual void InitialUpdate(void) {};
virtual void LButtonDown (int x,int y) {}
virtual void RButtonDown (int x,int y) {}
virtual void LButtonUp (int x,int y) {}
virtual void RButtonUp (int x,int y) {}
virtual void MouseMove (int x,int y) {}
};
class CDIBWindow : public CWindow
{
protected:
CDIBSurface m_Background;
public:
CDIBWindow (void) {};
~CDIBWindow (void) {};
virtual void Create (const CString& title,int width,int height,int offw=0,int offh=0,bool scale=false);
bool IsValid (void) const
{
return (m_Background.IsValid () && CWindow::IsValid ());
}
CDIBSurface& GetSurface(void)
{
return m_Background;
}
virtual void Render (HDC thedc,LPPAINTSTRUCT data = NULL);
};
#if 0
class CDDWindow : public CDIBWindow
{
protected:
CDDRenderSurface m_DirectBackground;
public:
CDDWindow (void) {};
~CDDWindow (void) {};
virtual void Create (const CString& title,int width,int height,int offw=0,int offh=0,bool scale=false);
bool IsValid (void) const
{
return (m_DirectBackground.IsValid () && CDIBWindow::IsValid ());
}
CDDRenderSurface& GetSurface (void)
{
return m_DirectBackground;
}
virtual void Render (HDC thedc,LPPAINTSTRUCT data = NULL);
};
#endif
#endif