hello guys, i am new in here.
I am using winAPI directly to create windows and direct3d 9 SDK.
i use GDI functions to make the window shape to what i like, and i draw on it using direct3d.
so the window shape could be something like a triangle.. also the window shape will change time to time according to my needs.
actualy to change the window shape, i read the backbuffer of the direct3d device ( used D3DPRESENTFLAG_LOCKABLE_BACKBUFFER flag when creating the device and lockRect is used on the surface at the reading time)
i read the backbuffer using GetBackBuffer() on direct3d device.
after reading the data from backbuffer , i change the shape of the window by creating relevant HRGNs using CreateRectRgn() function and combining them with the CombineRgn() function in GDI.
the program crashes when i resize the window ( it calls WM_SIZE and WM_PAINT rite.. WM_PAINT is the thing that causes trouble ).
Thanks in advance
actualy i have a very complicated situation here which will take some paragraphs to explain maybe hehe.. but i would explain it if only u guys think u need to know it. cuz there is another process running and its using another directx device while this is running..
Device Context (DC) change on WM_PAINT cause problem with D3DSurface lockRectangle
No replies to this topic