C++技巧之三

發表于:2007-07-01來源:作者:點擊數: 標簽:
代碼清單1 window_update_scope的節略本 /* ///////////////////////////////////////////////////////////// * * ... * * Extract from winstl_window_update_scope.h *摘錄自 winstl_window_update_scope.h * * www: http://www.synesis.com.au/winstl * h

代碼清單1 window_update_scope的節略本

/* ///////////////////////////////////////////////////////////// * * ... * * Extract from winstl_window_update_scope.h
*摘錄自 winstl_window_update_scope.h * * www:        http://www.synesis.com.au/winstl *             http://www.winstl.org/ * * Copyright (C) 2002, Synesis Software Pty Ltd.
*版權所有 (C) 2002, Synesis Software Pty Ltd.公司 * (Licensed under the Synesis Software Standard Source License: *  )* (由Synesis Software Standard Source License授權許可: *  ) * * ... * * ////////////////////////////////////////////////////////// */ ...  namespace winstl{     class window_update_scope    {
// Construction
// 構造    public:        // Takes a HWND and changes it´s current update-status,)        // which is set back to the original state in the        // destructor.
// 取得HWND 句柄并改變其當前更新狀態,在析構器中設置其回到初始狀態。        ws_explicit_k window_update_scope(HWND hwnd)            : m_bIsLocked(hwnd != NULL && ::LockWindowUpdate(hwnd))        {}         ~window_update_scope() winstl_throw_0()        {            if(m_bIsLocked)            {                // Lock was suclearcase/" target="_blank" >ccessful, so undo here
// 鎖定成功,因此此處反向操作                ::LockWindowUpdate(NULL);            }        } 
// Members 
//成員變量    protected:        ws_bool_t   m_bIsLocked; 
// Not to be implemented 
//不被實現    private:        window_update_scope(window_update_scope const &rhs);        window_update_scope const            &operator =(window_update_scope const &rhs);    }; } // namespace winstl //名稱空間winstl

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97