|
-
June 27th, 2005, 05:38 AM
#1
Create CWnd problem
hi.
i create cwnd derived class.
Code:
Create(NULL,_T("Errors"),WS_CHILD|WS_CAPTION|WS_MAXIMIZE|WS_MINIMIZE|WS_OVERLAPPED,CRect(100,100,500,500),&CWnd(GetDesktopWindow()),0);
In OnCreate of this window i create CListCtrl and button.
But when i call ShowWindow(SW_SHOW), i see my window icon in task bar,but when i press it,i see window area with copy of my desktop screen,why?
-
June 27th, 2005, 12:29 PM
#2
Re: Create CWnd problem
i think you need to supply WS_VISIBLE flag to the Create function
If there is no love sun won't shine
-
June 27th, 2005, 04:01 PM
#3
Re: Create CWnd problem
 Originally Posted by TOMNKZ
In OnCreate of this window i create CListCtrl and button.
But when i call ShowWindow(SW_SHOW), i see my window icon in task bar,but when i press it,i see window area with copy of my desktop screen,why?
I do not see what are you creating (calling Create member of what class)?
Does your code compile? I have doubt: &CWnd(GetDesktopWindow())
Is your code snippet verbatim?
You also create window that is a child of the desktop window. It is also created without background brush since Windows is using default window class. You should register your own.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
June 27th, 2005, 09:55 PM
#4
Re: Create CWnd problem
I find solution for my problem.
I create window in dll,so it lead to problems. Solution was to create not modal dialog, which parent can be NULL.
Thank you for interest.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|