CDHtmlDialog::SetElementHtml() always fail

Dear all,

I am using CDHtmlDialog in VC++ .Net 2003.

In my dialog, I have a HTML List box, it can show "Group List" with my 
hardcoded HTML resources file.

I have a problem that I want to update my HTML using SetElementHtml(), I 
always missing some data after I added, for example:

the HTML resources file contains:
<select id="MyFileList" name="MyFileList">
    <OptGroup label="Test1.doc">
          <Option>C:\MyData\Test1.doc</Option>
    </OptGroup>
</select>

I using GetElementHtml(), it return:
    <OptGroup label="Test1.doc">
          <Option>C:\MyData\Test1.doc</Option>
    </OptGroup>

After I modified, and I add the following into my HTML:
   <OptGroup label="Test2">
          <Option>C:\MyData\Test2.doc</Option>
    </OptGroup>
   <OptGroup label="Test1">
          <Option>C:\MyData\Test1.doc</Option>
    </OptGroup>

It will fails, and I try to use GetElementHtml() to check my HTML, it will 
return:
C:\MyData\Test2.doc<OptGroup 
label="Test1.doc"><Option>C:\MyData\Test1.doc</Option></OptGroup>

Is there any limitation or technique when adding / modifing the HTML 
resource??

Thanks,
Kevin Tang.
0
KevinTang1 (10)
2/16/2006 3:22:27 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
1415 Views

Similar Articles

[PageSpeed] 20

Sorry,

After fail, I check the HTML by GetElementHtml() and the return should be:
C:\MyData\Test2.doc</Option></OptGroup><OptGroup 
label="Test1.doc"><Option>C:\MyData\Test1.doc</Option></OptGroup>

It will missing the new added "<OptGroup Label="Test2"><Option>"

Thanks,
Kevin Tang.

"Kevin Tang" wrote:

> Dear all,
> 
> I am using CDHtmlDialog in VC++ .Net 2003.
> 
> In my dialog, I have a HTML List box, it can show "Group List" with my 
> hardcoded HTML resources file.
> 
> I have a problem that I want to update my HTML using SetElementHtml(), I 
> always missing some data after I added, for example:
> 
> the HTML resources file contains:
> <select id="MyFileList" name="MyFileList">
>     <OptGroup label="Test1.doc">
>           <Option>C:\MyData\Test1.doc</Option>
>     </OptGroup>
> </select>
> 
> I using GetElementHtml(), it return:
>     <OptGroup label="Test1.doc">
>           <Option>C:\MyData\Test1.doc</Option>
>     </OptGroup>
> 
> After I modified, and I add the following into my HTML:
>    <OptGroup label="Test2">
>           <Option>C:\MyData\Test2.doc</Option>
>     </OptGroup>
>    <OptGroup label="Test1">
>           <Option>C:\MyData\Test1.doc</Option>
>     </OptGroup>
> 
> It will fails, and I try to use GetElementHtml() to check my HTML, it will 
> return:
> C:\MyData\Test2.doc<OptGroup 
> label="Test1.doc"><Option>C:\MyData\Test1.doc</Option></OptGroup>
> 
> Is there any limitation or technique when adding / modifing the HTML 
> resource??
> 
> Thanks,
> Kevin Tang.
0
KevinTang1 (10)
2/16/2006 3:28:26 AM
Reply:

Similar Artilces:

Exch2k3 cluster keeps failing! Need urgent help please...
I am having *major* issues with my exchange cluster today, and I don't know what else to do. I have a 2-node A/P exch2k3 cluster, and all of a sudden the "smtp virtual server instance" would go into an "online-pending" state. Once this happens, everyone loses their connection to the server. After a while, it goes from online-pending, to failed. That problem is bad enough, but another problem is that, it didn't failover to the next node, and I've run diagnostics on the server nodes, and they seem to be fine hardware-wise. These nodes are connected to an ...

failed to determine account name
I'm trying to install MSCRM on a Win2K Server sp4 machine, and when I start the setup.exe, I get the following error message: "Microsoft Customer Relationship Management Server Setup Error: Failed to install Microsoft Customer Relationship Management Server. Failed to determine your account name. Unspecified error (80004005)". Any idea what the heck this is? I can't even START the setup program??? no need to repost using a different email........... what I don't get is that you replied to Matt saying that it did work....... "Scott" <tsi@timeco...

SaveBarState fails when it is called from a thread #8
Hi, In my application, I use SaveBarState() for persisting control bar state. The code fragment is something like this. void CMainFrame::OnSavePersistance() { SaveBarState(_T("My Persistence")); // Saves some information to an xml file } Since my xml saving takes some time I changed the code to execute in a thread UINT ThreadFn(LPVOID pParam) { CMainFrame* pThis = (CMainFrame*)pParam; pThis->SaveBarState(_T("My Persistence")); return 0; } void CMainFrame::OnCntrlbartst() { AfxBeginThread( ThreadFn, this ); } But, now in the thread function SaveBarState...

CDHtmlDialog
I've built the DHtmlExplore Sample from Visual C++ MFC Samples but it doesn't run at all. It fails on DoModal(). Hi Ram, Thanks for you posting in this group! I have built and runned the DHtmlExplore Sample in VS.NET 2003, it works fine. Would you please post some more detail error messages with your situation if possible, with that maybe I can do some help on your problem. Best regards! Gary Chang Microsoft Online Partner Support Get Secure! � www.microsoft.com/security This posting is provided "AS IS" with no warranties,and confers no rights. -------------------...

DoModal() Dialog box fails in eVC4 to VS2005 Migration
I have a Pocket PC 2003 MFC DLL that compiles and works perfectly under eVC++ 4.0. I imported the project into Visual Studio 2005. It compiles fine. The problem is that the dialog box that it is supposed to display does not display at all. After stepping through it I realize that the Dlg.DoModal() is returning -1. I am following the rules which is calling AFX_MANAGE_STATE(AfxGetStaticModuleState()); as the absolute first statement in the exported function. To be sure the exported function is as follows. CDRVCEDLGS_API int WINAPI CdrvLInitDialog( int &Subport,int &Baud,int &...

Failed Outlook laptop client
I can no long sync my Outlook Laptop Client (OLC)! Help I have always understood my OLC install to have some critical bugs, most noteably the issue with logging off Outlook while CRM is still online (not done often). It always seems to crash coming back into Outlook. There were a couple of times where I felt REAL lucky to get the sync back running at all. Now I am toast, where CRM is NOT FUNCTIONAL at all. Two issues I am battling are: 1. The already flakey OLC will no longer sync, in fact NONE of the CRM menus or Toolbar icons will work. They are displayed like everything is OK but wh...

SaveBarState fails when it is called from a thread #2
Hi, In my application, I use SaveBarState() for persisting control bar state. The code fragment is something like this. void CMainFrame::OnSavePersistance() { SaveBarState(_T("My Persistence")); // Saves some information to an xml file } Since my xml saving takes some time I changed the code to execute in a thread UINT ThreadFn(LPVOID pParam) { CMainFrame* pThis = (CMainFrame*)pParam; pThis->SaveBarState(_T("My Persistence")); return 0; } void CMainFrame::OnCntrlbartst() { AfxBeginThread( ThreadFn, this ); } But, now in the thread function SaveBarState...

Outlook Contacts always suggests "Custom Form Cannot Be Opened"
Dear All, I have ascertained by searching "Message Class Field" that all contacts in the search come up as found. Therefore I think somehow I have put in place a Custom Form and would like Outlook to go back to using the default / standard form. Thank you for any further Help. Yours sincerely, -- Neil@UK Get http://www.publicshareware.com/download/DocMessageClass.zip and use it to change the message class back to the default. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.sli...

CDHtmlDialog: Memory usage... :-/
Hi, I made a test app using CDHtmlDialog and all it does is display the dialog containing a html page. When i check the memory usage it uses 10,240 kb, is this normal? Is there a way to decrease the memory usage in html dialogs? Thx in advance, Thomas Hi, Thomas. CDHtmlDialog is using IE rendering engine which is good for Internet browsing tasks. And not supposed to be lightweight. I would recommend you to visit ours http://terrainformatica.com/htmlayout as an alternative. Andrew Fredoniouk. Terra Informatica Software Design. "Thomas" <Da_QuiK@fake.email.com> wrote in...

strings and CDHtmlDialog
Hi, I'm working on application where visual representation is done by using CDHtmlDialog. All .htm files are linked as resources, same for images. We use images like this: ....in.rc2 file we define it as images/res.jpg HTML "images/res.jpg" ....and then use it in .htm file as <img src="images/res.jpg"> It works fine. Is there a way to include text from STRINGTABLE in .htm file? Thanks in advance, Primoz ...

OAB download failed
Environment - windows 2008 sp2 running exchange 2007 sp2. Windows xp client with outlook 2007 can't download the Offline Address Book from the exchange. I'm in the middle of getting our exchange up and running - have 120 users with around 20 left to add. So far only had this issue with 1 user. Have tried forcing a download, but no results. How can i get an exchange account on this outlook to function properly if the OAB doesn't set itself up? Keeps rsyncing over and over. Do i need to re-install outlook? or is there an easier way? Thanks Rich ...

Unmountable Boot Volume AND Session3 Initialization Failed
I'm running a Lenovo laptop with PGP Encryption Windows XP SP3 SATA hard drive. This is my work laptop I've had since October 2008 without issue. I'm somewhat of a low-level techie working permanently from home and my company's IT Dept is 2000 miles away. But these following errors/BSODs escapes me. Two days ago, the system stalled and I elected to hard reboot the system. When it came back up, I logged into PGP login screen as usual and received the 'Safe Mode' screen options. I clicked 'Start Windows Normally' option, the Windows Logo boot screen ...

Create CDHtmlDialog in statically linked MFC DLL failed
Hi, My project need use a exe(statically linked MFC) load a dll(staticall linked MFC), and create a CDHtmlDialog in the dll. I add a CDHtmlDialog to the DLL, "class DHtmlDialogTest : publi CDHtmlDialog" and create dialog at DLL's export function, "DHtmlDialogTest.Create(IDD_DHtmlDialogTest CWnd::GetDesktopWindow());" But when excute DHtmlDialogTest.Create(IDD_DHtmlDialogTest CWnd::GetDesktopWindow()); then it'll enter "dlgdhtml.cpp"'s functio "CDHtmlDialog::OnInitDialog()" at following code inside "CDHtmlDialog::OnInitDialog()"...

method 'run' of object '_application' failed
i receive this message after attempting to "save as" to a new workbook name, it appears that some of the macros are referenced by the original workbook name and after renaming, the macros no longer function. is there a fix or workaround or something that i can run/do to fix this problem? i have templated up a little workbook that will be used on a monthly basis and saved accordingly.....each month, etc.....so the name of the file will change...... what have i done or what have i missed.. thanks in advance, dale The code that does the calling might help to see...

"Operation Failed" in Outlook 2002 on Send/Receive
Our company has 30+ machines still running Office XP (the other 150 or so are running various newer versions, and do not exhibit this behaviour), and about half of them started displaying the "Operation Failed" dialog box whenever a Send/Receive is initiated. This does NOT apply to the initial Send/Receive operation that occurs when Outlook starts. The machines running Outlook XP that do NOT have this issue are the ones upon which, a few weeks ago, our technician turned off automatic updates, and forgot to re-enable them, so I'm fairly certain it's one of the myriad u...

CRM4 Roll-up 2 and now workflow fails
We applied RU 2 for CRM 4 No we are unable to publish any workflows, we have created new workflows, taken ownership of old ones, saved, and then published - nothing, simple error saying save and then try again! Where now - remove RU 2? Regards Gavin On Feb 9, 5:01=A0pm, Gavin Urtel <GavinUr...@discussions.microsoft.com> wrote: > We applied RU 2 for CRM 4 > > No we are unable to publish any workflows, we have created new workflows, > taken ownership of old ones, saved, and then published - nothing, simple > error saying save and then try again! > > Where now - r...

iframe in CDHtmlDialog
Hi, In my htm file using CDHtmlDialog class there's a iframe. Example, <html> <body id=CCompEditNavigation bgcolor=white> .... some text ... <iframe src="140" id="myiframe"></iframe> </body> </html> Notice the src="140" The 140 is a resource ID to an htm file. Is there a way of working with file names rather than resource ID numbers? I would like to use names such as src="myiframe.htm". Thanks, Paul On Sep 1, 11:36=A0am, Paul <energymo...@gmail.com> wrote: > Hi, > > In my htm file using CDHtm...

How detect if handle returned by PsGetCurrentProcessID is valid ? existing always process ?
Hello, I need to intercept an event of signal exit of a Windows process since handle processid, or whether the process is still active according to the variable handle returned by the PsGetCurrentProcessID. Why: I developed a driver disk mapping on a user-mode process and when I left the process in task manager (mstask.exe), my driver detects if the process is still existing, if not the case, it must set the flag on my logical drive mapped to it is inaccessible and it does not expect the data sent by my process managing the logical drive. In function KeWaitForSingleObjec...

Autorefresh Fails on Open
I set up a simple pivot table that gets its data from CSV file which is set to import automatically upon opening. I worked fine for two days then stopped... I re-created another external data import, same opens to refresh automatically on open. It works once or twice then stops. HELP! ...

always a password popup
Hello, I have a domain to which I added a basic email account and set up according to the instructions provided by my domain host. However, Outlook is doing this incredibly annoying action of continuously asking for my password. I press 'Remember Password' every single time and it completely ignores it. My password is correct as I can log onto the internet site and retrieve mail the difficult way. Is there a solution to this? Thank you so much. Cheers, Math Hi, If it's a new domain, it make take awhile for the host to recognize everything and filter it through your ...

Subtracting Prev YTD from Current YTD where Prev is Null is always returning Null value
I'm trying to subtract Previous YTD values from Current YTD values. There are instances in Current YTD where it is a new item, so no previous YTD value exists. so as examples: Current YTD = 10 and Previous = 7, result is 3 Current YTD = 10 and Previous = 10, result is 0 But if Current YTD = 10 and Previous = Null, the result I need is 10, but I get Null My formula is: Weekly Total: Sum(([Current YTD]-[Previous YTD])) I have instances of adjustments where the result can be negative, so I cannot use and absolute value. Any ideas? Thanks! Try using the Nz function to replace a Null v...

How to use relative file:// protocol in html resource used by CDHTMLDialog?
Howdy, I'm writing a C++ CDHTMLDialog based application in VS .net. Of course I have an HTML resource that contains the html code for display by CDHTMLDialog (which wraps the Webrowser control). I understand how to reference program resources in my HTML using the res: protocol, but I'm having trouble getting the file: protocol to work with relative references. For example, if my embedded HTML resource includes this absolute path in my htmlcode it works fine: < IMG src="file:///C:\Documents and Settings\jim\My Documents\temp\CHtmlApp\Debug\ugly2.bmp" > But if I pu...

Failed Updates 06-26-10
Usually when I try to install updates, a message will appear indicating that the process has failed. When I allow Windows to automatically install updates, however, my Internet connection fails and I then have to do a system restore to remove the updates so that I can use the Internet again. Can you please help me with this, as I do want to be able to update my computer with programs and anti-virus updates without losing my Internet connection each time? Thanks. Allen • Which version of the Windows operating system am I running? http://windows.microsoft.com/en-us/wi...

Xpath query fails to return a node
Hi I am trying to extract a node from the following XML doc <?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <getFileContentsResponse xmlns="http://samplesoap.cbis.infocomp.com"> <out> <InfoCompFiles> <InfoCompFile> <Content>Hello world!!!</Content> </InfoCom...

Double-click on row-separator doesn't always correctly adjust row height
Our company often uses Excel v.2003 to generate table-like text reports. The cells often contain text that wraps to multiple lines. We also have merged cells at various locations. I often will double-click on the border between two row headers to make the row above auto-expand/collapse to make the row fit to the amount of wrapped text. However, there seem to be many situations where the row will collapse to only one row in height. It might have to do with merged cells (either in the row itself or somewhere else in the document). This seems to be a bug. Could you please tell me which s...