1
0
mirror of https://github.com/DxWnd/DxWnd.reloaded synced 2024-12-30 09:25:35 +01:00
DxWnd.reloaded/dll/shareddc.hpp
gho tik db2398ce2e v2_04_18_src
Former-commit-id: a236d8102f7cf07342c20cc701e08f30e8f4f142
2017-03-06 11:50:32 -05:00

60 lines
1.1 KiB
C++

#include <windows.h>
#include "syslibs.h"
typedef enum {
VIRTUAL_UNDEFINED = 0,
VIRTUAL_ON_WINDOW,
VIRTUAL_ON_DDRAW,
VIRTUAL_ON_D3D,
VIRTUAL_ON_OPENGL,
VIRTUAL_ERROR
} Virtual_type;
class dxwSDC
{
// Construction/destruction
public:
dxwSDC();
virtual ~dxwSDC();
// Operations
public: // methods
HDC GetPrimaryDC(HDC);
HDC GetPrimaryDC(HDC, HDC);
HDC GetHdc(void);
BOOL PutPrimaryDC(HDC, BOOL, int, int, int, int);
BOOL PutPrimaryDC(HDC, BOOL);
void SetOrigin(int, int);
private:
void copyDcAttributes(HDC, HDC, POINT);
void setClippingRegion(HDC, HDC, POINT);
HDC PrimaryDC;
HDC VirtualHDC;
HDC CurrentHDC;
HDC CurrentHDCSrc;
HWND CurrenthWnd;
LPDIRECTDRAWSURFACE lpDDSPrimary;
HBITMAP VirtualPic;
HGDIOBJ origFont;
HGDIOBJ origBrush;
HGDIOBJ origPen;
POINT WinOffset;
POINT VirtualOffset;
int ScreenWidth, ScreenHeight;
int LastScreenWidth, LastScreenHeight;
HDC LastHDC;
Virtual_type VirtualSurfaceType;
struct ExcludeClipRectsData
{
HDC compatDc;
POINT origin;
HWND rootWnd;
};
int HybridX;
int HybridY;
};
extern dxwSDC sdc;