Click here to Skip to main content
15,909,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SendMessage/PostMessage Pin
Budric B.19-Oct-04 8:19
Budric B.19-Oct-04 8:19 
GeneralRe: SendMessage/PostMessage Pin
madretierra19-Oct-04 22:30
madretierra19-Oct-04 22:30 
AnswerAnd don't pass pointers between processes Pin
Budric B.19-Oct-04 8:24
Budric B.19-Oct-04 8:24 
AnswerRe: Callback ? Pin
Bob Stanneveld19-Oct-04 9:26
Bob Stanneveld19-Oct-04 9:26 
GeneralRe: Callback ? Pin
madretierra19-Oct-04 22:35
madretierra19-Oct-04 22:35 
GeneralCTreeCtrl Speeding issue Pin
Vikram Kashyap19-Oct-04 3:32
Vikram Kashyap19-Oct-04 3:32 
GeneralRe: CTreeCtrl Speeding issue Pin
BlackDice19-Oct-04 5:43
BlackDice19-Oct-04 5:43 
GeneralRe: CTreeCtrl Speeding issue Pin
Vikram Kashyap19-Oct-04 18:39
Vikram Kashyap19-Oct-04 18:39 
Hi,

the code snippet...

void CInsertBookmark::LoadTreeItems()
{
BeginWaitCursor();
m_pTree.SetRedraw(FALSE); //Works fine in case of lesser records
CString BookMarkType, BookMarkPath, BookMarkName;
BookMarkType.Empty();
BookMarkPath.Empty();
BookMarkName.Empty();

CString TempPath;
TempPath.Empty();

HSTMT hstmt;
SDWORD len = SQL_NTS;
RETCODE rc;

char m_BookMark_Node_Path[256];
char m_BookMark_Node_Name[256];
char m_BookMark_Type[256];

int nIndex = 0;

strTemp.Format("SELECT BookMark_Node_Path, "
"BookMark_Node_Name, "
"BookMark_Type "
"FROM BookMark "
"ORDER BY BookMark_Node_Path");

SQLAllocStmt(m_pdb->m_hdbc , &hstmt);

SQLBindCol(hstmt,1, SQL_C_CHAR, &m_BookMark_Node_Path , sizeof(m_BookMark_Node_Path), &len);
SQLBindCol(hstmt,2, SQL_C_CHAR, &m_BookMark_Node_Name , sizeof(m_BookMark_Node_Name), &len);
SQLBindCol(hstmt,3, SQL_C_CHAR, &m_BookMark_Type , sizeof(m_BookMark_Type) , &len);

if (SQLExecDirect(hstmt, (UCHAR*)(LPCTSTR)strTemp, SQL_NTS) == SQL_ERROR)
{
DisplayErrorMsg(&hstmt);
SQLFreeStmt (hstmt, SQL_DROP);
return ;
}
while(TRUE)
{
rc = SQLFetch(hstmt);
if(rc == SQL_ERROR)
{
DisplayErrorMsg(&hstmt);
SQLFreeStmt (hstmt, SQL_DROP);
return ;
}
else if(rc == SQL_NO_DATA_FOUND)
break;

BookMarkPath.Empty();
BookMarkPath.Format("%s",m_BookMark_Node_Path);

BookMarkType.Empty();
BookMarkType.Format("%s",m_BookMark_Type);

BookMarkName.Empty();
BookMarkName.Format("%s",m_BookMark_Node_Name);

if(BookMarkType.CompareNoCase("Folder") == 0)
{
m_pTree.Initialize(true);
HTREEITEM hItem = m_pTree.GetNext();
while (hItem != NULL)
{
m_pTree.SelectItem(hItem);
TempPath = GetPathFromItem(hItem) ;
if(TempPath.Compare(BookMarkPath) == 0)
{
//Inserting items into tree ctrl
m_pTree.InsertItem(_T(BookMarkName), ILI_CLSDFLD, ILI_OPENFLD, hItem, TVI_SORT);
BookMarkPath.Empty();
BookMarkType.Empty();
break;
}
else
hItem= m_pTree.GetNext();
}
}

if(BookMarkType.CompareNoCase("BookMark") == 0)
{
m_pTree.Initialize(true);
HTREEITEM hItem= m_pTree.GetNext();
while (hItem != NULL)
{
m_pTree.SelectItem(hItem);
TempPath = GetPathFromItem(hItem);
if( TempPath.Compare(BookMarkPath) == 0)
{
//Inserting items into tree ctrl
m_pTree.InsertItem(_T(BookMarkName), ILI_BOOKMARK, ILI_BOOKMARK, hItem, TVI_SORT);
BookMarkPath.Empty();
BookMarkType.Empty();
break;
}
else
hItem= m_pTree.GetNext();
}
}
}

SQLFreeStmt (hstmt, SQL_DROP);
m_pTree.SetRedraw(TRUE);
EndWaitCursor();
}

Cry | :(( Confused | :confused:
GeneralRe: CTreeCtrl Speeding issue Pin
Joel Lucsy19-Oct-04 15:37
Joel Lucsy19-Oct-04 15:37 
Generallooking for a specific c++ object Pin
Vacnez19-Oct-04 3:27
Vacnez19-Oct-04 3:27 
GeneralCListCtrl Navigation Pin
Manoj Singh K.19-Oct-04 3:16
Manoj Singh K.19-Oct-04 3:16 
GeneralWho wrote this CString class Pin
rromerot19-Oct-04 1:53
rromerot19-Oct-04 1:53 
GeneralRe: Who wrote this CString class Pin
Antony M Kancidrowski19-Oct-04 2:17
Antony M Kancidrowski19-Oct-04 2:17 
GeneralRe: Who wrote this CString class Pin
Chris Meech19-Oct-04 2:36
Chris Meech19-Oct-04 2:36 
GeneralRe: Who wrote this CString class Pin
rromerot19-Oct-04 4:20
rromerot19-Oct-04 4:20 
GeneralRe: Who wrote this CString class Pin
RobJones19-Oct-04 4:57
RobJones19-Oct-04 4:57 
GeneralPlease explain code! Pin
Brakanjan19-Oct-04 1:07
Brakanjan19-Oct-04 1:07 
GeneralRe: Please explain code! Pin
Cedric Moonen19-Oct-04 1:42
Cedric Moonen19-Oct-04 1:42 
GeneralRe: Please explain code! Pin
benjymous19-Oct-04 1:48
benjymous19-Oct-04 1:48 
GeneralRe: Please explain code! Pin
Brakanjan19-Oct-04 3:33
Brakanjan19-Oct-04 3:33 
GeneralRe: Please explain code! Pin
Henry miller19-Oct-04 3:21
Henry miller19-Oct-04 3:21 
GeneralRe: Please explain code! Pin
Brakanjan19-Oct-04 3:42
Brakanjan19-Oct-04 3:42 
GeneralRe: Please explain code! Pin
Cedric Moonen19-Oct-04 4:16
Cedric Moonen19-Oct-04 4:16 
GeneralRe: Please explain code! Pin
Brakanjan19-Oct-04 4:36
Brakanjan19-Oct-04 4:36 
GeneralRe: Please explain code! Pin
Cedric Moonen19-Oct-04 4:41
Cedric Moonen19-Oct-04 4:41 

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.