|
Hello,
I don't know how to copy selected text from HtmlView control.
Sending WM_COPY to the control doesn't work.
Any suggestions are welcome.
Thanks.
|
|
|
|
|
I appear to be the first reply to this lonely message, which is my own complaint as well.
I'm disappointed that there is no greater body of support for the htmlctrl.h control. I am trying to improve my application based around this control, but I have to work with Microsoft's compiler, eMbedded Visual C++.
When I was writing for the PC I used Borland C++Builder, and in the help files, every control was descended from others, and had access to all its parents' messages.
But I can find no mention of messages other than these DTM_ . . . &c., whatever DTM stands for.
Is this part of the "insider track" reserved for the special few, or what?
============
P.S., I'm in doubt if HtmlView is the same as htmlctrl.h. In any case, it is to the latter that I refer, but the problem is the same: no access to the selected text on screen.
|
|
|
|
|
in evc 4.0, i try to add the winproc section but theres an error :
error C2065: 'LPINLINEIMAGEINFO' : undeclared identifier
i try to add htmlctrl.h and Library: htmlctrl.lib in link section but its not solving the problem.
anybody knows how to fix this ?
Riki Risnandar
|
|
|
|
|
Hi,
I use the HTML Control to display HTML, but I see that more I display documents, more memories is used, and never free. Have you a solution?
Thank you
Sophie
|
|
|
|
|
Could I send a DTM_NAVIGATE message to the html ctrl window to make it navigate to a certain URL-like "c:\1.htm"?
Waiting for any helpful hint,thx!
|
|
|
|
|
Put in the string such "file://c:\\1.htm"
Don't forget to set refresh flag if you need refresh.
Don't know much < I, don't care much > I, while I am here ... just be happy
|
|
|
|
|
I tried out your Html based Dialog & it's really cool!
But now I want to use it to navigate to a certain URL,for example:1.htm
I referenced the HtmlHost sample in SDK,and I thought the only thing I need to
do is to Send a message to the ctrl window(m_htmlWnd)-with a flag DTM_NAVIGATE#^&@# and the URL.
Following my train of thought I tested this,but it simply didn't work,could any of my friends here give some hint?Many thanks
|
|
|
|
|
I have alot of data I want to display... Tables are perfect for displaying it, but when i use tables it takes aprox. 16 seconds to load!
if I simply display the text (in html) as raw text (not in tables) it takes 3 seconds to load.
Originally I had the data in one massive table and that took about 30 seconds to load... Then i broke it down into a few tables and that cut down on the load time.
The volume of data Im displaying is about 400 lines. I'm using EVC++ 3.0 for development.
can anyone help? I want the loading time to be less than 5 seconds!
Thanks
--Ben
|
|
|
|
|
If I test the sample File on my Windows2003 PPC (compiled with vcc++4) the bitmap is only shown for a very short time an then all I can see is the well known red cross
Any ideas how to handle this Problem?
|
|
|
|
|
Replace the "break;" to "return (LRESULT)1;" in the function WindowProc.
|
|
|
|
|
I have same problem and when replace the "break;" to "return (LRESULT)1;" <after nm_inline_image="">
the problem is not solved
Dev-nabil
|
|
|
|
|
Can you send me your code?
|
|
|
|
|
thanks for reply
this code :
i try to use bitmap in resource "IDB_1" by LoadImage
//Global ....
HANDLE img; //=NULL;
INLINEIMAGEINFO imgInfo;
case WM_INITDIALOG:
img = LoadImage(hInst,MAKEINTRESOURCE(IDB_1),IMAGE_BITMAP,0,0,0);
SendMessage(hwndHTML, WM_SETTEXT, 0, (LPARAM)"");
SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE,(LPARAM)TEXT("<HTML>"));
SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE,(LPARAM)TEXT("<BODY>"));
SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE,(LPARAM)TEXT("<font size = 8>Normal
Text<\font>"));
SendMessage(hwndHTML, DTM_ADDTEXTW, FALSE,(LPARAM)TEXT("<img src=\"\\1.gif\"
>Image<br>"));
return TRUE;
case WM_NOTIFY:
{
NMHDR * pnmh = (NMHDR *)lParam;
switch (pnmh->code)
{
case NM_HOTSPOT:
{
OutputDebugString(TEXT("NM_HOTSPOT\r\n"));
break;
}
case NM_INLINE_IMAGE:
{
NM_HTMLVIEW* pnm = (NM_HTMLVIEW*)lParam;
imgInfo.dwCookie = pnm->dwCookie;
imgInfo.iOrigHeight = 40;
imgInfo.iOrigWidth = 40;
imgInfo.hbm = img;
imgInfo.bOwnBitmap = FALSE;//
SendMessage(hwndHTML, DTM_SETIMAGE, 0,(LPARAM)&imgInfo);
return (LRESULT)1;
//return TRUE;
//break;
}
...
|
|
|
|
|
nabilssorial wrote:
thanks for reply
this code :
i try to use bitmap in resource "IDB_1" by LoadImage
//Global ....
HANDLE img; //=NULL;
INLINEIMAGEINFO imgInfo;
for the first time in wm2k3 the picture is display for 1 seconds then disappear, after reading this thread (change break to return) the function working properly. here's mine :
LRESULT CMyApp::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_NOTIFY:
NM_HTMLVIEW * pnmHTML = (NM_HTMLVIEW *) lParam;
LPNMHDR pnmh = (LPNMHDR) &(pnmHTML->hdr);
CString strReg = _T("register");
switch(pnmh->code)
{
case NM_INLINE_IMAGE:
CString strSrcText = pnmHTML->szTarget;
DWORD dwCookieValue = pnmHTML->dwCookie;
CBitmap* pBitmap;
if (! m_imagesCache.Lookup(strSrcText, (CObject*&)pBitmap)) {
::SendMessage(m_hwndHtml, DTM_IMAGEFAIL, 0, (LPARAM)&dwCookieValue);
return (LRESULT)1;
}
INLINEIMAGEINFO imageInfo;
imageInfo.dwCookie = dwCookieValue;
imageInfo.bOwnBitmap = FALSE;
imageInfo.hbm = (HBITMAP)(*pBitmap);
CSize size = pBitmap->GetBitmapDimension();
imageInfo.iOrigWidth = size.cx;
imageInfo.iOrigHeight = size.cy;
::SendMessage(m_hwndHtml, DTM_SETIMAGE, 0, (LPARAM)&imageInfo);
CString data;
data.Format(L"Image width=%d, height=%d, pBitmap=%p, pic name=%s", size.cx, size.cy, pBitmap, (LPCTSTR)strSrcText);
return (LRESULT)1;
}
}
return CView::WindowProc(message, wParam, lParam);
}
Riki Risnandar
|
|
|
|
|
riki_risnandar wrote:
....
case NM_INLINE_IMAGE:
CString strSrcText = pnmHTML->szTarget;
DWORD dwCookieValue = pnmHTML->dwCookie;
CBitmap* pBitmap;
if (! m_imagesCache.Lookup(strSrcText, (CObject*&)pBitmap)) {
::SendMessage(m_hwndHtml, DTM_IMAGEFAIL, 0, (LPARAM)&dwCookieValue);
return (LRESULT)1;
}
INLINEIMAGEINFO imageInfo;
thanks for reply
but I have one Question:
what is "m_imagesCache" Object??
and what initial values set to it to use it?
thanks again,
Nabil Samir
|
|
|
|
|
in source code that included ini this article:
CMapStringToOb m_imagesCache;
which means its the variable to stored the bitmap files to prepare the images on htmlview.
the initial values is set on 'RegisterHtmlImage' function and deleted in 'DeleteHtmlImages' function.
Riki Risnandar
|
|
|
|
|
the problem still exist
realy I use eMbedded Visual C++ 4.0
and emulator for pocket pc 2003
and don't use MFC
and I am sure that Image still loaded because
it is global and i use it again in other things
but after the html appear, i think, it makes refresh
from itself so images disappear
i don't use MFC so i can't use your solution(CMapStringToOb)
when i test the example (html control) in eMbedded Visual C++ 3.0
it works well but in emulator for pocket pc 2002 only
and not work (same example with eMbedded Visual C++ 3.0) in emulator for pocket pc 2003
so can anyone help me?
thanks.
Nabil Samir
|
|
|
|
|
Modify your code as below:
case NM_INLINE_IMAGE:
CString strSrcText = pnmHTML->szTarget;
DWORD dwCookieValue = pnmHTML->dwCookie;
CBitmap* pBitmap;
if (! m_imagesCache.Lookup(strSrcText, (CObject*&)pBitmap)) {
break;
^^^^^
//::SendMessage(m_hwndHtml, DTM_IMAGEFAIL, 0, (LPARAM)&dwCookieValue);
//return (LRESULT)1;
}
....
It will be work ok.
|
|
|
|
|
What kaubeu said was right! I got the key!
|
|
|
|
|
HTML control works well on 2000 emulator but the content is not diplayed on BE300 - MIPs Pocket PC (Windows CE 3.0) device.
Any reason why?
Best regards.
biswa.
|
|
|
|
|
Hi,
I am working on the this control. I observed it is caching the content from the previous page.I want to prevent the caching. My application is working under WinCe3.0 (ARM)
Thanks
|
|
|
|
|
Hi,
Can anyone provide a working sample of the HTML Viewer program that compiles with the new .NET CF? Any ideas or code samples wil be greatly appreciated!
|
|
|
|
|
Hi,
Did you able to get a solution for this. I could able to running this application with htmlview control in CE3.0successfully , but not displaying anything in CE4.2. I have all the components for CE4.2 like htmlview.dll, asform.dll etc...).
Please let me know how did you solve this problem.
|
|
|
|
|
Dear All,
How to get the redirected URL or Curent URL from the HTML Viwer/Container ?
Suggestions are most welcome !!!
Regards,
AKS
|
|
|
|
|
this code is really cool, it works and i even loaded HTML and Graphic-files from the local file system.
No I am planning to show WWW-content in the sHTMLView.
Has anybody ever tried that?
Do you have any hints for me?
Are there built-in features that I can use?
thx, Daniel
|
|
|
|