Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
deskband.cpp
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:
Windows Kernel
Development Platform:
Visual C++
- //+-------------------------------------------------------------------------
- //
- // Copyright (C) Microsoft, 1997
- //
- // File: IDeskBand.cpp
- //
- // Contents: CPreviewBand::IDeskBand methods
- //
- // History: 7-24-97 Davepl Created
- //
- //--------------------------------------------------------------------------
- #include "stdafx.h"
- #include "PreviewBand.h"
- //
- // IObjectWithSite::GetBandInfo for CPreviewBand
- //
- const int CPreviewBand::m_MIN_SIZE_X = 20;
- const int CPreviewBand::m_MIN_SIZE_Y = 20;
- STDMETHODIMP CPreviewBand::GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi)
- {
- if(NULL == pdbi)
- {
- return E_INVALIDARG;
- }
- else
- {
- m_dwBandID = dwBandID;
- m_dwViewMode = dwViewMode;
- if(pdbi->dwMask & DBIM_MINSIZE)
- {
- pdbi->ptMinSize.x = m_MIN_SIZE_X;
- pdbi->ptMinSize.y = m_MIN_SIZE_Y;
- }
- if(pdbi->dwMask & DBIM_MAXSIZE)
- {
- pdbi->ptMaxSize.x = -1;
- pdbi->ptMaxSize.y = -1;
- }
- if(pdbi->dwMask & DBIM_INTEGRAL)
- {
- pdbi->ptIntegral.x = 1;
- pdbi->ptIntegral.y = 1;
- }
- if(pdbi->dwMask & DBIM_ACTUAL)
- {
- pdbi->ptActual.x = 0;
- pdbi->ptActual.y = 0;
- }
- if(pdbi->dwMask & DBIM_TITLE)
- {
- #ifdef UNICODE
- LoadStringW(pdbi->wszTitle, IDS_BANDNAME);
- #else
- CHAR szAnsi[MAX_PATH];
- LoadStringA(_Module.m_hInstResource, IDS_BANDNAME, szAnsi, MAX_PATH);
- MultiByteToWideChar(CP_ACP, 0, szAnsi, MAX_PATH, pdbi->wszTitle, MAX_PATH);
- #endif
- }
- if(pdbi->dwMask & DBIM_MODEFLAGS)
- {
- pdbi->dwModeFlags = DBIMF_VARIABLEHEIGHT;
- }
- if(pdbi->dwMask & DBIM_BKCOLOR)
- {
- //Use the default background color by removing this flag.
- pdbi->dwMask &= ~DBIM_BKCOLOR;
- }
- return S_OK;
- }
- }