I want a pop-up window!

I want a transparent and full-screen pop-up window, but I can't.
My code is as follow:

m_hNewWindow = CreateWindowEx(WS_EX_TRANSPARENT, "DIALOG", "", dwStyle, 0, 0, 800, 600, m_hWnd, NULL, NULL, NULL);

Because my windowis transparent, other windows beneath it should be shown.

Can you solve it? Thank you!
Who is Participating?
nietodConnect With a Mentor Commented:
Are you programming in MFC?  I don't see any evidence that you are.  If you are using CreateWindow() like that you aren't creating an MFC window.   Are you sure you are using MFC?

Even if you are using MFC you can still define a window class and window procedure for this window.  Take a look at RegisterClass() and WindowProc().

You do not have to reject an answer if you just want clarification or additional assistance.  You can just post a comment asking for help and leave the question ungraded.   Experts tend to appreciate that.
Don't specify the "DIALOG" window class name.  The dialog class was not written to be a transparent window.   (transparency is "vouluntary"   An transparent window can draw to its window an therefore cover up the windows below it, so naturually the dialog window does so.)

You will need to create your own window class and write your own window procedure for this transparent window.

Let me kow if you have any questions.
hotheartAuthor Commented:
I'm sorry.
I don't know "exact" meaning to create my own window class. In mfc, what is its class type? CWnd?
I am writing a screen capture program. At first, I used "STATIC" in place of "DIALOG". So I got a full screen window, but all region was not transparent.
I didn't know what to insert in place of "DIALOG".

How can I create new window class?
Sorry again..
hotheartAuthor Commented:
nietod, thanks for your help.
I am taking a look at RegisterClass() and WindowProc().

Later I will tell you the result.
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.