Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

mfc42d.dll access violation

I have created a an CW NI Measurement Studio Project and copied and pasted my existing VC++ Project into it.
All is compiling and linking correctly, but during run time, the error:
MFC42D.Dll AccessViolation occurs.

Using the Debug Call Stack window, this points me to 2 lines which use
"GetDlgItem(btnInfo[i].btnId)->SetWindowText(btnInfo[i].btnText);" and
" GetDlgItem(btnInfo[i].btnId)->ShowWindow(SW_NORMAL);"

Is there any way to get around this problem?
Many thanks,
CRiley
0 Kudos
Message 1 of 2
(3,787 Views)
Are you using multiple threads? You need to do some fiddling to update an MFC control from a different thread.

Or, did you statically link the MFC library? Measurement Studio chokes when you use the libs instead of the dlls...
Message 2 of 2
(3,787 Views)