Solved

HWND create handle for window

Posted on 2000-02-14
2
851 Views
Last Modified: 2013-11-20
After creating a CWnd-object on the heap I get an assertion-failure according to the ASSERT-function in CWnd::ShowWindow, because the m_hWnd is not defined. But I did the CWnd::Create-Command.
0
Comment
Question by:alexott
2 Comments
 
LVL 12

Expert Comment

by:migel
ID: 2517935
Hi!
pls show your code
do you check Create returns?
0
 
LVL 8

Accepted Solution

by:
VinExpert earned 50 total points
ID: 2518156
HI,

Check whether  U R doing something like this
In the header file
CWnd *pWnd;

In the cpp file
in constructor
pWnd = NULL;

When creating
CRect rect(10,10,200,200);
pWnd = new CWnd;
pWnd->Create(NULL, "MTV", WS_CHILD | WS_VISIBLE | WS_CAPTION | WS_SYSMENU, rect, this, 4545, NULL);
pWnd->ShowWindow(SW_SHOW);

It is working.
Try it out.
VinExpert
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 151
maxBlock challenge 30 142
"Black Box" Testing of Control System Software 2 70
Problem to App 4 97
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

840 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