Euman: Newwin.exw

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

Hello there again Euman,

The problem with the mouse sticking on scrolling was caused
by line 317 of 'Newwin.exw'.

After changing line 317 from:
    hbit = c_func(xCreateCompatibleBitmap,
                      {hdc, xScreen, yScreen})

to:
    hbit = c_func(xCreateCompatibleBitmap,
                      {memdc, xScreen, yScreen})

the program then works very well, although there are a few
other less major errors in it.
The reason you didnt notice anything wrong was probably
because we had our screen settings set to different values,
but in any case, thats the correct way to do it.

You might want to keep in mind the bitmap might eat up
lots of memory.  In an actual ap, i think i would create
a view of the bitmap rather then map the whole thing into
memory.

I added a few BitBlt's to copy the original drawing
to the other 3 quadrants of the memdc also so you can
see the effect of scrolling the large bitmap:

      --copy the original drawing to the other 3 quadrants:

      if not c_func(xBitBlt, {memdc,
                              0,yScreenActual,
                              xScreenActual,yScreenActual,
                              memdc, 
                              0,0, SRCCOPY}) then
      end if

      if not c_func(xBitBlt, {memdc,
                              xScreenActual,0,
                              xScreenActual,yScreenActual,
                              memdc, 
                              0,0, SRCCOPY}) then
      end if

      if not c_func(xBitBlt, {memdc,
                              xScreenActual,yScreenActual,
                              xScreenActual,yScreenActual,
                              memdc, 
                              0,0, SRCCOPY}) then
      end if


  (xScreenActual and yScreenActual are actual screen sizes, before
   you double them later in the program).

I'll send ya the whole program later on today.

Good luck with it.
--Al

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

Search



Quick Links

User menu

Not signed in.

Misc Menu