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?

Who is Participating?
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:

You need to change some parameters:

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

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.
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?
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.