Announcement

Collapse
No announcement yet.

"show window contents while dragging" flag

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aldo Cavini
    replied
    This post is to say on my PC (Win NT4), the SystemPparametersInfo call doesn't work inside the %WM_ENTERSIZEMOVE message. I tried inside %WM_NCLBUTTONDOWN and it works correctly. The code I have is the following (I use it to ENABLE the "show window contens while dragging" flag during drags):
    Code:
      CASE %WM_NCLBUTTONDOWN
        IF wParam >= %HTLEFT AND wParam <= %HTBOTTOMRIGHT THEN
          SystemPparametersInfo %SPI_GETDRAGFULLWINDOWS, 0, VARPTR( flag ), 0
          IF flag = 0 THEN
            SystemPparametersInfo %SPI_SETDRAGFULLWINDOWS, %true, 0, 0
            flag = 2  ' this is to reset on the following %WM_EXITSIZEMOVE message
          END IF
        END IF
    
     CASE %WM_EXITSIZEMOVE 
        IF flag = 2 THEN
          SystemPparametersInfo %SPI_SETDRAGFULLWINDOWS, %false, 0, 0
        END IF
    I'd like to know if there is something wrong (or dangerous) inside this code. Thanks


    ------------------

    Leave a comment:


  • Aldo Cavini
    replied
    I found it. Simply use:
    Code:
    SystemParametersInfo %SPI_GETDRAGFULLWINDOWS, 0, VARPTR( flag ), 0
    I tried it before posting this topic, but it didn't work because I forgot to use the VARPTR function. It is mysterious: since I used a LOCAL flag (unreferenced before the call), the SystemParametersInfo call wrote the result at address 0. Why didn't this generate a GPF?

    ------------------


    [This message has been edited by Aldo Cavini (edited May 02, 2001).]

    Leave a comment:


  • Aldo Cavini
    started a topic "show window contents while dragging" flag

    "show window contents while dragging" flag

    I looked for "show window contents while dragging" through the Win32Api.hlp file and through this forums, but I didn't find HOW to set/reset this flag by program. Is it possible to do it? I'd like to reset it to remove some flicker effects while windows dragging. In one particular circumstance I'd like to do the inverse...

    Aldo

    ------------------
Working...
X