Intuitive Navigation

How to navigate to another page?

Method 1

If we want to navigate to page1.html (resource id = 105), it can be implement below.

Resource.h

#define IDR_HTML         104
#define IDR_PAGE1        105

The pertinent parts of the class implementation (in CMyMultiPageDlg.cpp):

LoadFromResource(105)

Why don't we use filename directly?

Method 2

Change IDR to string

Change CMultiPageDHtmlDialog constructor

Replace IDD and IDH to string name

CMyMultiPageDlg::CMyMultiPageDlg(CWnd* pParent /*=NULL*/)
    : CMultiPageDHtmlDialog(_T("mtAPP"), _T("INDEX.HTML"), pParent)

After setting steps above, you can use filename to do navigation.

The pertinent parts of the class implementation (in CMyMultiPageDlg.cpp):

LoadFromResource("PAGE1.HTML")

Navigate page (in *.html)

<a href="PAGE1.HTML">
<button onclick="window.location='INDEX.HTML'">home</button>

results matching ""

    No results matching ""