Changeset 1015 for tests


Ignore:
Timestamp:
Aug 20, 2011, 9:59:19 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

tests: embedded: Use case qt_WinProcessWindowObstacles().

And also added direct painting code for Windows.

Location:
tests/embedded
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/embedded/embedded.cpp

    r1010 r1015  
    1 #ifdef __OS2__
    2 #include <os2.h>
    3 #endif
    4 
    51#include <QDebug>
    62#include <QtGui>
     3
     4
     5
     6
     7
     8
     9
     10
    711
    812class VideoWidget : public QFrame
     
    3135
    3236        WId id = stable->winId();
     37
    3338        qDebug() << "stable id" << qDebugHWND (id);
     39
     40
     41
    3442        return id;
    3543    }
     
    9098
    9199        bgWidget = new QLabel ("Background");
     100
    92101        stackCentralW->addWidget (bgWidget);
    93102
     
    107116        if (tickCount == 5)
    108117            resize (800, 600);
    109 #ifdef __OS2__
     118
     119#ifdef Q_WS_PM
    110120        if (id)
    111121        {
    112122            qDebug() << "window handle" << qDebugFmtHex (id);
    113123            HWND hwnd = id;
     124
     125
    114126            HPS hps = WinGetPS (hwnd);
    115127            if (hps)
    116128            {
    117                 RECTL rcl;
    118 //                WinQueryWindowRect (hwnd, &rcl);
     129                HRGN hrgn = GpiCreateRegion(hps, 1L, &rcl);
     130                ULONG rc = qt_WinProcessWindowObstacles (hwnd, NULL, hrgn, CRGN_DIFF, PWO_Default);
     131
     132                HRGN hrgnOld;
     133                GpiSetClipRegion (hps, hrgn, &hrgnOld);
    119134
    120135                rcl.xLeft = 0;
     
    127142                WinDrawBorder (hps, &rcl, 3, 3, CLR_RED, CLR_DARKGREEN, DB_INTERIOR);
    128143
     144
     145
    129146                WinReleasePS (hps);
    130147            }
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
    131165        }
    132166#endif
  • tests/embedded/embedded.pro

    r1003 r1015  
    88
    99RUN_ARGS = -style windows
     10
     11
Note: See TracChangeset for help on using the changeset viewer.