MFC classes problem
-
I get an ASSERT(::IsWindow(m_hWnd)) when i try update a CEdit item in from another class like Myclass c; c.OnUpdate(); what do i need to do to solve this issue? Any sugestions appreciated.
-
I get an ASSERT(::IsWindow(m_hWnd)) when i try update a CEdit item in from another class like Myclass c; c.OnUpdate(); what do i need to do to solve this issue? Any sugestions appreciated.
FredrickNorge wrote:
what do i need to do to solve this issue?
IsWindow()
is returning false because them_hWnd
HANDLE is not a valid HANDLE. Windows have to be "Created" before a HANDLE exists. In MFC look at something likeCWnd::Create(.....)
If you are just starting Windows programming you should in use a tutorial and/or invest in book(s).led mike
-
FredrickNorge wrote:
what do i need to do to solve this issue?
IsWindow()
is returning false because them_hWnd
HANDLE is not a valid HANDLE. Windows have to be "Created" before a HANDLE exists. In MFC look at something likeCWnd::Create(.....)
If you are just starting Windows programming you should in use a tutorial and/or invest in book(s).led mike
such as.... VERIFY(m_dlg1.Create(Main::IDD, this)); EDIT: the dialog is already drawn and past OnInitDialog, however i am using tabing so all dialogs are visible at the same time. -- modified at 18:20 Friday 30th March, 2007
-
such as.... VERIFY(m_dlg1.Create(Main::IDD, this)); EDIT: the dialog is already drawn and past OnInitDialog, however i am using tabing so all dialogs are visible at the same time. -- modified at 18:20 Friday 30th March, 2007
FredrickNorge wrote:
however i am using tabing so all dialogs are visible at the same time.
I don't understand the significance of that.
FredrickNorge wrote:
such as.... VERIFY(m_dlg1.Create(Main::IDD, this));
Well that's an example but even an edit control is a window that must be created. Are you creating controls dynamically? Another reason MFC m_hWnd doesn't work is when you try to use them from worker threads.
led mike