d89-pen@sm.luth.se (Per Ersson) (04/19/91)
Hi! I can't get the CS_SAVEBITS option to work properly. Could somebody please give me a hint of what to do? I have created a standard frame window with my own window procedure to the client window. In the WM_CREATE part of that procedure I register a new window class with the CS_SAVEBITS option. I also create a small window of that class with my client window as parent and owner. This window is moved in the client window (trigged by a timer) with the procedure WinSetWindowPos ( ..., SWP_MOVE). All this works fine _BUT_ I also recieves WM_PAINT messages to my client window procedure every time my small window is moved! Why? And how can I avoid this. When I read my PM manual it says that CS_SAVEBITS (which implikates WS_SAVEBITS) should prevent this. Regards. | Per Ersson ! Hagelv. 1 rum 78 | E-adr: d89-pen@sm.luth.se | | University of Luleaa ! S - 951 48 Luleaa | Phone: + 46 (0)920 49184 | | Sweden ! Sweden | |
bking@nro.cs.athabascau.ca (Barry King) (04/22/91)
d89-pen@sm.luth.se (Per Ersson) writes: > > Hi! > > I can't get the CS_SAVEBITS option to work properly. Could somebody > please give me a hint of what to do? > > I have created a standard frame window with my own window procedure to the > client window. > In the WM_CREATE part of that procedure I register a new > window class with the CS_SAVEBITS option. I also create a small window of tha > class with my client window as parent and owner. > This window is moved in the client window (trigged by a timer) with the > procedure WinSetWindowPos ( ..., SWP_MOVE). > All this works fine _BUT_ I also recieves WM_PAINT messages to my client > window procedure every time my small window is moved! > Why? And how can I avoid this. > When I read my PM manual it says that CS_SAVEBITS (which implikates > WS_SAVEBITS) should prevent this. > I've successfully done this but I used WS_SAVEBITS for the frame and client styles in the WinCreateWindow procedure. I also used CS_CLIPCHILDREN for the parent of the window. Hope this helps. Barry King ersys!bking@nro.cs.athabascau.ca Edmonton Remote Systems: Serving Northern Alberta since 1982