I want to solve this problem

Hi Everybody.


I want to create a transpaerent window in windows CE, since there's no flag that allow me to create such a window, I need to create a floating window, then I need to capture the window under this floating window, and then I need to draw the captured area over the floating window.

I create the floating window, and I catch the mouse messages, when I release the left mouse button I want to draw the area under the floating window in the client area of the floating window.

but this doesn't happened,

So please can anyone help me in this problem?

MAnkeerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlexFMCommented:
I remember that you want to get screen rectangle under the window. Maybe you can hide the window and then get screenshot in it's rectangle?
AlexFMCommented:
I suggested you to use transparent window but I didn't know that it doesn't work in your environment. Try global mouse hook with drawing directly on screen DC using DrawFocusRectangle.
MAnkeerAuthor Commented:
Dear All.

I want to inform you that also I need the data of the captured area I need to store the data in a bitmap file.

Thank you.
AlexFMCommented:
Well, suppose you implement rectangle selection using floating window. Now you need to capture this rectangle to bitmap. See first code fragment in the following article:
http://www.codeproject.com/dialog/screencap.asp

You need to change some parameters:

HBITMAP hCaptureBitmap =CreateCompatibleBitmap(hDesktopDC, nScreenWidth, nScreenHeight);
Replace nScreenWidth, nScreenHeight with selected rectangle width and height.

BitBlt(hCaptureDC,0,0,nScreenWidth,nScreenHeight,hDesktopDC,0,0,SRCCOPY);
Replace nScreenWidth, nScreenHeight with selected rectangle width and height. Replace 0, 0 (before SRCCOPY) with selected rectangle left and top.

Having hCaptureBitmap handle, save it to bitmap file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual C++.NET

From novice to tech pro — start learning today.