I want to solve this problem

Posted on 2006-03-20
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?

Question by:MAnkeer
    LVL 48

    Expert Comment

    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?
    LVL 48

    Expert Comment

    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.

    Author Comment

    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.
    LVL 48

    Accepted Solution

    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.
    LVL 22

    Assisted Solution


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    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++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now