RE: Graphics Problems

new topic     » topic index » view thread      » older message » newer message

Have you tried resetting the palette on WM_ACTIVATE?

Exotica requires you to rebuild custom graphics on WM_ACTIVATE. If not, 
the video memory buffer is corrupted from other windows, and the custom 
bitmaps are thrashed.
I assume, it's a similar situation.

Chris

euman at bellsouth.net wrote:
> Hello all,
> 
> I have a program that uses graphics exclusivly for the GUI and I have 
> one minor
> problem. Im using DIBSections for the imagery and double buffering the 
> images
> with memory DC's so I can bitblt the images to screen when needed at 
> certain 
> locations. What Ive found is in 256 color mode the screen and images 
> retain 
> their respective palette until my window looses focus.
> 
> I have this short piece of code that works fine for any window that may 
> overlap
> my window but if any window  is exclusive to the screen size (full 
> screen) and 
> recieves focus then my window losses its palette when it regains focus.
>   
>     elsif iMsg = WM_ACTIVATE then
>    
>           if LOWORD(wParam) =  0 then
>              hdc = GetDC(hwnd)
>              savedDC = c_func(xSaveDC,{hdc})
>              ReleaseDC(hwnd, hdc) 
>           
>              
>           elsif LOWORD(wParam) =  1 or LOWORD(wParam) =  2 then
> 
>                 if lParam = hwnd then
>                    ShowWindow(hwnd, SW_SHOWNORMAL)   
>                    junk = c_func(xRestoreDC,{hdc, -1})
>                    c_proc(UpdateWindow, {hwnd}) 
>                 end if
> 
> any ideas?
> 
> Euman
> euman at bellsouth.net
> 
> 5 2 1 - 1 - n - 5  The Doors  
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu