Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

I want to solve this problem

Posted on 2006-03-20
8
Medium Priority
?
136 Views
Last Modified: 2010-04-24
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?

0
Comment
Question by:MAnkeer
  • 3
5 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 16235134
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?
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 16235155
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.
0
 

Author Comment

by:MAnkeer
ID: 16235261
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.
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 16235384
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.
0
 
LVL 22

Assisted Solution

by:mahesh1402
mahesh1402 earned 500 total points
ID: 16244041
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month20 days, 17 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question