Solved

HWND create handle for window

Posted on 2000-02-14
2
852 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
EvenOdd challenge 10 144
firstChar challenge 13 132
Bartender label printing - switch on and off graphics 3 71
Problem to Office 1 40
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

740 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