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
unixstuff.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++
- #include "ctlspriv.h"
- #include "unixstuff.h"
- EXTERN_C void UnixPaintArrow(HDC hDC, BOOL bHoriz, BOOL bDown, int nXCenter, int nYCenter,
- int nWidth, int nHeight)
- {
- HPEN hOldPen;
- HBRUSH hOldBrush;
- POINT pFigure[4];
- LOGBRUSH hBrLog = { BS_SOLID, GetSysColor( COLOR_BTNTEXT ), 0 };
- HBRUSH hBrush = CreateBrushIndirect( &hBrLog );
- HPEN hPen = CreatePen( PS_SOLID, 1, GetSysColor( COLOR_BTNTEXT ) );
- if( hPen && hBrush )
- {
- hOldPen = (HPEN) SelectObject(hDC, hPen);
- hOldBrush = (HBRUSH) SelectObject(hDC, hBrush);
- }
- else
- {
- hOldPen = (HPEN) SelectObject(hDC, GetStockObject( BLACK_PEN ) );
- hOldBrush = (HBRUSH) SelectObject(hDC, GetStockObject( BLACK_BRUSH ) );
- }
- if(bHoriz) {
- if (bDown) {
- pFigure[0].x = nXCenter - nWidth /2;
- pFigure[0].y = nYCenter - nHeight/2;
- pFigure[1].x = nXCenter - nWidth /2;
- pFigure[1].y = nYCenter + nHeight/2;
- pFigure[2].x = nXCenter + nWidth /2;
- pFigure[2].y = nYCenter;
- } else {
- pFigure[0].x = nXCenter - nWidth /2;
- pFigure[0].y = nYCenter;
- pFigure[1].x = nXCenter + nWidth /2;
- pFigure[1].y = nYCenter + nHeight/2;
- pFigure[2].x = nXCenter + nWidth /2;
- pFigure[2].y = nYCenter - nHeight/2;
- }
- }
- else {
- if (bDown) {
- pFigure[0].x = nXCenter - nWidth /2;
- pFigure[0].y = nYCenter - nHeight/2;
- pFigure[1].x = nXCenter + nWidth /2;
- pFigure[1].y = nYCenter - nHeight/2;
- pFigure[2].x = nXCenter;
- pFigure[2].y = nYCenter + nHeight/2;
- } else {
- pFigure[0].x = nXCenter;
- pFigure[0].y = nYCenter - nHeight/2;
- pFigure[1].x = nXCenter - nWidth /2;
- pFigure[1].y = nYCenter + nHeight/2;
- pFigure[2].x = nXCenter + nWidth /2;
- pFigure[2].y = nYCenter + nHeight/2;
- }
- }
- Polygon(hDC, pFigure, 3);
- SelectObject(hDC, hOldPen);
- SelectObject(hDC, hOldBrush);
- if( hPen ) DeleteObject(hPen );
- if( hBrush ) DeleteObject(hBrush);
- }