Screensaver painting problem 
Author Message
 Screensaver painting problem

I went and got the ssaver sample from the micorsoft site.
I messed around with the drawing code a little but now I
want to load a bitmap from the resources to blt to the screen.
how to i get a HINSTANCE handle to use with LoadImage or LoadBitmap?
thanks
Rosco



Mon, 31 Jul 2000 03:00:00 GMT  
 Screensaver painting problem

For LoadImage, I think you can specify NULL as the instance handle.

You can use GetWindowLong to retrieve the instance handle, as follows:
(HINSTANCE) GetWindowLong( hwnd, GWL_HINSTANCE );

An MFC app can use AfxGetInstanceHandle().

Claire Sylvestre

Quote:

>I went and got the ssaver sample from the micorsoft site.
>I messed around with the drawing code a little but now I
>want to load a bitmap from the resources to blt to the screen.
>how to i get a HINSTANCE handle to use with LoadImage or LoadBitmap?
>thanks
>Rosco



Mon, 31 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Screensaver: How to program a screensaver?

2. OnNcPaint painting being painted over

3. CDC stops painting my rectangle after several paints??

4. Paint brushes and pots of paint

5. Update Problem after screensaver in NT

6. mfc screensaver password problem

7. screensaver problem

8. Aaargh! Screensaver problems on NT4.0

9. timer / screensaver problem

10. Screensaver Problem

11. WIN 3.1 re-paint problem

12. Generic C: Menu in DialogBox paint problems in Win3.1

 

 
Powered by phpBB® Forum Software