Working on Internet Explorer extensions in C++ & COM, I had to relearn or rediscover how to do several totally basic and important things. To save myself and possibly others trouble in the future, here's some pertinent links and tips.
First you must choose your IE extensibility point. Here's a very short list of the few I've used:
Once you've created your COM object that implements IObjectWithSite and whatever other interfaces your extensibility point requires as described in the above links you'll see your SetSite method get called by IE. You might want to know how to get the top level browser object from the IUnknown site object passed in via that method.
After that you may also want to listen for some events from the browser. To do this you'll need to:
If you want to check if an IHTMLElement is not visible on screen due how the page is scrolled, try comparing the Body or Document Element's client height and width, which appears to be the dimensions of the visible document area, to the element's bounding client rect which appears to be its position relative to the upper left corner of the visible document area. I've found this to be working for me so far, but I'm not positive that frames, iframes, zooming, editable document areas, etc won't mess this up.
Be sure to use pointers you get from the IWebBrowser/IHTMLDocument/etc. only on the thread on which you obtained the pointer or correctly marshal the pointers to other threads to avoid weird crashes and hangs.
Obtaining the HTML document of a subframe is slightly more complicated then you might hope. On the other hand this might be resolved by the new to IE8 method IHTMLFrameElement3::get_contentDocument
Check out Eric's IE blog post on IE extensibility which has some great links on this topic as well.
The weekend before last I saw Dark Knight with some friends from work and then we all ate at Z'Tejas after. Like everyone has said and as the name implies Dark Knight is... dark. Dark Knight was a little over the top at times as compared to Batman Begins but I really enjoyed it. Two times during the movie I thought it had ended but I was wrong. The Joker is both frightening (Cringe inducing line "Wanna know how I got these scars?") and humorous ("Where is Harvey Dent? ... You know where Harvey is? You know who he is?", as well as the pencil magic trick). I can certainly recommend it to anyone who enjoyed Batman Begins. The previews included Burn After Reading a new Coen Brother's comedy that I look forward to, and Quantum of Solace which hopefully does the same thing Dark Knight has, keep up the new direction on the refreshed franchise.
This past weekend Sarah and I went to a Mariners baseball game. I think this is the first MLB baseball game I've seen in person. Sarah's company gave out tickets for the game and the use of a suite. Its a room half way up the stadium with comfortable chairs, a mini-fridge built-in to the marble counter-topped center table, and a big flat screen television with the game on it. I suppose that's in case you don't want to turn to the right and sit at the window, or walk out onto the balcony which features three rows of comfy chairs overlooking the field. Anyway there was free food and drinks and I met some of the people Sarah works with.
Sarah received her Wii Fit a few weeks ago. The Wii Fit is a game for the Wii and a balance board accessory that can tell how you're standing on it: leaning forward, standing on one foot, leaning backward and mostly on your left foot, etc. The game puts you through various exercises grouped into the categories of aerobic, balance, strength, and yoga. It also lets you set goals and keeps track of how well you do, how long you play, and a graph of your weight.
The portion I didn't expect were the mind games. Sarah turned it on after not using it for a day and it said something to the effect of 'Oh, didn't have time to exercise yesterday? Huh. Interesting....' I'm paraphrasing of course but the Wii Fit was definitely trying to lay down some guilt. In another instance when starting up the Wii Fit Sarah was asked 'Did you know that Dave has been using Wii Fit?' She selected yes and it then asked her how she thought I was progressing giving her four options. She selected the worst one, that I was getting worse (jokingly I hope) and it told her to tell me that, but not to use those words. In conversation Sarah should mention to me that I've been "living large". Now I'm not paraphrasing. It reminded me a bit of this xkcd comic 'Zealous Autoconfig'. Hopefully this is the extent of the manipulation and mind games that the Wii Fit will perform.
My GPS was stolen last night or this morning and I'm missing it already. For instance when I drove to Novus glass repair to get my front passenger window replaced I drove down the wrong road for a while.
When I got out of my apartment this morning there was a police car sitting in my parking lot and the officer asked me: "David? ... What'd you leave in your car?". My face must have changed a lot when I had the following sequence of realizations: (a) a police officer is asking for me by name, (b) I'm not in trouble, (c) my car must have been burgled, and (d) my GPS must be stolen.
The officer was waiting outside my complex because someone had reported my car's broken window to the police in the morning. The officer was very courteous and upon taking my date of birth noted that we were born on exactly the same day. The window's safety glass was shattered and lying in tons of tiny pieces all over the passenger seat, my glove box was open and the middle armrest where I keep my CDs was open. Nothing appears to be missing other than the GPS, the GPS power cable, and the GPS dash mount. Adding insult to theft, the their scattered my CDs throughout my car and didn't take any of them, insulting my taste in music.
My car's window should be repaired now and hopefully the rain that came in through the broken window until I covered it with plastic bags (classy!) didn't do any permanent damage.
sequelguy posted a photo:
Kierland Commons shopping center next to the resort had fancy shops, hummers and golf carts.
This past Saturday Sarah and I took the Savor Seattle Tour of various food shops in Pikes Place. Sarah had suggested it at one point and when Jesse and Nicole brought it up again when they came up to Seattle we decided to go. Surprisingly our tour group consisted of mostly locals. Except for the fish market I hadn't been to see any of the places on the tour. I particularly enjoyed the chocolate cherries and the tea. Our tour guide Tim was funny and overall I enjoyed the tour and would recommend it. I've made a map of our tour including what free trials we got at each location. Yum!