edt1 problem in vc .net
-
It works fine when I compile under VC 6.0 but when I convert the project to a VC .NET "solution", the following line will return a NULL pointer: Code: CWnd* pWnd = GetParent()->GetDlgItem(edt1); Any helps? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)
-
It works fine when I compile under VC 6.0 but when I convert the project to a VC .NET "solution", the following line will return a NULL pointer: Code: CWnd* pWnd = GetParent()->GetDlgItem(edt1); Any helps? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)
Break the question into steps. Does
GetParent ()
actually return the window you are expecting? Isedt1
still valid? Did you assign a number to it that no longer matches the ID of the control you are trying to access? Is that control actually being created? You can check this using spy++ etc to see if it (a) exists, and (b) has the right ID. Etc. Iain.