Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Save Text File in SDI application Pin
Rajkumar R9-May-08 4:08
Rajkumar R9-May-08 4:08 
AnswerRe: How to Save Text File in SDI application [modified] Pin
asrelu10-May-08 23:29
asrelu10-May-08 23:29 
QuestionHow to Disable Menu item in SDI application Pin
phanindra varma8-May-08 19:02
phanindra varma8-May-08 19:02 
AnswerRe: How to Disable Menu item in SDI application Pin
Nibu babu thomas8-May-08 19:09
Nibu babu thomas8-May-08 19:09 
AnswerRe: How to Disable Menu item in SDI application Pin
Mukesh Kumar8-May-08 19:15
Mukesh Kumar8-May-08 19:15 
GeneralRe: How to Disable Menu item in SDI application Pin
phanindra varma9-May-08 1:07
phanindra varma9-May-08 1:07 
GeneralRe: How to Disable Menu item in SDI application Pin
phanindra varma9-May-08 20:24
phanindra varma9-May-08 20:24 
QuestionTree Collapsing if i delete any node of the Tree. Pin
Royaltvk8-May-08 18:46
Royaltvk8-May-08 18:46 
Hi,

Iam Using CTreeView to Construct a Tree. If i delete any node in the tree

it is collapsing.

void CRunSetView::DeleteFilters(HTREEITEM hselected)<br />
{<br />
	CTreeCtrl& TreeCtrl = GetTreeCtrl();<br />
	HTREEITEM Parent = TreeCtrl.GetParentItem(hselected);<br />
	<br />
	short nRunsetId = GetItemID(Parent);<br />
	HTREEITEM ChildItem = TreeCtrl.GetChildItem(hselected);<br />
	<br />
	do<br />
	{<br />
		short nMapId = GetItemID(ChildItem);<br />
	<br />
	<br />
		CMigratorClient* pManager = GetDocument()->GetManagerPtr();<br />
	<br />
		CMigratorDoc* cmap = GetDocument();<br />
		_RecordsetPtr rsMap;<br />
		rsMap.CreateInstance(__uuidof(Recordset));<br />
<br />
		<br />
		CString strSQL;<br />
		strSQL.Format(_T("SELECT * FROM DQMap WHERE ID = %d"),nMapId);<br />
		rsMap->Open( _variant_t( strSQL ), _variant_t(( IDispatch *) pManager->GetDatabasePtr(), <br />
			true), adOpenStatic, adLockOptimistic, adCmdText);<br />
		<br />
		if ( !rsMap->GetEndOfFile() )<br />
		{<br />
			CString MapNm = VariantToStr( rsMap->Fields->Item["FilterName"]->Value );<br />
			rsMap->Close();<br />
			<br />
			<br />
			_RecordsetPtr rsMapDQ;<br />
			rsMapDQ.CreateInstance(__uuidof(Recordset));<br />
			strSQL.Format(_T("SELECT * FROM DQMap WHERE FilterName = '%s'"),MapNm);<br />
			rsMapDQ->Open( _variant_t( strSQL ), _variant_t(( IDispatch *) pManager->GetDatabasePtr(), <br />
				true), adOpenStatic, adLockOptimistic, adCmdText);<br />
			<br />
			while( !rsMapDQ->GetEndOfFile() )<br />
			{	<br />
				<br />
				nMapId = _ttoi( VariantToStr( rsMapDQ->Fields->Item["ID"]->Value ));<br />
				<br />
			<br />
				short mapid;<br />
				<br />
				<br />
			<br />
				CMigratorClient* pManager = GetDocument()->GetManagerPtr();<br />
				pManager->DeleteRunSetMap(nRunsetId,nMapId);<br />
			<br />
				cmap->deletefilters(nMapId);<br />
			<br />
				rsMapDQ->MoveNext();<br />
				<br />
				<br />
			}<br />
			rsMapDQ->Close();<br />
		}<br />
	<br />
		<br />
	}while((ChildItem = TreeCtrl.GetNextSiblingItem(ChildItem))!=NULL);<br />
<br />
	HTREEITEM item = GetRootItem();<br />
	DeleteItem(item);<br />
	OnInitialUpdate();<br />
<br />
<br />
	return;<br />
}<br />



Plz look at it , give any idea.
QuestionAutorun Application MFC Pin
capint8-May-08 17:32
capint8-May-08 17:32 
AnswerRe: Autorun Application MFC Pin
Mukesh Kumar8-May-08 18:13
Mukesh Kumar8-May-08 18:13 
GeneralRe: Autorun Application MFC Pin
capint8-May-08 18:18
capint8-May-08 18:18 
GeneralRe: Autorun Application MFC Pin
Mukesh Kumar8-May-08 18:27
Mukesh Kumar8-May-08 18:27 
QuestionRe: Autorun Application MFC Pin
Mukesh Kumar8-May-08 22:05
Mukesh Kumar8-May-08 22:05 
AnswerRe: Autorun Application MFC Pin
capint8-May-08 22:15
capint8-May-08 22:15 
GeneralRe: Autorun Application MFC Pin
Mukesh Kumar8-May-08 22:25
Mukesh Kumar8-May-08 22:25 
GeneralRe: Autorun Application MFC Pin
capint8-May-08 22:45
capint8-May-08 22:45 
Questionwho can help me with suffix tree construction? Pin
jimmili8-May-08 17:18
jimmili8-May-08 17:18 
AnswerRe: who can help me with suffix tree construction? Pin
Mukesh Kumar8-May-08 18:39
Mukesh Kumar8-May-08 18:39 
Questionhow can vc++ call fortran's array dll? Pin
YUHONGWEI8-May-08 16:27
YUHONGWEI8-May-08 16:27 
AnswerRe: how can vc++ call fortran's array dll? Pin
leckey8-May-08 16:39
leckey8-May-08 16:39 
GeneralOT Pin
CPallini9-May-08 8:03
mveCPallini9-May-08 8:03 
QuestionHow to change the Scrollbar's color and picture of CTreeCtrl control in VC++6.0? Pin
xqhrs2328-May-08 15:52
xqhrs2328-May-08 15:52 
AnswerRe: How to change the Scrollbar's color and picture of CTreeCtrl control in VC++6.0? Pin
xqhrs23214-May-08 17:20
xqhrs23214-May-08 17:20 
QuestionThread Name Pin
ForNow8-May-08 15:47
ForNow8-May-08 15:47 
AnswerRe: Thread Name Pin
Rajkumar R8-May-08 20:18
Rajkumar R8-May-08 20:18 

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.