Click here to Skip to main content
15,888,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can i store output from createprocess() function in an array Pin
WindowsVsLinux9-Oct-09 9:15
WindowsVsLinux9-Oct-09 9:15 
GeneralRe: Can i store output from createprocess() function in an array Pin
Richard MacCutchan10-Oct-09 0:20
mveRichard MacCutchan10-Oct-09 0:20 
GeneralRe: Can i store output from createprocess() function in an array Pin
WindowsVsLinux10-Oct-09 5:39
WindowsVsLinux10-Oct-09 5:39 
GeneralRe: Can i store output from createprocess() function in an array Pin
Richard MacCutchan10-Oct-09 21:20
mveRichard MacCutchan10-Oct-09 21:20 
QuestionBmp's in Dialogs under Vista Pin
Bram van Kampen6-Oct-09 14:05
Bram van Kampen6-Oct-09 14:05 
AnswerRe: Bmp's in Dialogs under Vista Pin
PJ Arends6-Oct-09 14:41
professionalPJ Arends6-Oct-09 14:41 
GeneralRe: Bmp's in Dialogs under Vista Pin
Bram van Kampen7-Oct-09 15:10
Bram van Kampen7-Oct-09 15:10 
QuestionCMFCPropertyGridCtrl from Dll and exe assert Pin
f.fuga6-Oct-09 10:57
f.fuga6-Oct-09 10:57 
Hi,

I am developing a desktop application composed by the main exe and several modules (dll / plug-ins) .
The main modules has a dialog where a CMFCPropertyGridCtrl is used to edit a collection of name/values pair.
Also another dll has a wizard that make use of a property sheet where a CMFCPropertygridCtrl edits another collection of name/values pair.
The application works as expected if only one of these dialog is executed.
No matter what is the sequence, the second time the dialog is opened, the program asserts.
I can open the same dialog more times, and it do not asserts, it asserts only when the second kind of dialog is opened.
The dialog (both) asserts when the mouse pointer is passed over the CMFCPropertyGridCtrl Control, the stack traces from the TrackToolTip function inside the class.
I have tracked the problem to the creation of the tooltip window:

in CMFCPropertyGridCtrl::Init() the call to m_IPToolTip.Create(this) fails:


BOOL CMFCPropertyGridToolTipCtrl::Create(CWnd* pWndParent)
{
ASSERT_VALID(pWndParent);
m_pWndParent = pWndParent;

if (m_strClassName.IsEmpty())
{
m_strClassName = ::AfxRegisterWndClass(CS_SAVEBITS, ::LoadCursor(NULL, IDC_ARROW), (HBRUSH)(COLOR_BTNFACE + 1));
}

return CreateEx(0, m_strClassName, _T(""), WS_POPUP, 0, 0, 0, 0, pWndParent->GetSafeHwnd(), (HMENU) NULL);
}

The first time this function executes, the CreateEx return TRUE and all works as expected.
The second time, only if from a different module (DLL or EXE), m_strClassName is not empty and CreateEx fails with error code 0x00057f e.g. "Warning: Window creation failed: GetLastError returns 0x0000057F" that is ERROR_CANNOT_FIND_WND_CLASS.
I do not use any tooltip, so I could also disable the tooltip feature.

(stack trace of the assertion, when the mouse passes over the grid (WM_MOVE) )

mfc90ud.dll!CWnd::GetWindowRect(tagRECT * lpRect=0x0012f06c) Riga 116 + 0x2a byte C++
mfc90ud.dll!CMFCPropertyGridCtrl::TrackToolTip(CPoint point={...}) Riga 3321 C++
mfc90ud.dll!CMFCPropertyGridCtrl::PreTranslateMessage(tagMSG * pMsg=0x00154e10) Riga 3937 C++
> mfc90ud.dll!CWnd::WalkPreTranslateTree(HWND__ * hWndStop=0x003e0662, tagMSG * pMsg=0x00154e10) Riga 2946 + 0x14 byte C++
mfc90ud.dll!AfxInternalPreTranslateMessage(tagMSG * pMsg=0x00154e10) Riga 233 + 0x12 byte C++


did someone experienced something similar? Am I missing something?
Thank you in advance.

Regards


ing. Federico Fuga
AnswerRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
«_Superman_»6-Oct-09 12:14
professional«_Superman_»6-Oct-09 12:14 
GeneralRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
f.fuga6-Oct-09 20:23
f.fuga6-Oct-09 20:23 
GeneralRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
«_Superman_»7-Oct-09 7:07
professional«_Superman_»7-Oct-09 7:07 
GeneralRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
f.fuga7-Oct-09 9:46
f.fuga7-Oct-09 9:46 
GeneralRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
«_Superman_»7-Oct-09 10:43
professional«_Superman_»7-Oct-09 10:43 
GeneralRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
f.fuga7-Oct-09 23:41
f.fuga7-Oct-09 23:41 
AnswerRe: CMFCPropertyGridCtrl from Dll and exe assert Pin
Oza Priyanka4-Apr-18 6:35
Oza Priyanka4-Apr-18 6:35 
QuestionCStdioFile::ReadString() Method. Pin
Chris Meech6-Oct-09 9:43
Chris Meech6-Oct-09 9:43 
AnswerRe: CStdioFile::ReadString() Method. Pin
PJ Arends6-Oct-09 10:36
professionalPJ Arends6-Oct-09 10:36 
GeneralRe: CStdioFile::ReadString() Method. Pin
Chris Meech7-Oct-09 2:09
Chris Meech7-Oct-09 2:09 
QuestionCreateCompatibleBitmap() retuns 0 , and GetLastError returns 8 , what does error code 8 means? Pin
rambojanggoon6-Oct-09 8:58
rambojanggoon6-Oct-09 8:58 
AnswerRe: CreateCompatibleBitmap() retuns 0 , and GetLastError returns 8 , what does error code 8 means? Pin
CPallini6-Oct-09 9:49
mveCPallini6-Oct-09 9:49 
AnswerRe: CreateCompatibleBitmap() retuns 0 , and GetLastError returns 8 , what does error code 8 means? Pin
«_Superman_»6-Oct-09 12:21
professional«_Superman_»6-Oct-09 12:21 
Questionto change cricheditctrl's window border Pin
prithaa6-Oct-09 8:34
prithaa6-Oct-09 8:34 
AnswerRe: to change cricheditctrl's window border Pin
«_Superman_»6-Oct-09 10:53
professional«_Superman_»6-Oct-09 10:53 
GeneralRe: to change cricheditctrl's window border Pin
PJ Arends6-Oct-09 11:58
professionalPJ Arends6-Oct-09 11:58 
GeneralRe: to change cricheditctrl's window border Pin
prithaa7-Oct-09 0:25
prithaa7-Oct-09 0:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.