HTML Help #4

OK, I'm probably starting to bore people now, but I'm really struggling to 
get my CHM file displayed inside my application. I have made a slight 
advance and managed to get it partially displaying inside a CHtmlView, but 
the left hand side of the CHM file doesn't appear (index, search tabs etc). 
I have since discovered that the left hand side of a CHM file is an activeX 
component HHCTRL.ocx, but there is no design time support for C++ - see 
notes section of this page:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconocxov.asp

Can anyone give me some guidance with inserting an activeX component into my 
MFC application. I thought perhaps I could create a splitter view and insert 
the HHCTRL on the left and the HTML part on the right - perhaps there is an 
easier way? 


0
contactGT (36)
11/16/2006 5:08:50 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
793 Views

Similar Articles

[PageSpeed] 41

"GT" <ContactGT@hotmail.com> wrote in message 
news:455c9b24$0$10532$9a6e19ea@unlimited.newshosting.com...
> OK, I'm probably starting to bore people now, but I'm really struggling to 
> get my CHM file displayed inside my application. I have made a slight 
> advance and managed to get it partially displaying inside a CHtmlView, but 
> the left hand side of the CHM file doesn't appear (index, search tabs 
> etc). I have since discovered that the left hand side of a CHM file is an 
> activeX component HHCTRL.ocx, but there is no design time support for 
> C++ - see notes section of this page:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconocxov.asp
>
> Can anyone give me some guidance with inserting an activeX component into 
> my MFC application. I thought perhaps I could create a splitter view and 
> insert the HHCTRL on the left and the HTML part on the right - perhaps 
> there is an easier way?
>

First, you must include the HtmlHelp.lib file in your application linker 
settings and set the include directory for the HtmlHelp/include folder. 
Then, in the application's InitInstance function you need to change the 
default help file extension to chm files.

 if (!ProcessShellCommand(cmdInfo))
  return FALSE;                     //   << after this line.

 // Change the extension for the default help file
 CString strHelpFile = m_pszHelpFilePath;
 strHelpFile.Replace(".HLP", ".chm");
 free((void*)m_pszHelpFilePath);
 m_pszHelpFilePath = _tcsdup(strHelpFile);
 // ---------------------------------------------------

This changes 'MyCoolApp.hlp' to 'MyCoolApp.chm'.

Now you need handlers for the normal F1 keys and the Help menu items the 
user will use. These are added using ClassWizard and these are just 
examples. You will have to configure the topics to your own help file(s).

 // ---------------------------------------------------
void CMainFrame::OnHelp()
{
 CWinApp* pApp = AfxGetApp();
 CString sHelpPath;
 sHelpPath.Format("%s::/main.htm", pApp->m_pszHelpFilePath);
 HtmlHelp(0, sHelpPath, HH_DISPLAY_TOPIC, 0);
}

void CMainFrame::OnHelpIndex()
{
 CWinApp* pApp = AfxGetApp();
 HtmlHelp(0, pApp->m_pszHelpFilePath, HH_DISPLAY_INDEX, 0);
}

void CMainFrame::OnHelpSearch()
{
 CWinApp* pApp = AfxGetApp();

 HH_FTS_QUERY q ;
 memset(&q, 0, sizeof(HH_FTS_QUERY));
    q.cbStruct = sizeof(HH_FTS_QUERY);
    q.fUniCodeStrings = FALSE;
    q.pszSearchQuery = "";
    q.iProximity = HH_FTS_DEFAULT_PROXIMITY;
    q.fStemmedSearch = FALSE;
    q.fTitleOnly = FALSE;
    q.fExecute = TRUE;
    q.pszWindow = NULL;

 HtmlHelp(0, pApp->m_pszHelpFilePath, HH_DISPLAY_SEARCH, (DWORD)&q);
}
// ---------------------------------------------------

HTH
Mark



0
11/16/2006 6:16:53 PM
Scratch my last ignorant input. I didn't fully read the post.

Sorry. 


0
11/16/2006 6:19:20 PM
Reply:

Similar Artilces:

userform help
I'm trying to insert data into the first empty cell. My code keeps overwriting the last entry...could someone help me figure out where I've messed up? Thank you in advance Dawna Private Sub CommandButton2_Click() Dim rRng As Range Set rRng = Range("A" & Range("A" & Rows.Count).End(xlUp).Row) With rRng.Offset(rRng.Count + 1, 0).Select rRng.Offset(1, 1) = Me.TbDate rRng.Offset(1, 3) = Me.cboname rRng.Offset(1, 5) = Me.TbPO rRng.Offset(1, 6) = Me.TbCustom Private Sub CommandButton2_Click() Dim rRng As Range LastRow = Range("A&qu...

RFR Interface Errors HELP!
Help! I keep getting the following errors on our Exchange 2k3 server. It's running on a Win2k3 DC that is also a Global Catalog server. It's been in this configuration since Exchange 2k3 was released. Suddenly, I'm getting these odd errors: Event Type: Error Event Source: MSExchangeSA Event Category: RFR Interface Event ID: 9143 Date: 4/19/2006 Time: 7:15:17 AM User: N/A Computer: SERVER_NAME_HERE Description: Referral Interface cannot contact any Global Catalog that supports the NSPI Service. Clients making RFR requests will fail to connect until a Global Catalog becomes av...

help balancing account
I'm misunderstanding something fundamental about balancing accounts in MS Money 2004. To get started I downloaded several ofx files from my bank and imported them. I marked all the transactions as reconciled and tried to balance the account. My statements show a starting and ending date and a beginning and ending balance. I have tried entering a statement starting date for "Statement date:" and the starting and ending balance from that statment. The result I get is: "Money has calculeated a different starting balance than the one you entered." Why is it asking me for...

Send Direct Email does nothing
I've been searching for a solution to this issue for a few days now, so whoever can help me resolve this will get a large supply of kudos! Here's the deal: This sytem was recently upgraded from 1.2 to 3.0. I did the upgrade myself and my user belongs to the powerful groups in both Active Directory and CRM so I'm pretty darn sure I've got the correct privledges. I created a Contact in CRM (another version of myself with an email at an external domain) and clicked 'Send Direct Email'. I received it and it was logged into history properly. Yeah! I then created anoth...

Help with a batch file
I have an application to image my hard disk partitions. I can run the application from commandline, specifying, among othjer options, the partition to target, and the location and name of the output image file. Here's what I want to do. List all the existing image files in the output path. They will be in the format C_Drive-001.tbi, and C_Drive-002.tbi etc. I want to find the seqence number of the last file, and use it to generate the filename for the next file. In this case it will be C_Drive-003.tbi. On the succesfull completion of the image, then delete the oldest ima...

HELP!!! Can't get forumla figured out!
Hello, This is my first posting to this forum, and I haven't been able to search using the right criteria (not even sure what I would search under) to find what I need so I thought I would post a thread with the question. I have an access query that gives me the results in a spreadsheet layout, with 2 worksheets on it. I need to create a forumla that will look at the data on the 2nd sheet and compare the values in 2 particular columns with the value in one cell on the 1st sheet and populate a different cell on the 1st sheet with a count of entries from the 2nd sheet. If Sheet B, Colu...

Find feature does not work with HTML messages (Content-type: text/html)
I have Outlook 2000 SP-3 running under Windows ME. When using the Find feature to locate all e-mails with a given word in the message, no items are found if the e-mails are of "text/html" content-type. The Find feature appears to work for any messages that have URLs embedded and are "multipart/alternative" or "text/plain" content-type. I noticed a similar post several months ago (see http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=%23qSBYIssDHA.2224%40TK2MSFTNGP09.phx.gbl). Is there a work-around for this problem, or should this be reported t...

Help! #5
How can I filter single columns say three out of eight columns without setting the autofilter for all the columns? Any help much apreciated. Select your columns (including headers) and apply autofilter. Anyway, since autofilter filters out data by hiding rows, columns not included in autofilter wil also be hidden. (please excuse my hefty english) -- AP "Pat Watson" <pat.n.watson@baesystems.com> a �crit dans le message de news: 4496a1e0$1_1@glkas0286.greenlnk.net... > How can I filter single columns say three out of eight columns without > setting the autofilt...

Help with Combo-box
Hey everyone, hopefully someone's run across a problem similar to this and their is a (simple :) solution). Basically I have a simple combo-box that is displayed in a dialog. Now, the problem is that I have around 7200 entries that I want to appear in that box as valid selections...well thus far I haven't been able to get that many entries as a possibility (the combo-box simply refuses to allow me to enter that many fields of data). :( Okay, I tried googling this (thought maybe there was a readily defined maximum on combo-box data size) but I couldn't find anything that wou...

Need help extracting text from EDLs
I really am trying to learn this stuff, but I haven't programmed anything since my TRS-80 Basic days and I'm a bit overwhelmed. I want to extract text from Edit Decision Lists so that I have a list of shots used in a film. Here is an example of one event of an EDL: 002 TAPE004 V C 04:45:22:06 04:45:24:14 02:00:08:00 02:00:10:08 FROM CLIP NAME: 7C-4_B_ DLEDL: PATH: /raids/luc_1/bun/reel_02/oscans/1222/bun_7c_4_b_02/2048x1556/ The text that follows "FROM CLIP NAME:" is the name of the clip that I want to extract so that I have a document on onl...

HELP SCREENS, can't get help..
HELP SCREENS, can't get help.. 100723 1900 no pun.. can't get help on how to turn off "TILE" windows if using the term correctly. had seen setting somewhere, to stop Excel from minimizing to a narrow window when help opens (how the heck supposed to compare help to work doing when reducing window on us: cannot read window). where is the setting to stop windows / excel help from resizing to a narrow screen, when you open help. Top left of the help window autotile icon (looks like double page). It toggles between the help andexcel windows being tiled and vo...

Durations keep changing... Help!
Ok... it's me again - brand new user... I need to list resources (sometimes multiple) for each task, but ONLY show it shows up on a report for each person. We do not assign or track real/actaul hours. So here's what I've done to try to simplify... Task #1: Tasks/Advanced Tab: "Must Start On" with a start date (this is the only constraint I've set in the project); Fixed Duration; Effort Driven unchecked All other tasks have the same settings except no constraint date and default to "As Soon as Possible." Each Resource: Booking type - P...

HELP! When I removed Office XP did I lose by inbox file?
I didn't archive my inbox and personal folders before removing Office XP. Now I have reinstalled Office XP and thought I could find my old data files. but all of the import and repair tools work with PST which I don't have. I remember that previously there were seperate inbox files and can not find them now. Thank you for your input. Ron Be sure to show hidden and system files on your computer and then do a search for *.pst. This should get you started... "Ron" <anonymous@discussions.microsoft.com> wrote in message news:093b01c3ba63$265a8120$a401280a@phx.gbl....

Ex5.5 to E2003 intra org migration ...help
Hi.. Berfore I get to issue I would first like to begin by asking the following question..>> There seems to be some difference between Exchange 2003 and Exchange 5.5 and how permissions are applied to public folders. Exchange 2003 uses Active Directory objects, such as users and security groups; and Exchange 5.5 uses Exchange objects, such as mailboxes and distribution lists. This means to apply permissions to public folders, Active Directory must have the equivalent to an Exchange distribution list which is Universal security groups ..As a result to keep the permmisions on Exchan...

CRM 4.0 Client Rollups ( all of them) fail
All- Have a CRM 4.0 install and have applied the rollups to 4 level- all server rollups went fine. When trying to apply a roll up ( I tried 1 2 4 and 5 ) I am getting a failure Thanks for the look! here is part of the log- 11:17:56| Info| === Managed setup logging started: 7/10/2009 11:17:56 AM === 11:17:56|Verbose| Method entry: Microsoft.Crm.UpdateWrapper.UpdateSetup.Initialize 11:17:56|Verbose| Method entry: Microsoft.Crm.Setup.Common.SetupBase.Initialize 11:17:56|Verbose| Method exit: Microsoft.Crm.Setup.Common.SetupBase.Initialize 11:17:56|Verbose| Method exit: Microsoft.Crm.UpdateWra...

Rebar help
Does anyone know a good example of a Rebar control like the ones in VC++ 6 enviornment? Also, how to implement a dropdown toolbar menu? Thanks in advance. Bruce, Here, you'll find lots of articles - I'd be surprised if you don't find one matching your needs: http://www.codeguru.com/Cpp/controls/toolbar/ http://www.codeproject.com/docking/ Johan Rosengren Abstrakt Mekanik AB "Bruce" <xg1@hotmail.com> a �crit dans le message de news:uUlAHiNHEHA.324@tk2msftngp13.phx.gbl... > Does anyone know a good example of a Rebar control like the ones in VC++ 6 > en...

Publisher help #3
I created a website and i am able to upload it and view it in firefox but not in any version of IE. Not exactly what i did wrong. But any help would be appreciated. Thanks Astro Repost this question in microsoft.public.publisher.webdesign newsgroup and add the URL to your problem website. -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression "Astroda" <Astroda@discussions.microsoft.com> wrote in message news:2ADC0F87-CD62-421D-8088-61541AD6117B@microsoft.com... > I created a website and i am able to upload it and view it in firefox but > not > in a...

newbie needs help in Ezcel programming
Hi everyone, please help me with this, newbie to Excel. I know what I want but, but dont know how to get it! I have a spreadsheet called Rawdata.xls and within that a sheet called "table a". The sheet contains data within B10:I100 where column b contains a list of non-unique codes, and column C contains a number of unique identifiers. Another spreadsheet called Tables.xls contains a sheet called "Numbers". Cell B10 contains a list of all the codes contained in a defined range (which is the same as all the codes in column b of "table a" in RawData.xls What I ...

Help on Outlook automation
Hi all, I need to register my callback functions with outlook, to get notifications on events like new mail received and retrieve the mail subject line and sender. I want to do the same through managed code. Any idea, how to achieve it? Regards, Neo You will probably want to post this in one of the Outlook programming groups. The real experts with code hang out there and seldom slum in these general groups. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without re...

Help with a formmula change in a "flag" parameter!
The formula I have below in Column R works just fine. It creates a flag for me (in Column R) that lets me know one of two things: “Client Failed to Enroll on Time”, and “Return Referral Form to Referent”. Here is that formula: =IF(H4="","",IF(K4<>"","",IF(S4="Sent","Client Failed to Enroll on Time",IF(AND(K4="",TODAY()>WORKDAY(H4,10,AA4:AA12)),"Return Referral Form to Referent","")))) The one change (addition) that I’d like to make, is this: If Column N is toggled to say “Hudson ...

Blocking HTML Email
As many of you know, spammers love to use embedded html in email so that the unsuspecting recipient gets a web page or content once the email is opened. Unfortunately, most of these are linking back to "offensive" sites. Is there a way to block these through the Outlook client? Dave <anonymous@discussions.microsoft.com> wrote: > As many of you know, spammers love to use embedded html in > email so that the unsuspecting recipient gets a web page > or content once the email is opened. Unfortunately, most > of these are linking back to "offensive" sites...

Landed Costs Setup help
Hello, I would appreciate some advice on landed costs setup. Let=92s say I import goods from Germany. I use a shipping company called CargoShipers, Inc. CargoShippers takes care of handling the shipping costs, duty and inspection fees. So I go into inventory and setup 3 service type items for shipping, duty and inspection. But what do I set the inventory asset account to? These are really expenses right? Then once I create the service type inventory items, I need to create 3 landed cost ids =96 one for each type and assign those ids to CargoShippes as the vendor correct? I...

OUTLOOK TASKS #4
EVERYTIME I TRY TO OPEN THE TASKS ON MY OUTLOOK THE HOURGLASS APPEARS FOR A FEW SECONDS AND THEN IT SAYS MICROSOFT OUTLOOK HAS ENCOUNTERED A PROBLEM AND NEEDS TO CLOSE. WE ARE SORRY FOR THE INCONVENIENCE. IT DOES THIS EVERYTIME! HAS ANYONE EXPERIENCED THIS PROBLEM OR KNOW HOW TO FIX IT? (IT JUST ALL OF A SUDDEN STARTED DOING THIS AFTER MONTHS OF WORKING JUST FINE!) THE TECHNICAL ERROR SIGNATURE IS AS FOLLOWS: APPNAME: OUTLOOK.EXE MODVER: 10.0.2627.1 APPVER: 10.0.2627.1 OFFSET: 001EE955 MODNAME: OUTLIIB.DLL THANKS! ...

Customise Outlook today #4
Hi, I have a rather strange issue i believe with Outlook 2000 as when i click on the "customise outlook today" button on the outlook today page, it does nothing. If anyone knows of a cure can they please e-mail me ASAP at jaymel@nt-tech.com.au as this problem is with a client and is on a very thin timeframe. Regards Jayme Lowe OL2000: You Cannot Customize Outlook Today After You Install Critical Update 813489 for Internet Explorer: http://support.microsoft.com/default.aspx?scid=kb;EN-US;820575 --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the d...

VBA
Hi, I am currently writing a database and what i want it to do is when one particular field is filled in eg. Cylinder, then it will pick up only "cylinder" items. I have tried this code below but it doesnt seem to work. Could someone please help me. Private Sub Job_Installable_AfterUpdate() 'If Job_Installable.[Column](1) = "Cylinder" Then ' 'Forms!OrderForm.ctlSubForm.Form!Controls.NewData ' 'Forms! ' [tblJob_Consumables SubForm]![Job_Consumable Consumable ID].ControlSource = "qlkpConsumableCylinder" 'Else...