15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


DrawFocusRect DrawDragRect

Ralf Prien -- ralf@sfb313.uni-kiel.d400.de
Wednesday, April 17, 1996

Environment: VC++ 4.0 / Win95 VC++ 1.50 / Win95

Hi,
I wrote an application under VC++1.50 that used the
CDC::DrawFocusRect for showing a selected region of the
screen and it worked well under Win3.1 but when I ran the
same EXE under Win95 I don't see the FocusRect anymore.
I thought that recompilation under VC++4.0 with the new
MFC would solve that problem but it doesnt. So why does
it not work anymore under Win95 or do I have to change
something.

I solved the problem under VC++4.0 by taking the DrawDragRect
function, which works. The only thing is that I have to use
device coordinates and not (as stated in the help) logical
coordinates.

Ralf
 
----------------------------------------------------------
Ralf Prien                  ralf@sfb313.uni-kiel.d400.de
----------------------------------------------------------



Niels Ull Jacobsen -- nuj@kruger.dk
Saturday, April 20, 1996

At 15:30 17-04-96 NFT, you wrote:
>Environment: VC++ 4.0 / Win95 VC++ 1.50 / Win95
>
>Hi,
>I wrote an application under VC++1.50 that used the
>CDC::DrawFocusRect for showing a selected region of the
>screen and it worked well under Win3.1 but when I ran the
>same EXE under Win95 I don't see the FocusRect anymore.
>I thought that recompilation under VC++4.0 with the new
>MFC would solve that problem but it doesnt. So why does
>it not work anymore under Win95 or do I have to change
>something.

A shot in the dark, but:
When do you draw it? Could you be drawing it twice (which will remove=20
it again as it is painted with XOR) due to getting more WM_PAINT's,=20
WM_MOUSEMOVE's or whatever than you got under windows 3.1?

Try TRACE'ing where you draw it and see how many times you do.
Just guessing...

>
>I solved the problem under VC++4.0 by taking the DrawDragRect
>function, which works. The only thing is that I have to use
>device coordinates and not (as stated in the help) logical
>coordinates.
>
>Ralf
>=20
>----------------------------------------------------------
>Ralf Prien                  ralf@sfb313.uni-kiel.d400.de
>----------------------------------------------------------
>
>
>
Niels Ull Jacobsen, Kr=FCger A/S (nuj@kruger.dk)
Everything stated herein is THE OFFICIAL POLICY of the entire Kruger grou=
p
and should be taken as legally binding in every respect. Pigs will grow
wings and fly.









| Вернуться в корень Архива |