CDHTLMDialog troubles

Hi

I'm justing to use the CDHTMLDialog  with the following code


IHTMLElement* pLinkElement = NULL;

if (GetElement(_T("ctl00_ContentPlaceHolder1_tb1"), &pLinkElement) == S_OK 
&& pLinkElement != NULL)
{
    BSTR current;

pLinkElement->get_innerText(&current);

pLinkElement->get_id(&current);

CString tt=_T("Hello from Callidus DHTML");

BSTR bstr=tt.AllocSysString();

pLinkElement->put_innerText(bstr);




pLinkElement->Release(); // Thanks Heath

}


0
phil971 (24)
11/5/2006 11:22:27 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
790 Views

Similar Articles

[PageSpeed] 51

Sorry I posted too soon :)
-----------------------------------------

I'm just starting to use the CDHTMLDialog  and need to the values of various 
elements on the page

I am using the following code to get access an element


IHTMLElement* pLinkElement = NULL;

if (GetElement(_T("ctl00_ContentPlaceHolder1_tb1"), &pLinkElement) == S_OK 
&& pLinkElement != NULL)
{
    // element is found correctly

    BSTR current;
    pLinkElement->get_innerText(&current);    // ***** this always produces 
current=Bad Ptr *****
    pLinkElement->get_id(&current);                // this really is the 
name of the element so it seems OK

    CString tt=_T("value from C++");
    BSTR bstr=tt.AllocSysString();
    pLinkElement->put_innerText(bstr);        // this works for the 
pLinkElement seems OK

    // after here the words 'value from C++' appear in the dialog box


    pLinkElement->Release(); // Thanks Heath
}

while put_innerText works fine, get_innerText never seems to produce 
anything in the BSTR

Can anyone tell me where I've gone wrong?

Any help will be much appreciated
Phil
"phil" <phil@oakleafsoftware.co.uk> wrote in message 
news:uU%23xwyMAHHA.1196@TK2MSFTNGP02.phx.gbl...
> Hi
>
> I'm justing to use the CDHTMLDialog  with the following code
>
>
> IHTMLElement* pLinkElement = NULL;
>
> if (GetElement(_T("ctl00_ContentPlaceHolder1_tb1"), &pLinkElement) == S_OK 
> && pLinkElement != NULL)
> {
>    BSTR current;
>
> pLinkElement->get_innerText(&current);
>
> pLinkElement->get_id(&current);
>
> CString tt=_T("Hello from Callidus DHTML");
>
> BSTR bstr=tt.AllocSysString();
>
> pLinkElement->put_innerText(bstr);
>
>
>
>
> pLinkElement->Release(); // Thanks Heath
>
> }
>
> 


0
phil971 (24)
11/5/2006 11:28:24 AM
Reply:

Similar Artilces:

Trouble with manifest...
Hello, I want create a MFC application that uses XP styles. When I use the application wizard in VS 2003 and tick the manifest option, it creates an application with a manifest file. The manifest file looks like the ones you can find in exampels and is named "ApplicationName.manifest", located in the "res" directory. "InitCommonControls();" is called in "InitInstance()". So everything looks alright to me, but I build the application and run it on XP it does not have the files. What I am duing wrong here? Regards, Thomas >I want create a MFC a...

Sudden trouble with Entourage and Word for Mac
Hope somebody can help -- here part of my Chat session with Apple Support to explain the situation. Last night, I downloaded the software update that came through on the automatic alert -- I think it was the latest OS X upgrades. At that time I did not restart the computer as I normally do, because I was working on other things. I simply chose the Shut Down option when I was done. This morning I started up again and since I did, I cannot get any of my MS Office for Mac apps to work properly. Since the only thing that changed was that the update was downloaded and must have been installed when...

Trouble sending word document to PC
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel I am trying to send word documents to a PC and it opens as a zip drive for the PC and is unreadable. I am using Microsoft word for mac and saving the file as a: Word Document (.docx). What can I do to make the file compatible? The problem is the system and/or the user at the other end. It could be either of several things but without knowing what their software version is or how it's being delivered it's hard to say exactly what they're doing wrong. The OXML (.docx) file is basically a zipped form...

Pasting a chart from Excel 2007 to Word 2007 trouble
This seems like it should be simple!! Why is half of my pie chart disappearing when I try to paste it from excel to word? I have no idea of what is going on. Any ideas? Thanks! Vegas - For me, the best way to paste a chart from Excel 2007 into Word is to select the chart, choose Home | Paste | As Picture | Copy as Picture | etc., select an insertion point in Word, and Edit | Paste. Try the various Copy as Picture options to see which works best for you. - Mike http://www.MikeMiddleton.com "Vegas" <Vegas@discussions.microsoft.com> wrote in message news:C13CFD60-DAA...

trouble accessing written document
trouble accessing written document saved in file that can not access Is this a cryptic crossword clue? Pleaae explain exactly what you are trying to do in which Word version and what happens when you try. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "terrell" <ter...

trouble downloading quotes
Is anyone else having trouble downloading quotes today (1/5/04)? In microsoft.public.money, quest wrote: >Is anyone else having trouble downloading quotes today (1/5/04)? > Yes. Try at a less busy time. Thank-you for your reponse. I did try between 1am - 3am and still saw the same problems. I wonder if it is something specific to me? Thanks again!! "Cal Learner-- MVP" <via_newsgroup@please.tnx> wrote in message news:b00lvv09d9png114immcs6vqq0sb4h3fcd@4ax.com... > In microsoft.public.money, quest wrote: > > >Is anyone else having trouble downloading...

IMF Trouble
I'm running a SBS 2003 sp1 W/ Exchange 2003 sp2 / IMF / update IMF has not created the ucearchive folder, and is not filtering UCE. I keep finding the following entry in my event log. Event Type: Error Event Source: MSExchangeTransport Event Category: SMTP Protocol Event ID: 7514 Date: 1/24/2006 Time: 6:14:27 PM User: N/A Computer: BLUESKY Description: An error occurred while loading Microsoft Exchange Intelligent Message Filter. The error code is 0x80070570. For more information, click http://www.microsoft.com/contentredirect.asp. 99% you installed IMFv1 on top of SP2 http://w...

Syncing troubles
I am not able to sync purchased i tunes songs to device via Media player 11. I am getting an error message every time. Ripped CD's are syncing perfectly OK. On Tue, 13 Apr 2010 22:03:01 -0700, Learner <Learner@discussions.microsoft.com> wrote: >I am not able to sync purchased i tunes songs to device via Media player 11. >I am getting an error message every time. >Ripped CD's are syncing perfectly OK. I'd be surprised if media player can play them at all ! Apple iTunes stores are protected by FairPlay DRM, which has only one way of playback and Sync...

Trouble linking Windows Mail & AOL
I am trying to send a msg on Craig's List... when I reply to a vendor, I receive a prompt to utilize Windows Mail automatically. When I tried to set up an account on Windows Mail using an AOL address thru IMAP, I got the error below. I have "My server reqrs authentication" checked in properties and I am using "587" as my outgoing smtp port and "143" as incoming imap port. I can see my AOL folders on the Windows Mail box and I can send and receive w/ aol, but when I try to send via WM, the msg sits in the Outbox. Error msg: "XAOL-UAS-M...

Trouble with a domain with a
I'm trying to send email to the domain PCM-LWV.COM and I keep getting this NDR: The message could not be delivered because the recipient's destination email system is unknown or invalid. Please check the address and try again, or contact your system administrator to verify connectivity to the email system of the recipient. < ylpvm25.prodigy.net #5.1.2> Everything seems fine with our exchange 2003 server otherwise. We are receiving email from this domain, and when we reply we get this NDR. We can send email to any other domain.. is it the - in the domain name?? I tes...

CDHTLMDialog troubles
Hi I'm justing to use the CDHTMLDialog with the following code IHTMLElement* pLinkElement = NULL; if (GetElement(_T("ctl00_ContentPlaceHolder1_tb1"), &pLinkElement) == S_OK && pLinkElement != NULL) { BSTR current; pLinkElement->get_innerText(&current); pLinkElement->get_id(&current); CString tt=_T("Hello from Callidus DHTML"); BSTR bstr=tt.AllocSysString(); pLinkElement->put_innerText(bstr); pLinkElement->Release(); // Thanks Heath } Sorry I posted too soon :) ----------------------------------------- I'm just ...

Having trouble connecting to Hotmail?
Add your comments here! Maybe someone at MS will see them and actually DO something. ____________________ Outlook 2007 on Vista Ultimate 32 bit........ I have a paid hotmail account that I have been happily using for 2 years now. I always check it via outlook (2003 and 2007). In 2007, for about the past 45 days, I would get intermittent dialog boxes asking me to confirm my password. I would, and I would select remember this password and things would continue - until about 3 days ago. Then the dialog boxes would not go away in Outlook 2007. It constantly asked me for my password and wo...

trouble downloading windowsxp.service2pk
My problem is i go to the windows update site let to site find the updates thats critical to my computer. after the site locate the updates thats needed and i click on the accept downloads my cursor freezes. I recently puchased a new printer and when installing the printer i get a message from the install CD that my computer needs to be updated with at least service pack 2. What should i do to fix this problem? I didnt have this problem with the last printer i purchased. Tlioness wrote: > My problem is i go to the windows update site let to site find the > updates thats c...

more trouble with i
I am still having problems with entering the lower case i in Excel. if I enter aeiou in a cell all is ok. However if I enter a e i o u, the i is captialized. Excel does not seem accept a stand alone lower case i. One page I use I must enter an i in the upper section. After it captializes it I can subsequently have no problems with the lower case. Anyone have a clue? Ralphael, the OLD one Hi, Ralphael. This is an Autocorrect issue. Tell it to stop upper-casing your letter I. Here's how: From the menu, hit Tools-->Autocorrect. Hit the letter i on your keyboard to bring up the Autocor...

Trouble using resolution for Outlook error
I am recieving the error in Outlook mentioned on the following page: http://support.microsoft.com/default.aspx?scid=kb;en-us;822503 The instructions say to resolve the issue for an existing installation, specify the *.pst file by using the Mail icon in Control Panel. First of all, I do not know what *.pst file they are referring to. The following directory on my machine: C:\Documents and Settings\Nathan Sokalski\Local Settings\Application Data\Microsoft\Outlook Contains the following *.pst files: archive.pst njsokalski@hotmail.comHotmail-00000002.pst Outlook1.pst Outlook.pst I am ver...

Trouble sorting a table???
Using Excel 2002) I am relatively new to Excel and can only really perform simple functions in a basic spreadsheet. The spreadsheet I'm having trouble with is pretty basic, but I'm having trouble sorting some of the results from a table. (I'll try and explain as best as I can) I have 10 people that I'm tracking 5 different things for (dates, debts, credits, items, number of transactions, and their balance as calculated in this table by simple SUM functions) I then have another table with these same 10 people with their total balance. This is the table I'm having t...

trouble
I have been using my MS Publisher 2000 for over 3 years. Just recently I attempted to access the Publisher program and got the following message: "This application must be installed to run. Please run setup fom the location where you originally installed the application." I have done everything I know to fix this including uninstalling and reinstalling the program. I don't understand what happened overnight nor do I understand the instruction "run from the location you originally installed the program". I can not access the numerous publicaions that I have cr...

Trouble with "time" in formulas
I have a time sheet that looks something like this: A1=time...A2=time...A3=A2-A1+if(A1/24,1)...A4=if(or(A3<time(0,15,0),A3>time(4,0,0)),A3,time(4,0,0)) A1 and A2 are set up as dropdown lists and the times in the list are i increments of 15 minutes. WHat I'm trying to accomplish is (in cell A4 if A3 is between 15 minutes and 4 hours, then return 4 hours. if A3 i 0 or greater than 4 hours, return A3. If I enter enter times in A1 around 00:00 and A2 a little after 00:0 it works fine... example: A1=22:00...A2=01:00...A3=03:00...A4=04:00 A1=20:30...A2=00:15...A3=03:45...A4=04:00 A1=00...

constant trouble
i am having real difficulty with office publisher, it wont open the wizard saying it is missing a pro11.msi file . Any help would be greatly apreciated. Thanks alot james Open help, click detect and repair What version Publisher? -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.mvps.org/msauer/ news://msnews.microsoft.com "James" <fatistuta2001@hotmail.com> wrote in message news:1b95101c44ff7$6f6b5cc0$a001280a@phx.gbl... > i am having real difficulty with office publisher, it > wont open the wizard saying it is missing a pro11.msi > file . Any h...

Trouble downloading update KB953297
The automatic update on my computer keeps telling me that this upgrade is ready to download, but every time I try to download it, it fails. When I check for updates on the Microsoft website, it lists this update as an option, but the size of the file is shown as 0KB. My computer has failed to download this update 20 times already this month. How do I get it to stop trying to download an update that has nothing in it? When installing updates using Windows update or Microsoft Update you may receive Error 0x643 or 0x80070643 (23 Oct-09) http://support.microsoft.com/kb/976982 ...

Trouble understanding recipient/size limits on Exchange.
I'm trying to understand the recipient/size limits for Exchange and what takes priority. I'm still a little confused after even after reading the article. The following example is from article ID 322679: Example 2 In this example, the following size limits have been configured: . The global setting is set to 2 MB. . The Exchange 2000 SMTP connector is set to 5 MB. . The SMTP virtual server is set to 2 MB. . The user mailbox setting is set to 3 MB. The global setting is 2 MB. Therefore, all the users who are using the default global setting in the Exchange 2000 S...

XmlDocument Trouble
Hi, I don't know why, but I can't seem to get this to work: Public Sub DoSomething() Dim sb as New StringBuilder() sb.Append("http://webservices.amazon.com/onca/xml?") sb.Append("Service=AWSECommerceService&SubscriptionId") sb.Append("=0525E2PQ81DD7ZTWTK82&Operation=ItemSearch") sb.Append("&SearchIndex=Books&Keywords=css") sb.Append("&ResponseGroup=ItemAttributes,Offers") Dim tr as New XmlTextReader(sb.ToString()) tr.Read() Dim xDoc as XmlDocument = New XmlDocument() xDoc.Load(tr) tr.Close() ...

FIND function trouble
The code below sorts a range to the current column and finds the last occurrence of the value in Activecell. This works well except if the current column has formulas and values mixed - then Find returns "Nothing" (displayed by my message). It seems to be inconsistent though (does not always return Nothing). Can anyone explain what is going on? Thanks Laurence Sub SortToCurrentColumn_Click() 'Sort_to_CurrentColumn() Sheets("Cash Bks").Activate CurrentColumn = ActiveCell.Column CurrentCellValue = ActiveCell.Value Lastrow = Range("B10000").End(xlUp).Row Range...

having trouble adding my email account
i dont know what server to type...http, pop3, i dont know what these are. :( chrissie <anonymous@discussions.microsoft.com> wrote: > i dont know what server to type...http, pop3, i dont know what these > are. :( If you're trying you get mesages from Hotmail, you'll select HTTP as the mail type. If it's for your company's mail, it could be an Exchange account you need to create. Ask your IT support people. If it's for a home ISP, it's probably POP. Ask your ISP's support people for the server values to use. -- Brian Tillman Smiths Aerospace 3290 P...

Trouble installing new hard drive
I'm trying to install a new hard drive. Setting it up as a slave to my current "C" drive. I connect the power cable and the 25 pin data cable. After hook up, the computer won't power up. It starts up and after 2 seconds, shuts back down. Unplugging the new drive and the PC boots up like normal. The power and data cable can only be plugged in one way, so I don't have them backwards. Any idea what is causing the power to shut down right away? Not that it matters since I can't boot, but I'm running Windows XP home addition with SP3. On May 29,...