Solved

HWND create handle for window

Posted on 2000-02-14
2
853 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven archtype selection in eclipse 1 59
Line meaning 9 99
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 1,693
Work with App store 7 122
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

751 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