|
simple.
just delete it......it works!!!
|
|
|
|
|
Change '(LPINLINEIMAGEINFO)' to '(INLINEIMAGEINFO*)'.
then it works well in Pocket PC 2002.
|
|
|
|
|
right.
if you look into htmlview.h (external dependencies) you can look at the INLINEIMAGE struct. They used to have a TypeDef LPINLINEIMAGE for a pointer to a INLINEIMAGE struct, but now, they don't have that typedef. So you can just use INLINEIMAGE* instead of LPINLINEIMAGE or write a typedef yourself....
but is't still strange that LPINLINEIMAGE is gone in the header...
|
|
|
|
|
I can't figure out how to get the word selected(by stylus) on HTML window.
For Example - if the stylus is dragged on a word/ words, on a toolbar event, i want to capture the word/words selected.
HELP! HELP! HELP!.
Thanks,
biswa.
|
|
|
|
|
Well i got the answer
|
|
|
|
|
Would be cool if you could post it here...
since I have a similar Problem...
|
|
|
|
|
HWND hwnd = ::GetWindow(m_hwndHtml, GW_CHILD);
//to copy selected word/s to clipboard
::SendMessage(hwnd, WM_COMMAND, 0x139E, 0); //for pc2002
::SendMessage(hwnd, WM_COMMAND, 0x156BA, 0);//for pc2000
|
|
|
|
|
If only that were true!
My code has an HTML control embedded in a dialog, and that is the property of a TreeView of files. When I select a file from the treeview, and choose "HTML" on my menu, it executes the following code:
case ID_LAUNCH_HTML:
________if(hHTMLDlg)________// this is the HTML display window
________________DestroyWindow(hHTMLDlg);
________hHTMLDlg = CreateDialog(hInst,(LPCTSTR)IDD_HTMLVIEW, hwnd, (DLGPROC)HTMLDlgProc);
________SendMessage(hHTMLCtrl, WM_SETTEXT, 0, (LPARAM)(LPCTSTR)_T(""));
________SendMessage(hHTMLCtrl, DTM_ENABLESHRINK, 0, g_bMakeFit);
________if (!SHCreateMenuBar(&mbiHTML))
________________MessageBox(hwnd, L"SHCreateMenuBar Failed", L"Error", MB_OK);
________hwndCB = mbiHTML.hwndMB;
________if(!bHTMLLoaded){
________________hFile = CreateFile(tPath, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
________________________FILE_ATTRIBUTE_NORMAL,NULL);
________________if(hFile==(void*)-1)
________________________ShowLastError();
________________dwHTMLFileSize = 2 + GetFileSize((HANDLE)hFile,NULL); // 2 bytes must be 0 to get 1 wide-char terminus
________________if(pHTMLSource)
________________________delete pHTMLSource;
________________pHTMLSource = new char[dwHTMLFileSize];
________________memset(pHTMLSource,0,dwHTMLFileSize);
________________ReadFile(hFile,pHTMLSource,dwHTMLFileSize,&BytesRead,NULL);
________________// this is the sourcefile needed to fill the HTML dialog
________________CloseHandle(hFile); // pHTMLSource + (dwHTMLFileSize - 40)
________________}
________lRes = SendMessage(hHTMLCtrl,WM_SETTEXT,0,(LPARAM)(LPCTSTR)TEXT(""));
________SendMessage(hHTMLCtrl,DTM_CLEAR,0,0);
________SendMessage(hHTMLCtrl,DTM_ADDTEXT,false,(LPARAM)/*(LPCTSTR)*/pHTMLSource);
________SendMessage(hHTMLCtrl,DTM_ENDOFSOURCE,(WPARAM)0,(LPARAM)0);
________SendMessage(hHTMLCtrl,DTM_FITTOWINDOW, 0, (LPARAM)VARIANT_TRUE);
________bHTMLLoaded = true;
________ShowWindow(hHTMLDlg,SW_SHOWNORMAL);
________MoveWindow(hHTMLCtrl,0,0,240,268, true);
________ShowWindow(hHTMLCtrl,SW_SHOWNORMAL);
________MoveWindow(hHTMLDlg, 0, 0, 240, 294, true);
________ShowWindow(g_hwndTreeView,SW_HIDE);________________
________ShowWindow(g_hwndEdit,SW_HIDE);________________
________BringWindowToTop(hHTMLCtrl);
________hFocus = GetFocus();
________SetFocus(hHTMLCtrl);
________hFocus = GetFocus();
________break;</small>
As you can see, the handle for the htmlctrl is "hHTMLCtrl". I assure you that this code successfully puts the selected file into HTML display on this control.
But when I send it to a section of code that contains your suggestion
HWND hwnd = ::GetWindow(hHTMLCtrl, GW_CHILD);
::SendMessage(hwnd, WM_COMMAND, 0x139E, 0); //for pc2002
::SendMessage(hwnd, WM_COMMAND, 0x156BA, 0);//for pc2000
I find that (1), this handle has no child windows, and
(2) if I use the handle instead of the child you suggest, the clipboard is empty. I am using Pocket PC2002, but I have tried both the two different WParam values and neither does anything.
But you have done this much: you have provided a good basis for discussion.
(I have read this same solution in the past and tried and failed the same way, so this is well publicized code.
There must be something one can do, but it is also true that the version of IE (Pocket IE) also lacks the functions to copy selected text or any equivalent of the CTRL-F find of the desktop version.
Yet the text is there — somewhere. There's got to be a way to get my hands on it!
|
|
|
|
|
I wonder if this was carried over into CE?
BUG: CHtmlView Leaks Memory by Not Releasing BSTRs in Several Methods
The information in this article applies to:
The Microsoft Foundation Classes (MFC), when used with:
Microsoft Visual C++, 32-bit Enterprise Edition 6.0
Microsoft Visual C++, 32-bit Professional Edition 6.0
Microsoft Visual C++, 32-bit Learning Edition 6.0
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q241750&
The following methods in CHtmlView cause a memory leak if called:
Navigate
GetFullName
GetType
GetLocationName
GetLocationURL
LoadFromResource(LPCTSTR lpszResource)
LoadFromResource(UINT nRes)
|
|
|
|
|
I noticed the example code never calls CSTHtmlDialog::DeleteHtmlImages() nor does it ever call destroy window (since it called ::CreateWindow in CSTHtmlDialog::CreateHtmlWindow) - i forget does this window get automatically destroyed when it's parent is destroyed?
Anyone?
|
|
|
|
|
Hi.
Your sample interest me but use HtmlView.dll. Do you know if this dll is still support under Windows CE .net 4.0?
I use embedded Visual C++ 4.0 under WinCE .net 4.0. Every sample I found didn't work. There is compilation problem.
I'm trying to see if I can integrate htmlview.dll in my SDK but if you have an idea to help me, please let me know.
Thanks a lot.
Christian Dubois
|
|
|
|
|
Should be supported in WinCE .net 4.2.
Don't know yet but that's what Microsoft web sites claim.
|
|
|
|
|
I can use html text in my html control for PocketPC 2003, but images fail to display. I hate to think I'll have to try to host the CF's html control to fix this incompatibility...
|
|
|
|
|
hi everyone
I follow the step of "Using STHtmlDialog library",but have one error that is "~\STHtmlDialog\STHtmlDialog.cpp(4) : fatal error C1083: Cannot open include file: 'resource.h': No such file or directory"
Please tell me how to debug!
GOLDEN
|
|
|
|
|
hi everyone
Please tell me how to find the document that about the HtmlView or WebBrowser Control in EVC3.0 . Because i want to develop a web browser application . But i can't find the HtmlView Control in the EVC tool . I ever developed the basic function of web browser on PC . But i can't find the HtmlView Control so i can't develop the browser function that be like "goback" or "gohome"
CHICKEN
|
|
|
|
|
If i want to use Existing ListView Class and i want to call that class on link of next page.how could i do it?i am not fully aware of html control class of pocket pc?
|
|
|
|
|
I keep getting an Access Violation on exit when running as a WCE ARM Debug build on my iPAQ Pocket PC. I get this same Access Violation on exit when I just use the HTML Viewer directly (without your wrapper). Does this not work on Pocket PC? Or am I doing something else wrong?
Any help appreciated.
Thanks,
/Heather
|
|
|
|
|
Hmmm... I'm getting a similer odd error in my program; think I've tracked it down to flipping between multiple CHTMLViews in some of my property pages. "tracked it down" is a slippery statement, of course.
I copied the supplied CSTHtmlDialog class and made a CSTHtmlView class so I could tack it into a tabbed propertypage (several tabs in fatc )
I am looking into the lack of destroywindow calls in this class. Heather, did you ever find your bug?
Thanks, I will update this comment if I find the culprit!
|
|
|
|
|
well, after few hours of tracing down this bug, it turns out that the htmlview control cannot handle long file names!!
of course on the MSDN example its something like:
SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE, (LPARAM)TEXT(""));
now.. try replacing "pic.gif" with "whycantstupidmshandlelongfilenames.gif" and you will get the access violation error.
|
|
|
|
|
How can I handle the events occur when button click or when the selected elenment on combobox? Is there no way?
|
|
|
|
|
-Press Ctrl+W
-Handle any events that you want
or
-Double click on your button in resource view
I'm a Vietnamese student
|
|
|
|
|
How can I use the 'goback','goforward'and 'goHome'?
|
|
|
|
|
How can I load a html file in this programme ?
Thanks !
|
|
|
|
|
|
I want to load a html file in this app directly,
For example,
SetHtml(_T("\\1.htm")) ;
But this method is no use.
How could I ?
Thanks for your help !
Dalek
|
|
|
|
|