How to release a CWebBrowser2 control?

Dear everyone:
    I have a CWebBrowser2 control on my dialog and navigate to url by the
following code:
    CComVariant sNull,sFrame;
    sNull="";
    sFrame="";
    m_ctlWeb.Navigate("http://www.microsoft.com",
       &sNull, &sFrame,&sNull,&sNull);

    When I close the dialog and try to release the control by the following
code:
    m_ctlWeb.DestroyWindow();

    The control is destroyed, but when I check the task manager for the
memory usage, I found that a memory of over 11 megebytes still remained! Can
anyone tell me how to release the memory?


    Sincerely Yours
    Richard Huang.


0
Richard
9/1/2003 2:11:08 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
446 Views

Similar Articles

[PageSpeed] 44

Reply:

Similar Artilces:

Busness Portal 4.0 Release
Does anyone know when this is going to be released? John, Most likely this will come with GP 10.0, but I don't believe this has been officially announced yet. -- Victoria Yudin Dynamics GP MVP "John Stimpson" <John.Stimpson@authentec.com> wrote in message news:eTB6pRgGHHA.320@TK2MSFTNGP06.phx.gbl... > Does anyone know when this is going to be released? > ...

how to use Common Controls version 6
How can i use common controls version 6 controls in my MFC applications.Is it possible to use a preprocessor #define . THank you Which one are you trying to use? Many of them are built in already: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/_sample_MFC_CMNCTRL1.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/_sample_MFC_CMNCTRL1.asp Tom "Kenroy" <Kenroy@discussions.microsoft.com> wrote in message news:B3CB4AAA-F84A-49DC-88BE-1B3356E6CC0A@microsoft.com... > How can i use common controls version 6 co...

Outlook 2007 & Windows 7 & the mail icon isn't the control panel
I got this new computer with Windows 7 OS. I installed outlook 2007, and in the mist of configuring the network email account, I made a couple of small mistakes. But I cant figure out how to get back into Outlook to change the settings. Normally, in XP or Vista, I would go to the control panel, and click on the mail icon, and go and change the settings, HUT there is not mail icon in the control panel for Windows 7. I have looked all over. I tried unistalling and re-installing, but it is saving the settings somehow, so I dont get the change to change the settings, it autam...

Moving an ActiveX control
Hello, I have a userform that contains activex control (from external vendors) . The activex has a DragMode property and regular events as MouseDown What should I do in order to allow the end user to move (and maybe resize ) the activex on the displayed form? I know how to do it with regular Microsoft controls but not with external activexs Thanks a lot Avi ...

Custom Report Security Access in Release 10
How do you grant security access to Customized Reports in GP release 10? The custom reports do not appear in the Alternate/Modified Forms and Reports list. On Jan 14, 2:54 pm, Elaine <Ela...@discussions.microsoft.com> wrote: > How do you grant security access to Customized Reports in GP release 10? The > custom reports do not appear in the Alternate/Modified Forms and Reports list. Elaine, Are you sure you are pointing to the right reports dictionary ? Modified reports are visible are visible in the Alternate/Modified Forms and Reports window (Microsoft Dynamics GP menu >&...

Tranparent controls
Hi all, i set style Tranparent for some controls on a dialog, then i paint a background image on Dialog, but those controls's backgroud isn't tranparent. How to fix this? ...

AfxGetApp returns NULL in Release, but works fine in Debug!
Hello, AfxGetApp works perfectly fine in Debug mode of my project, but in Release, it always returns NULL. Any ideas? Thank you. Mike Are you using this code in a Regular DLL by any chance? -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com <HollywoodCAUSA@gmail.com> wrote in message news:1157913605.902375.152850@b28g2000cwb.googlegroups.com... > Hello, > > AfxGetApp works perfectly fine in Debug mode of my project, > but in Release, it always returns NULL. > > Any ideas? > > Thank you. > Mike > <HollywoodCAUSA@gmail.com> wrote in message news:...

Picture control with icon type
Hi, I would like to add a picture control with a type of icon to a dialog My problem is that I need an icon with a large size (96x96). And although I defined a new size of an icon, the dialog doesn't recongnize it, and it gives me an empty icon. If I make the picture with a size of 32x32, it displayed OK. Is there any limitation of the icon size attached to a picture resource ? Yoav. >I would like to add a picture control with a type of icon to a dialog >My problem is that I need an icon with a large size (96x96). >And although I defined a new size of an icon, the dialog doe...

Concatenating control's value to a query
I have a combo box on a form with values 1-5. I want the value of this combo box to be used in a form later on, but I need it concatenated into a query as this simplified example shows: SELECT ... FROM ... WHERE Line&'[Forms]![MyForm]![MyComboBox]'&=True You can see that I am trying to concatenate the current value of the combo box to the word LINE (i.e. Line1, Line2, Line3...) which refers to a boolean column in my database. Sorry, you can't do that in a query. You could, however, dynamically change the SQL associated with the query and then write it. Dim qdfCurr A...

Control number of pages per pass with duplex printing
I am using a Canon i560. Is there a method to control the number of pages printed per pass before the duplex dialog box appears. I am currently printing a two sided document with duplex printing and it only prints 2 pages before it asks for the reverse side. Other documents have had 4 or 6 pages per pass. Where is this controlled? TIA Lee That is probably something controlled by your printer driver. Especially since it differs between documents. -- JoAnn Paules MVP Publisher "Lee Hunter" wrote: > I am using a Canon i560. Is there a method to control the number of pa...

DBTYP.NET Studio 2010
DBTYP.NET Studio 2010 - Database Comparison Suite Released Vienna, Austria - March 8, 2010 Today, BYPsoft announced the availability of DBTYP.NET Studio 2010, the newest version of the cross-database comparison tool that compares SQL Server, MySQL and Oracle databases (schema and data). DBTYP.NET Studio 2010 is available for download from http://www.bypsoft.com. With its rich support for schema and data cross-database comparison, DBTYP.NET Studio takes the mystery out of databases, making their comparison practical and easy for programmers and database administrators everywh...

Handling List View Control Messages
Sir, I am dealing wih CList View CoNTROL. since this control has many items and each item selected should display one specific menu. hOW TO GET THE NAME OF THE ITEM SELECTED IN THIS LISTCONTROL. Regards POSITION pos = pList->GetFirstSelectedItemPosition(); if (pos == NULL) TRACE0("No items were selected!\n"); else { while (pos) { int nItem = pList->GetNextSelectedItem(pos); TRACE1("Item %s was selected!\n", pList->GetItemText( nItem,0 /* gives the text in the 1st column */) ); } "YKUT" <ykutanoor2003@yahoo.com> wrote in me...

a control that does console i/o
Hi, does anybody know any windows control that can programmatically prompt and take input from user? What I need is something close enough so I can customize with minimal effort. Thanks, Vincent A control? Every process can have only one Console window. So, you'd almost never find a control having its own Console window. However if your Application does an "AllocConsole" you can get your own Console window and any Control that you write can do IO through this console window; but be aware that mixing UI with console is considered ugly. -vJ "Vincent Yu" <anon...

Setwindowpos()-problem.Moving control is not happening.
Hi all, I am facing a problem in using SetWindowPos() . I am handling a localization project. For this i need to resize and reposition the dialog controls. I am calling GetWindowRect () to get the control dimensions and after changing them i am trying to call SetWindowPos() to place the control to the changed position. The following is the code i am using .. RECT gControlDimension; HWND hCtrl; //Handle to the Dialog control hCtrl = GetDlgItem (hWnd, ID_CURRENT); //Get the control dimensions status1 = GetWindowRect (hCtrl, &gControlDimension); ctrlLeft = gControlDimension.left ; c...

Autoshape in Chart controlled from a different worksheet
Hi all, Can somebody please help.. i have a Chart (called Chart2 - on its own page) and i have the data (sheet1) on another page.... i am trying to get the autoshape in Chart2 to change colour based on the data from a cell on Sheet1. i have the following code.... i can get the shape to change colours on Sheet1, but, when i try it on Chart2 nothing happens. NB: this code is in Sheet1 Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim myColor As Long Dim myShape As Shape If Target.Cells.Count > 1 Then Exit Sub If Intersect(Target, Me.Range("G11...

Controlling container size in ActiveX controls ..(OnDraw function)
In the following function, OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid) the rcBounds rectangle of the container is passed as const and cannot be modified in this function. I would like to know if/where I could set the dimensions of the container rectangle(rcBounds in this case) to those of my choice on initialising the ActiveX control. Hi George, You cannot do this from the control side of the fence. The container dictates the position of the control and where it's actually rendered. You can negotiate with the container to change the location/size o...

How to Get Control Type from Window Handler
Dear All, How can I get the Control Type (i.e. Button, Edit, ComboBox, ... etc) from a Window Handle, which returned from GetDlgItem(ID)? Many Thx Marco Marco, You might want to check ::GetClassName. Johan Rosengren Abstrakt Mekanik AB "Marco Hung" <marco@xmlhk.com> a �crit dans le message de news:eqXx4$NLEHA.3944@tk2msftngp13.phx.gbl... > Dear All, > > How can I get the Control Type (i.e. Button, Edit, ComboBox, ... etc) from a > Window Handle, which returned from GetDlgItem(ID)? > > Many Thx > Marco > > ...

Painting a rectangle over a control?
I have a basic MFC Dialog window hosting an ActiveX WebBrowser control and I'm trying to draw "on top" of it in an effort to hide the border. In OnPaint(), I have: using namespace Gdiplus; CPaintDC dc(this); Graphics graphics(dc.m_hDC); COLORREF bg = dc.GetBkColor(); Pen pPen(bg,3); CRect pRect; this->GetClientRect(&pRect); pRect.OffsetRect(-15,-20); CRect wRect(15,20,pRect.right,pRect.bottom); Rect fRect(16,21,pRect.right-18,pRect.bottom-23); GetDlgItem(IDC_EXPLORER1)->MoveWindow(wRect,TRUE); graphics.DrawRectangle(&pPen,fRect); It's drawing the frame ...

Data not saving from bound form when control loses focus
Hello, I noticed this thread: http://groups.google.co.uk/group/microsoft.public.access.formscoding/browse_thread/thread/9cea14add792f567/47e8c7ca272a99b9?lnk=gst&q=save+data+control+focus#47e8c7ca272a99b9 In this thread it says that if a form is bound (which mine is to a query) when a user moves from control to control it should save when the control loses focus. It currently saves when users close or move from record to record however this is causing problems as sometimes users use a custom toolbar which opens up popup forms to perform other tasks, which dont close or affect the bound f...

Control Limit and 3-D chart
I need to add a line to a 3-D column chart. The line would represent the upper limit. I am using Excel 2003. Any help would be greatly appreciated. Thanks Hi, Not possible using 3d charts. See here for examples using 2d chart types. http://www.andypope.info/charts/averageline.htm Cheers Andy Cardinalgal wrote: > I need to add a line to a 3-D column chart. The line would represent the > upper limit. I am using Excel 2003. Any help would be greatly appreciated. > > Thanks ...

ANN: NewsHound 2.0 released
Shoreline Software is pleased to announce NewsHound 2.0. NewsHound is an Outlook "add-in" and MAPI transport provider, which adds full newsgroup support into Outlook 2000, 2002 and 2003. Version 2.0 adds full support for newsgroup article headers. Headers can be marked manually and the full articles retrieved during a subsequent online session, or articles can be downloaded automatically, "on-the-fly", when you click on any header item. NewsHound 2.0 is the only NNTP add-in for Outlook that correctly implements support for newsgroup article headers. NewsHound does...

Using Bound Control right
I know this is a basic access 101 question, but for some reason I am stumped with how to get it to work. I have access 2002. I have 2 tables. One called mbrinfo which contains various data and has an id (mbrid) as the primary key. The 2nd table is employers which has an employer id (empid) as the primary key and a employer name (empname) as the 2nd column. I am creating forms for input. The employer table is empty of data at the moment. The form will have fields for both the empid and the empname values. I need to be able to type in the empid and name on the form and ha...

Making controls invisible dynamically
I have a multi-row form where I want one of the columns to be a bound checkbox if the data is one thing, and a bound text box if the data is something else. If "conditional formatting" allowed me to set the controls to visible/invisible that would be great, but it doesn't. Anything else I can think of, I believe, would change the presentation of all the rows on the form, not just the current one. Does anyone have any suggestions? You can set the visible/invisible property..and you are 100% correct that the setting will apply to all controls. I certainly have a lot o...

Tab control 08-22-07
Although I have tried to glean how-to from other postings, I am unsuccessful. Can someone suggest a coding solution? My form has several tabs. When the user clicks out of any tab, I wish to test for validity before leaving and failing, not leave the tab until corrected. Example: User enters data tab0 and clicks tab3 to work there. However, user left off some data. User should be returned to tab0 to correct with focus set to the offending control. This seems simple enough, but the most success I have had has ended in looping code. Not good. In hopes of help. -- Thanks for your...

Controlling how IE is opened for login script status messages
In our login script, I have been using an Internet Explorer window to display status messages as the process runs. The code that I use to open IE is below. Lately, the script has not been running through. It stops or pauses before the window even opens. We have found that by removing the Google toolbar on the PCs having trouble the script runs without issue. I'm guessing that there is some type of update running by Google that doesn't like my script. Is there a way of specifying the "-extoff" option in the "with objIntExplorer" options below? I'...