Ok I just want to cast this down.........
Code:case WM_CREATE: hdc=GetDC(hwnd); Image BackGround; BackGround.LoadPic("Sunset.bmp",hdc); BitBlt(hdc,NULL,NULL,NULL,NULL,BackGround.GetBitMapDC,NULL,NULL,SRCCOPY); return 0; /****This is my class *************/ class Image { public: void LoadPic(char*, HDC); HDC GetBitMapDC(){return BitMapDC;} private: HDC BitMapDC; HBITMAP CreatedBitMap; }; void Image::LoadPic(char* FileName, HDC hdc) { CreatedBitMap=(HBITMAP)LoadImage(NULL,FileName,IMAGE_BITMAP,NULL,NULL,LR_LOADFROMFILE); BitMapDC=CreateCompatibleDC(hdc); SelectObject(BitMapDC,CreatedBitMap); }
Error I am getting "error C2664: 'BitBlt' : cannot convert parameter 6 from 'struct HDC__ *(void)' to 'struct HDC__ *'
There is no context in which this conversion is possible"
Thank you guys, I know it's a very trivial error but I don't know what the problem is.



LinkBack URL
About LinkBacks


