Click here to Skip to main content
16,004,887 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: related shellexecute function Pin
baldha rakesh23-Mar-06 2:35
baldha rakesh23-Mar-06 2:35 
GeneralRe: related shellexecute function Pin
toxcct23-Mar-06 2:37
toxcct23-Mar-06 2:37 
AnswerRe: related shellexecute function Pin
Shoaib Patel23-Mar-06 2:27
Shoaib Patel23-Mar-06 2:27 
QuestionUrgent Please Help!!! Pin
Shoaib Patel23-Mar-06 2:01
Shoaib Patel23-Mar-06 2:01 
AnswerRe: Urgent Please Help!!! Pin
Waldermort23-Mar-06 2:18
Waldermort23-Mar-06 2:18 
GeneralRe: Urgent Please Help!!! Pin
Shoaib Patel23-Mar-06 2:33
Shoaib Patel23-Mar-06 2:33 
GeneralRe: Urgent Please Help!!! Pin
Waldermort23-Mar-06 2:50
Waldermort23-Mar-06 2:50 
GeneralRe: Urgent Please Help!!! Pin
Shoaib Patel23-Mar-06 23:40
Shoaib Patel23-Mar-06 23:40 
Hello waldermot.
u suggested me to take a vector or something like that for storing the links clicked
by the user.
so I took a CStringList in which initially i added all ids of pages.
& whenever user clicks on next Iam getting the next element from list & accordingly calling the functions.
Its working for "Next" navigation

& for previous navigation I have taken one more list into which i am adding all those ids that are getting visited from
"Next" navigation.

it is also working.
But there is some problem which i'll discuss after showing the code snippet which is as follows

void CMyStartPage::OnInitialUpdate()
{

CString strID;

for(int i=1; i <= 20 ; ++i)
{
strID.Format(_T("%d"),i);
m_strMainList.AddTail(strID);
}
m_MainPos = m_strList.GetHeadPosition();
m_PrevPos = NULL;
}

HRESULT CMyStartPage::OnNext(IHTMLElement *pElement)
{
if (m_pos)
{
CString strID = m_strMainList.GetNext(m_Mainpos);
m_strPrevList.AddTail(strID);
int nID = atoi(strID);
//Logic for calling perticular method depending upon id goes here
}
m_Prevpos = m_strPrevList.GetTailPosition();
return S_OK;
}

HRESULT CMyStartPage::OnPrevious(IHTMLElement *pElement)
{
if (m_Prevpos)
{
m_strPrevList.GetPrev(m_Prevpos);
if (m_Prevpos)
{
CString strID = m_strPrevList.GetAt(m_Prevpos);
int nID = atoi(strID);
//Logic for calling perticular method depending upon id goes here
}
}
return S_OK;
}

Suppose there are 4 links, user clicks on "Next" link-1's information gets displayed, again user clicks "Next"
link-2's inf.gets diplayed.
Now user clicks "previous" then link-1's inf. gets displayed.
which is correct, but after clicking previous when user clicks "Next" he assumes that he'll be shown link-2's infom.
but it shows link-3's infor. I think it is because incorrect handling of m_MainPos.
can u plz tell me how to manage it.
so that the navigation works properly.
Thank u.
Questionconversion from Double to unsigned int Pin
ariesaloksingh23-Mar-06 1:43
ariesaloksingh23-Mar-06 1:43 
AnswerRe: conversion from Double to unsigned int Pin
Ștefan-Mihai MOGA23-Mar-06 2:18
professionalȘtefan-Mihai MOGA23-Mar-06 2:18 
AnswerRe: conversion from Double to unsigned int Pin
toxcct23-Mar-06 2:19
toxcct23-Mar-06 2:19 
AnswerRe: conversion from Double to unsigned int Pin
Cedric Moonen23-Mar-06 2:31
Cedric Moonen23-Mar-06 2:31 
QuestionFlush TCP socket Pin
Jiri10023-Mar-06 1:35
Jiri10023-Mar-06 1:35 
AnswerRe: Flush TCP socket Pin
Moak19-Apr-06 7:26
Moak19-Apr-06 7:26 
Questiondisplay data from a db in VC++6 Pin
viperlogic23-Mar-06 1:35
viperlogic23-Mar-06 1:35 
AnswerRe: display data from a db in VC++6 Pin
Waldermort23-Mar-06 2:22
Waldermort23-Mar-06 2:22 
GeneralRe: display data from a db in VC++6 Pin
viperlogic23-Mar-06 2:40
viperlogic23-Mar-06 2:40 
AnswerRe: display data from a db in VC++6 Pin
Ștefan-Mihai MOGA23-Mar-06 2:22
professionalȘtefan-Mihai MOGA23-Mar-06 2:22 
QuestionWhich IDE to use? Pin
Mridang Agarwalla23-Mar-06 0:46
Mridang Agarwalla23-Mar-06 0:46 
AnswerRe: Which IDE to use? Pin
_AnsHUMAN_ 23-Mar-06 0:51
_AnsHUMAN_ 23-Mar-06 0:51 
AnswerRe: Which IDE to use? Pin
toxcct23-Mar-06 2:29
toxcct23-Mar-06 2:29 
Questiongetting started vith VC++ Pin
Mridang Agarwalla23-Mar-06 0:42
Mridang Agarwalla23-Mar-06 0:42 
AnswerRe: getting started vith VC++ Pin
_AnsHUMAN_ 23-Mar-06 0:47
_AnsHUMAN_ 23-Mar-06 0:47 
AnswerRe: getting started vith VC++ Pin
toxcct23-Mar-06 2:13
toxcct23-Mar-06 2:13 
QuestionFinding the detailes of active window Pin
kk_mfc23-Mar-06 0:09
kk_mfc23-Mar-06 0:09 

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.