00001
00030 #ifndef __VETLIB_VETWINDOW32_H__
00031 #define __VETLIB_VETWINDOW32_H__
00032
00033 #include "../vetDefs.h"
00034 #include "../vetOutput.h"
00035
00036 #include "../vetFrameYUV420.h"
00037 #include "../vetFrameRGB24.h"
00038 #include "../vetFrameT.h"
00039
00040 #include <windows.h>
00041
00042
00046 #define VETW32_DEF_WIDTH 320
00047
00050 #define VETW32_DEF_HEIGHT 240
00051
00052
00053 #define VETW32_DEF_TITLE TEXT("VETLib Preview Window32 0.56\0")
00054 #define VETW32_DEF_CLSNAME TEXT("vetWindow32\0")
00055
00056
00057
00058
00059 class vetWindow32 : public vetOutput
00060 {
00061
00062 protected:
00063
00067 HINSTANCE parentHistance;
00068
00072 HWND myHandle;
00073
00077 RECT myRect;
00078
00082 HDC hDisplay;
00083
00084
00085 unsigned int width;
00086 unsigned int height;
00087
00088 public:
00089
00090
00098 vetWindow32(HINSTANCE hInstance = 0);
00099
00103 ~vetWindow32();
00104
00110 void setParentHistance(HINSTANCE appHinstance) { parentHistance = appHinstance; };
00111
00117 HINSTANCE getParentHistance() { return parentHistance; };
00118
00131 VETRESULT createWindow(unsigned int width, unsigned int height);
00132
00138 VETRESULT welcomeText();
00139
00140
00151 BOOL setWindowPos(int X, int Y, int cx, int cy) { return SetWindowPos(myHandle, HWND_NOTOPMOST, X, Y, cx, cy, SWP_SHOWWINDOW ); };
00152
00160 BOOL setWindowText(LPCTSTR lpString) { return SetWindowText(myHandle, lpString); };
00161
00167 HWND dump_handle() { return myHandle; };
00168
00174 LPRECT dump_WindowRect() { return &myRect; };
00175
00181 HDC dump_DC() { return hDisplay; };
00182
00183
00191 VETRESULT show(int nCmdShow = SW_SHOW);
00192
00198 VETRESULT hide();
00199
00204 VETRESULT run() { return VETRET_NOT_IMPLEMENTED; };
00205
00211 VETRESULT setHeight(unsigned int value);
00212
00218 VETRESULT setWidth(unsigned int value);
00219
00220
00221 unsigned int getWidth() const { return width; };
00222 unsigned int getHeight() const { return height; };
00223
00234 VETRESULT importFrom(vetFrameYUV420& img);
00235
00246 VETRESULT importFrom(vetFrameRGB24& img);
00247
00258 VETRESULT importFrom(vetFrameT<unsigned char>& img);
00259
00260
00261
00262 };
00263
00264 #endif //__VETLIB_VETWINDOW32_H__