To:Dstorm<br>Chrome的主窗体确实是画出来的<br><br>Chrome的WebBrowse(客户区)上面的部分就是标题栏,至少对于窗口来说那一大块区域和标题栏的行为是一样的。Chrome通过WM_NCCALCSIZE消息来改变客户区大小,以下代码是计算客户区之外的大小:<br>void VistaFrame::ResetDWMFrame() {<br> if (IsTabStripVisible()) {<br> // Note: we don't use DwmEnableBlurBehindWindow because any region not<br> // included in the glass region is composited source over. This means<br> // that anything drawn directly with GDI appears fully transparent.<br> //<br> // We want this region to extend past our content border images, as they<br> // may be partially-transparent.<br> MARGINS margins = {kDwmBorderSize +<br> g_bitmaps[CT_TOP_LEFT_CORNER]->width(),<br> kDwmBorderSize +<br> g_bitmaps[CT_TOP_RIGHT_CORNER]->width(),<br> kDwmBorderSize +<br> IsToolBarVisible() ?<br> browser_view_->GetY() + kToolbarOverlapVertOffset :<br> tabstrip_->GetHeight(),<br> kDwmBorderSize +<br> g_bitmaps[CT_BOTTOM_CENTER]->height()};<br><br> DwmExtendFrameIntoClientArea(*this, &margins);<br> }<br>}<br><br>而地址栏是放在客户区外,也就相当于放在标题栏上。