ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[ACAD 2013] MFC "An unsupported operation was attempted"

2 REPLIES 2
Reply
Message 1 of 3
gatti.massimo
1467 Views, 2 Replies

[ACAD 2013] MFC "An unsupported operation was attempted"

Hi everybody,

everything was working correctly, but

today I changed some controls in a MFC form and now when I execute the: 

 

CAcUiDialog::OnInitDialog();

 

I get a message: "An unsupported operation was attempted"

 

It seems that also others guys got the same problems and it should be a resources problem.

 

So I cheched for duplicates with the tool ResOrg and I tried to renumerate all the resources defines.

 

Then I removed all the macro in the DoDataExchange and the problem was solved, but just adding only a line it crach!!!:

 

void CNodeProperty::DoDataExchange (CDataExchange *pDX) {
		CAcUiDialog::DoDataExchange (pDX) ;

		DDX_Control(pDX, IDC_TXT_GAS, m_GasName);

		DDX_Text(pDX, IDC_NOME, m_Name);
		DDX_Text(pDX, IDC_DESCR, m_Description);
		DDX_Text(pDX, IDC_PIN, m_PIn);
		DDX_Text(pDX, IDC_POUT, m_POut);

		DDX_Text(pDX, IDC_TIN, m_TIn);
		DDX_Text(pDX, IDC_TOUT, m_TOut);
		DDX_Text(pDX, IDC_TSOCKET, m_TSocket);
		DDX_Text(pDX, IDC_FRICTLOSS, m_FrictionLoss);
		DDX_Text(pDX, IDC_CONT, m_Contemporaneity);

		DDX_Control(pDX, IDC_CONT, m_ED_Contemp);
		DDX_Control(pDX, IDC_DIAMETRO, m_ED_Diametro);
		DDX_Control(pDX, IDC_LUNGHEZZA, m_ED_Lunghezza);
		DDX_Control(pDX, IDC_PIN, m_ED_PIn);*/

		DDX_Control(pDX, IDC_POUT, m_ED_POut);
		DDX_Control(pDX, IDC_TIN, m_ED_TIn);
		DDX_Control(pDX, IDC_TOUT, m_ED_TOut);
		DDX_Control(pDX, IDC_TSOCKET, m_ED_TSocket);
		DDX_Control(pDX, IDC_FRICTLOSS, m_ED_FrictionLoss);
		DDX_Control(pDX, IDC_NOME, m_ED_Nome);
		DDX_Control(pDX, IDC_TIN2, m_ED_TIn_m3);
		DDX_Control(pDX, IDC_TOUT2, m_ED_TOut_m3);
		DDX_Control(pDX, IDC_AUTOCAD_PRODUCT_TYPE, m_AutoCADProductType);
		DDX_Control(pDX, IDC_CBO_SAP_PRODUCT_GROUP, m_cbo_SAPProductGroup);
		DDX_Control(pDX, IDC_SAP_PRODUCTS_COMPOSITION, m_SAP_Products_Composition);
		DDX_Control(pDX, IDC_SAPProductGroupProperties, m_SAPProductGroupProperties);
		DDX_Control(pDX, IDC_CB_STATO, m_DraftingStatus);
		
		DDX_Control(pDX, IDC_LBL_INLET_FLOW, m_lbl_inlet_flow);
		DDX_Control(pDX, IDC_LBL_OUTLET_FLOW, m_lbl_outlet_flow);
		DDX_Control(pDX, IDC_LBL_INLET_FLOW_L_M, m_lbl_inlet_flow_l_m);
		DDX_Control(pDX, IDC_LBL_INLET_FLOW_M3_H, m_lbl_inlet_flow_m3_h);
		DDX_Control(pDX, IDC_LBL_OUTLET_FLOW_L_M, m_lbl_outlet_flow_l_m);
		DDX_Control(pDX, IDC_LBL_OUTLET_FLOW_M3_H, m_lbl_outlet_flow_m3_h);
		DDX_Control(pDX, IDC_LBL_INLET_PRESSURE_BAR, m_lbl_inlet_pressure_bar);
		DDX_Control(pDX, IDC_LBL_OUTLET_PRESSURE_BAR, m_lbl_outlet_pressure_bar);
		DDX_Control(pDX, IDC_ST_LUNGHEZZA, m_lbl_lunghezza);
		DDX_Control(pDX, IDC_ST_TSOCKET, m_lbl_T_Socket);
		DDX_Control(pDX, IDC_ST_CONT, m_lbl_Contemporaneity);
		DDX_Control(pDX, IDC_ST_DIAMETRO, m_lbl_Diameter);
		DDX_Control(pDX, IDC_ST_PERCAR, m_lbl_PressureLoss);
		DDX_Control(pDX, IDC_IMG_BLOCK, m_img_Block);
		DDX_Control(pDX, IDC_LBL_WARD_SIZING, m_lbl_WardSizing);
		DDX_Control(pDX, IDC_CB_WARD_SIZING, m_cbo_WardSizing);
		DDX_Control(pDX, IDC_PSOCKET, m_ED_PSocket);
		DDX_Control(pDX, IDC_ST_PSOCKET, m_lbl_PSocket);
		DDX_Control(pDX, IDC_CHKINCLUDE, m_chkIncludeInBOM);
		DDX_Control(pDX, IDC_CBO_TAG, m_cboTag);
		DDX_Control(pDX, IDC_DESCENT_IN_LENGHT, m_ED_DESCENT_IN_LENGHT);
		DDX_Control(pDX, IDC_DESCENT_OUT_LENGHT, m_ED_DESCENT_OUT_LENGHT);
		DDX_Control(pDX, IDC_DESCENT_IN_PIPE, m_cbo_DescentPipe_IN_PIPE);
		DDX_Control(pDX, IDC_DESCENT_IN_SHIELD, m_cbo_DescentPipe_IN_SHIELD);
		DDX_Control(pDX, IDC_DESCENT_OUT_PIPE, m_cbo_DescentPipe_OUT_PIPE);
		DDX_Control(pDX, IDC_DESCENT_OUT_SHIELD, m_cbo_DescentPipe_OUT_SHIELD);
		DDX_Text(pDX, IDC_CONT2, SpeedValue);
		DDX_Control(pDX, IDC_CONT2, m_ED_Speed);
		DDX_Control(pDX, IDC_ST_CONT2, Speed_Text);
		DDX_Control(pDX, IDC_STATIC7, m_lbl_DraftingStatus);
		DDX_Control(pDX, IDC_STATIC44, m_lbl_Nome);
		DDX_Control(pDX, IDC_STATIC555, m_lbl_Notes);
		DDX_Control(pDX, IDC_DESCR, m_ED_Notes);
	}

 Any Ideas, Any tests to do?

 

 

2 REPLIES 2
Message 2 of 3
owenwengerd
in reply to: gatti.massimo

It sounds like you already know that the problem is code not matching what is in the dialog resource. Make sure your resource macros are only defined in one place, then compare their values to what is in your .rc file. You'll have to change one or the other so they match.

--
Owen Wengerd
ManuSoft
Message 3 of 3
gatti.massimo
in reply to: owenwengerd

Hi,

finally I restored a previouvs working version of the source code.

 

But why everytime I delete a control from the MCF form designer, it makes a mess with duplicate numbers?

 

Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost