Click here to Skip to main content
15,911,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: delete a line from file. Pin
User 268325825-Feb-09 19:36
User 268325825-Feb-09 19:36 
GeneralRe: delete a line from file. Pin
Iain Clarke, Warrior Programmer25-Feb-09 22:02
Iain Clarke, Warrior Programmer25-Feb-09 22:02 
GeneralRe: delete a line from file. Pin
CPallini25-Feb-09 22:13
mveCPallini25-Feb-09 22:13 
GeneralRe: delete a line from file. Pin
David Crow26-Feb-09 3:07
David Crow26-Feb-09 3:07 
Questionhiding nodes in a mfc ctreectrl Pin
kitkat1201225-Feb-09 17:05
kitkat1201225-Feb-09 17:05 
AnswerRe: hiding nodes in a mfc ctreectrl Pin
Hamid_RT25-Feb-09 20:54
Hamid_RT25-Feb-09 20:54 
AnswerRe: hiding nodes in a mfc ctreectrl Pin
Iain Clarke, Warrior Programmer25-Feb-09 22:06
Iain Clarke, Warrior Programmer25-Feb-09 22:06 
Questionupdate 3ds max plugin without restarting 3ds max 2008(Q2) Pin
akira3225-Feb-09 16:09
akira3225-Feb-09 16:09 
I crreate two MFC DLL projects for 3ds max plugin.
Frist project is called maxCameraPathMFC ,which call the fDoExport function of maxCameraPathExporterMFC (second project).

int	maxCameraPathMFC::DoExport(const TCHAR* name,ExpInterface* ei,Interface* i, BOOL suppressPrompts, DWORD options)
{
	// This is where the file export operation occur.

	typedef int (CALLBACK* D_MYEXPORT)(const TCHAR*,ExpInterface*,Interface*,BOOL,DWORD);

	HMODULE l_mod;
	D_MYEXPORT l_export=NULL;
	int l_ret=0;

	l_mod=LoadLibrary("plugins_akira\\2\\maxCameraPathExporterMFC.dle");

	if (l_mod!=NULL)
	{
		l_export=(D_MYEXPORT)GetProcAddress(l_mod,"fDoExport");
		l_ret=l_export(name,ei,i,suppressPrompts,options);

		FreeLibrary(l_mod);
	}

	return TRUE;//FALSE
}


Second project is called maxCameraPathExporterMFC,which is based on KW X-port source code. The project's fDoExport function calls the IGamExporter's DoExport as below:

int __stdcall 
fDoExport(const TCHAR *name, 
						ExpInterface *ei, 
						Interface *i, 
						BOOL suppressPrompts, 
						DWORD options)
{

	if(!suppressPrompts)
	{
		//CDialogExport DialogExport;
		//DialogExport.SetExport(name,ei,i,suppressPrompts,options);
		//if (DialogExport.DoModal()==IDOK)
		{
			//((IGameExporterClassDesc*)GetIGameExporterDesc())->Create();
			//IGameExporter* pIGameExporter=(IGameExporterClassDesc*)GetIGameExporterDesc())->GetIGameExporter();

			IGameExporter* pIGameExporter=new IGameExporter();
			
			pIGameExporter->DoExport(name,ei,i,suppressPrompts,options);

			delete pIGameExporter;
		}
	}

	return TRUE;
}


I export XFile by first project's dll, and then call the second project's fDoExport. The XFile is really exported successfully. But when I close the 3ds max, it appears an error message of Unhandle exception (http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/3ds%20max%20two%20%20plugin%20error%20Q2.JPG).

Colud somebody tell how to solve this probolem?
I put the complete source code at the web (http://cid-fbeb6373d9321a7f.skydrive.live.com/self.aspx/Questions/maxCameraPathQ2.rar)
QuestionCRecordset Empty string Pin
ohming25-Feb-09 15:58
ohming25-Feb-09 15:58 
QuestionON_MESSAGE for CDialog OBJECT Pin
ForNow25-Feb-09 14:28
ForNow25-Feb-09 14:28 
AnswerRe: ON_MESSAGE for CDialog OBJECT Pin
Richard Andrew x6425-Feb-09 15:16
professionalRichard Andrew x6425-Feb-09 15:16 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
ForNow25-Feb-09 15:27
ForNow25-Feb-09 15:27 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
Richard Andrew x6425-Feb-09 16:15
professionalRichard Andrew x6425-Feb-09 16:15 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
ForNow25-Feb-09 16:31
ForNow25-Feb-09 16:31 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
Richard Andrew x6425-Feb-09 16:25
professionalRichard Andrew x6425-Feb-09 16:25 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
Stuart Dootson25-Feb-09 16:32
professionalStuart Dootson25-Feb-09 16:32 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
ForNow25-Feb-09 16:38
ForNow25-Feb-09 16:38 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
Stuart Dootson25-Feb-09 16:43
professionalStuart Dootson25-Feb-09 16:43 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
Stuart Dootson25-Feb-09 16:26
professionalStuart Dootson25-Feb-09 16:26 
GeneralRe: ON_MESSAGE for CDialog OBJECT Pin
ForNow25-Feb-09 16:46
ForNow25-Feb-09 16:46 
QuestionMemory Allocation Error 998 Pin
Richard Andrew x6425-Feb-09 14:06
professionalRichard Andrew x6425-Feb-09 14:06 
AnswerRe: Memory Allocation Error 998 Pin
Stuart Dootson25-Feb-09 16:03
professionalStuart Dootson25-Feb-09 16:03 
GeneralRe: Memory Allocation Error 998 Pin
Richard Andrew x6425-Feb-09 16:08
professionalRichard Andrew x6425-Feb-09 16:08 
AnswerRe: Memory Allocation Error 998 Pin
ky_rerun25-Feb-09 16:25
ky_rerun25-Feb-09 16:25 
GeneralRe: Memory Allocation Error 998 Pin
Richard Andrew x6425-Feb-09 16:30
professionalRichard Andrew x6425-Feb-09 16:30 

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.