////////////////////////////////////////////
// ___ ____ _________________ //
// / _/_ _// _______________/ //
// / _/ / / / / ___ ___ ____ //
// /__/ /_/ / / / // _/_ _/ //
// _________/ / / / // _/ / / //
// (c) 1998-2000_/ /___//_/ /_/ //
// //
////////////////////////////////////////////
// all rights reserved //
////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// ETSLayoutDialog
//
// A class for smart layouting of Dialogs and such
//
// USAGE: See LayoutMgr.html
//
// AUTHOR: Erwin Tratar <tr@et-soft.de>
//
// DISCLAIMER:
//
// This Sourcecode and all accompaning material is �1998-1999 Erwin Tratar.
// All rights reserved.
//
// The source code may be used in compiled form in any way you desire
// (including usage in commercial applications), providing that your
// application adds essential code (i.e. it is not only a wrapper) to the
// functionality found here
//
// Redistribution of the sourcecode itself, publication in any media or
// inclusion in a library requires the authors expressed written consent.
// You may not sale this code for profit.
//
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. USE IT
// AT YOUR OWN RISK! THE AUTHOR ACCEPTS NO LIABILITY FOR ANY DAMAGE/LOSS OF
// BUSINESS THAT THIS PRODUCT MAY CAUSE.
//
//
// HISTORY:
// 1998/05/1 Initial Release
// 1998/05/13 Added ability to have a Pane with a control
// 1998/05/13 Added better support for TabControls
// 1998/05/14 automatically set Icon to IDR_MAINFRAME
// 1998/05/19 no flicker on restoring position in OnInitialUpdate
// Changed procedure for load/save, see constructor
// 1998/10/02 Added support for Maximum (tracking) size
// 1998/10/02 Much improved handling regarding RELATIVE/GREEDY
// /w critical minimum size
// 1998/10/02 turn on/off gripper at lower right corner
// 1998/10/05 Support for user defined minimum size for items
// (was hardcoded 5 before)
// 1998/10/07 Fix for FormViews
// 1998/10/31 Support for SECDialogBar/CDialogBar
// 1998/10/31 simplified interface
// 1998/10/31 Advanced positioning options
// 1998/10/31 Added paneNull for empty Pane (former: NULL)
// 1998/11/20 Swapped ETSLayoutDialog constructor parameters
// 1998/11/20 Added Pane::addItemSpaceBetween
// [Leo Zelevinsky]
// 1998/11/24 Added fixup for greedy panes
// 1998/11/24 addItemSpaceBetween now subtracts 2*nDefaultBorder
// 1998/11/24 addGrowing() added as a shortcut for a paneNull
// 1998/11/24 simplified interface: no more PaneBase:: / Pane::
// needed
// 1998/11/24 added FILL_* Modes
// 1998/11/24 improved maximum size handling for greedy panes
// 1998/11/25 Fixup of greedy panes caused infinite loop in some
// cases
// 1999/01/07 addItemSpaceLike() added
// 1999/04/03 Fixed ETSLayoutFormView memory leak
// 1999/04/07 Fixed ALIGN_xCENTER
// 1999/04/08 New simple stream-interface added
// 1999/04/09 Added support for an empty Status-Bar for resizing
// instead of a gripper in the lower right corner
// [Andreas Kapust]
// 1999/04/11 New code for much less flickering, OnEraseBkgnd()
// overidden for this task
// 1999/05/12 Split Layout code into understandable pieces and adding
// a lot of comments
// 1999/06/20 ABSOLUTE_X + ALIGN_FILL_X expands item if there is any
// left space (after all Abs/Rel/Greedy processing is done)
// 1999/10/06 Changed Load() and Save() to use WINDOWPLACEMENT
// [Keith Bussell]
// 1999/11/18 Added possibility to add panes of the same orientation
// to another pane. This merges both panes in one big
// pane with the same orientation
// 1999/11/18 Added support for BCGDialogBar (only with BCG > 4.52!)
// 1999/11/25 Addes support for PropertyPages/Sheets. Uses some code
// of a code submission from Anreas Kapust
// 1999/11/25 Renamed classes to ETSLayoutXXX
// 1999/11/25 Use CreateRoot() and Root() instead of m_pRootPane in
// derived class.
// 1999/11/26 Added autopointer support. No need to use normal pointers
// when defining layout anymore. Changed m_pRootPane to
// m_RootPane
// 1999/11/26 Bug in Fixup Greedy II with multiple GREEDY panes and one
// of them min/max limited
// 1999/11/28 Fixed PaneTab::getConstrainVert() for ABSOLUTE_VERT
// 1999/11/28 Fixed itemFixed()
// 1999/11/28 Changed DWORD modeResize Arguments to layModeResize for
// better type safety. Added typesafe operator|
// 1999/12/04 Don't reposition window in UpdateLayout if it's a child
// (as a child Dialog or PropertyPage)
// 1999/12/04 Erase Backgroung with GCL_HBRBACKGROUND (if available)
// 1999/12/04 itemSpaceXXX() adds a NORESIZE item instead of ABSOLUTE_XXX
// this will fix unwanted growing in secondary direction
//
// Version: 1.0 [1999/12/04] Initial Article on CodeProject
//
// 1999/12/10 Erase Backgroung within TabCtrl was 'fixed' badly. Reverted to
// old working code
// 2000/02/02 When the Dialog is child of a View the class works correctly
// now [Didier BULTIAUW]
// 2000/02/15 Combo-Boxes were not working correctly (in all modes!)
// 2000/02/17 aligned SpinButton Controls (with buddy) now handled
// automatically
// !! do not add such a control to the layout !! it is always
// reattached to its buddy.
// 2000/02/17 changed some cotrol class names to the defined constants
//
// Version: 1.1 [2000/02/17]
//
// 2000/02/25 Fixed auto alignment of SpinButton Controls to only affect
// visible ones
// 2000/02/27 Put all the classes into the namespace 'ETSLayout'
// 2000/03/07 Fixed growing Dialog after minimizing and restoring
// 2000/05/22 Whole Statusbar (Gripper) is not excluded anymore in EraseBkgnd()
// instead only the triangular Gripper is excluded
// 2000/05/31 Fix for PropertySheets with PSH_WIZARDHASFINISH [Th�mmi]
// 2000/05/31 Fix for UpDown-Controls with EditCtrl Buddy in PropertyPages.
// These were not repositioned every time the page is being show
// until the first resize
// 2000/07/28 Problems with resizing ActiveX Controls fixed [Micheal Chapman]
// 2000/07/28 Some strings were not properly wrapped with _T()
// 2000/08/03 Check for BS_GROUPBOX was not correct as BS_GROUPBOX is more than one Bit
// 2000/08/03 New override AddMainArea added to ETSLayoutPropertySheet in order to
// have a hook for additional controls in a PropertySheet (besides the Tab)
// 2000/08/03 New override AddButtons added to ETSLayoutPropertySheet in order to
// have a hook for additional controls in the bottem pane of a PropertySheet
// 2000/08/03 Removed the need for DECLARE_LAYOUT
//
// Version: 1.2 [2000/08/05]
#define OEMRESOURCE
#include <windows.h>
#include "stdafx.h"
#include "ETSLayout.h"
using namespace ETSLayout;
#pragma warning(disable: 4097 4610 4510 4100)
#ifndef OBM_SIZE
#define OBM_SIZE 32766
// taken from WinresRc.h
// if not used for any reason
#endif
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
static UINT auIDStatusBar[] =
{
ID_SEPARATOR
};
const int ERASE_GROUP_BORDER = 10;
const int FIXUP_CUTOFF = 5;
const int TAB_SPACE = 5;
// the _NULL-Pane
CWnd* ETSLayoutMgr::paneNull = 0;
void ETSLayoutMgr::Layout(CRect& rcClient)
{
if(rcClient.Height() && rcClient.Width() && m_RootPane.IsValid()) \
m_RootPane->resizeTo(rcClient);
没有合适的资源?快使用搜索试试~ 我知道了~
xbt_tracker
共159个文件
h:39个
cpp:37个
obj:25个
5星 · 超过95%的资源 需积分: 10 35 下载量 108 浏览量
2008-09-26
15:08:49
上传
评论
收藏 3.94MB RAR 举报
温馨提示
一个用VC写的tracker服务器源码。
资源推荐
资源详情
资源评论
收起资源包目录
xbt_tracker (159个子文件)
xbt_tracker.conf.bak 30B
xbt_tracker.conf 32B
COPYING 18KB
ETSLayout.cpp 85KB
server.cpp 34KB
sha1.cpp 11KB
connection.cpp 7KB
bvalue.cpp 7KB
bt_misc.cpp 6KB
xif_key.cpp 6KB
transaction.cpp 6KB
socket.cpp 6KB
XBT Tracker.cpp 3KB
config.cpp 3KB
xif_value.cpp 3KB
virtual_binary.cpp 3KB
xcc_z.cpp 2KB
bt_torrent.cpp 2KB
bt_logger.cpp 2KB
tracker_input.cpp 2KB
xif_key_r.cpp 2KB
bt_tracker_account.cpp 2KB
sql_result.cpp 2KB
bt_tracker_url.cpp 2KB
sql_query.cpp 2KB
peer_link.cpp 2KB
database.cpp 2KB
nt_service.cpp 1KB
epoll.cpp 943B
browse_for_directory.cpp 866B
alerts.cpp 723B
stats.cpp 543B
stream_writer.cpp 472B
xcc_error.cpp 469B
static_config.cpp 432B
udp_listen_socket.cpp 390B
tcp_listen_socket.cpp 346B
stdafx.cpp 302B
stream_reader.cpp 196B
client.cpp 71B
xbt.css 166B
xbt_tracker.conf.default 30B
zlib1.dll 76KB
XBT Tracker.dsp 7KB
XBT Tracker.dsw 1KB
Entries 2KB
Entries 2KB
Entries 303B
Entries 279B
Entries 139B
XBT Tracker.exe 788KB
Entries.Extra 714B
Entries.Extra 713B
Entries.Extra 138B
Entries.Extra 114B
Entries.Extra 55B
ETSLayout.h 27KB
server.h 5KB
xif_key.h 5KB
bt_strings.h 4KB
socket.h 3KB
bt_misc.h 3KB
xif_value.h 2KB
sha1.h 2KB
xif_key_r.h 2KB
virtual_binary.h 2KB
sql_result.h 2KB
bvalue.h 2KB
bt_torrent.h 1KB
alerts.h 1KB
config.h 1KB
stream_int.h 1KB
stdafx.h 1KB
stream_reader.h 1KB
bt_tracker_account.h 1KB
transaction.h 1KB
connection.h 1KB
stream_writer.h 1KB
bt_logger.h 1KB
database.h 1KB
epoll.h 996B
sql_query.h 945B
tracker_input.h 900B
peer_link.h 882B
xcc_z.h 871B
stats.h 825B
bt_tracker_url.h 749B
xcc_error.h 731B
static_config.h 678B
client.h 559B
udp_listen_socket.h 553B
tcp_listen_socket.h 553B
nt_service.h 532B
browse_for_directory.h 414B
vartypes.h 29B
vc60.idb 713KB
XBT Tracker.ilk 1019KB
zlib1.lib 11KB
Entries.Log 30B
Entries.Log 16B
共 159 条
- 1
- 2
资源评论
- 帘卷西风2013-11-14没跑起来,代码不全啊
- wxl19866222013-03-04学习了。写的不错。 不过并发还有问题。
- seuzhr2012-10-31运行了看不出效果啊
- lk10552015-08-26客户端源码找到时了,就差跟踪器了
- diaoli20122013-02-21能学到,对我很有帮助,谢谢。
xsfor
- 粉丝: 5
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功