mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
Import and merge Wine-20041201
svn path=/trunk/; revision=12470
This commit is contained in:
parent
2e2a9d4897
commit
e0004d8405
51 changed files with 66020 additions and 0 deletions
64
reactos/lib/comctl32/Makefile.in
Normal file
64
reactos/lib/comctl32/Makefile.in
Normal file
|
@ -0,0 +1,64 @@
|
|||
EXTRADEFS = -D_COMCTL32_
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = comctl32.dll
|
||||
IMPORTS = user32 gdi32 advapi32 kernel32
|
||||
DELAYIMPORTS = winmm
|
||||
EXTRALIBS = $(LIBUNICODE)
|
||||
|
||||
C_SRCS = \
|
||||
animate.c \
|
||||
comboex.c \
|
||||
comctl32undoc.c \
|
||||
commctrl.c \
|
||||
datetime.c \
|
||||
draglist.c \
|
||||
flatsb.c \
|
||||
header.c \
|
||||
hotkey.c \
|
||||
imagelist.c \
|
||||
ipaddress.c \
|
||||
listview.c \
|
||||
monthcal.c \
|
||||
nativefont.c \
|
||||
pager.c \
|
||||
progress.c \
|
||||
propsheet.c \
|
||||
rebar.c \
|
||||
smoothscroll.c \
|
||||
string.c \
|
||||
status.c \
|
||||
syslink.c \
|
||||
tab.c \
|
||||
toolbar.c \
|
||||
tooltips.c \
|
||||
trackbar.c \
|
||||
treeview.c \
|
||||
updown.c
|
||||
|
||||
RC_SRCS = rsrc.rc
|
||||
RC_BINSRC = rsrc.rc
|
||||
RC_BINARIES = \
|
||||
idb_hist_large.bmp \
|
||||
idb_hist_small.bmp \
|
||||
idb_std_large.bmp \
|
||||
idb_std_small.bmp \
|
||||
idb_view_large.bmp \
|
||||
idb_view_small.bmp \
|
||||
idc_copy.cur \
|
||||
idc_divider.cur \
|
||||
idc_divideropen.cur \
|
||||
idc_movebutton.cur \
|
||||
idi_dragarrow.ico \
|
||||
idi_tt_error_sm.ico \
|
||||
idi_tt_info_sm.ico \
|
||||
idi_tt_warn_sm.ico \
|
||||
idt_check.bmp
|
||||
|
||||
SUBDIRS = tests
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
21
reactos/lib/comctl32/Makefile.ros-template
Normal file
21
reactos/lib/comctl32/Makefile.ros-template
Normal file
|
@ -0,0 +1,21 @@
|
|||
# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $
|
||||
|
||||
TARGET_NAME = comctl32
|
||||
|
||||
TARGET_OBJECTS = @C_SRCS@
|
||||
|
||||
TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
|
||||
|
||||
TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a
|
||||
|
||||
TARGET_BASE = $(TARGET_BASE_LIB_COMCTL32)
|
||||
|
||||
TARGET_RC_SRCS = @RC_SRCS@
|
||||
TARGET_RC_BINSRC = @RC_BINSRC@
|
||||
TARGET_RC_BINARIES = @RC_BINARIES@
|
||||
|
||||
default: all
|
||||
|
||||
DEP_OBJECTS = $(TARGET_OBJECTS)
|
||||
|
||||
include $(TOOLS_PATH)/depend.mk
|
972
reactos/lib/comctl32/animate.c
Normal file
972
reactos/lib/comctl32/animate.c
Normal file
|
@ -0,0 +1,972 @@
|
|||
/* -*- tab-width: 8; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* Animation control
|
||||
*
|
||||
* Copyright 1998, 1999 Eric Kohl
|
||||
* 1999 Eric Pouech
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTES
|
||||
* I will only improve this control once in a while.
|
||||
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||
*
|
||||
* TODO:
|
||||
* - check for the 'rec ' list in some AVI files
|
||||
* - concurrent access to infoPtr
|
||||
*/
|
||||
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "vfw.h"
|
||||
#include "mmsystem.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(animate);
|
||||
|
||||
static struct {
|
||||
HMODULE hModule;
|
||||
HIC (WINAPI *fnICOpen)(DWORD, DWORD, UINT);
|
||||
LRESULT (WINAPI *fnICClose)(HIC);
|
||||
LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD, DWORD);
|
||||
DWORD (WINAPIV *fnICDecompress)(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,LPVOID);
|
||||
} fnIC;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* reference to input stream (file or resource) */
|
||||
HGLOBAL hRes;
|
||||
HMMIO hMMio; /* handle to mmio stream */
|
||||
HWND hwndSelf;
|
||||
HWND hwndNotify;
|
||||
/* information on the loaded AVI file */
|
||||
MainAVIHeader mah;
|
||||
AVIStreamHeader ash;
|
||||
LPBITMAPINFOHEADER inbih;
|
||||
LPDWORD lpIndex;
|
||||
/* data for the decompressor */
|
||||
HIC hic;
|
||||
LPBITMAPINFOHEADER outbih;
|
||||
LPVOID indata;
|
||||
LPVOID outdata;
|
||||
/* data for the background mechanism */
|
||||
CRITICAL_SECTION cs;
|
||||
HANDLE hStopEvent;
|
||||
HANDLE hThread;
|
||||
DWORD threadId;
|
||||
UINT uTimer;
|
||||
/* data for playing the file */
|
||||
int nFromFrame;
|
||||
int nToFrame;
|
||||
int nLoop;
|
||||
int currFrame;
|
||||
/* tranparency info*/
|
||||
COLORREF transparentColor;
|
||||
HBRUSH hbrushBG;
|
||||
HBITMAP hbmPrevFrame;
|
||||
} ANIMATE_INFO;
|
||||
|
||||
#define ANIMATE_GetInfoPtr(hWnd) ((ANIMATE_INFO *)GetWindowLongPtrW(hWnd, 0))
|
||||
#define ANIMATE_COLOR_NONE 0xffffffff
|
||||
|
||||
static void ANIMATE_Notify(ANIMATE_INFO* infoPtr, UINT notif)
|
||||
{
|
||||
SendMessageA(infoPtr->hwndNotify, WM_COMMAND,
|
||||
MAKEWPARAM(GetDlgCtrlID(infoPtr->hwndSelf), notif),
|
||||
(LPARAM)infoPtr->hwndSelf);
|
||||
}
|
||||
|
||||
static BOOL ANIMATE_LoadResA(ANIMATE_INFO *infoPtr, HINSTANCE hInst, LPSTR lpName)
|
||||
{
|
||||
HRSRC hrsrc;
|
||||
MMIOINFO mminfo;
|
||||
LPVOID lpAvi;
|
||||
|
||||
hrsrc = FindResourceA(hInst, lpName, "AVI");
|
||||
if (!hrsrc)
|
||||
return FALSE;
|
||||
|
||||
infoPtr->hRes = LoadResource(hInst, hrsrc);
|
||||
if (!infoPtr->hRes)
|
||||
return FALSE;
|
||||
|
||||
lpAvi = LockResource(infoPtr->hRes);
|
||||
if (!lpAvi)
|
||||
return FALSE;
|
||||
|
||||
memset(&mminfo, 0, sizeof(mminfo));
|
||||
mminfo.fccIOProc = FOURCC_MEM;
|
||||
mminfo.pchBuffer = (LPSTR)lpAvi;
|
||||
mminfo.cchBuffer = SizeofResource(hInst, hrsrc);
|
||||
infoPtr->hMMio = mmioOpenA(NULL, &mminfo, MMIO_READ);
|
||||
if (!infoPtr->hMMio) {
|
||||
FreeResource(infoPtr->hRes);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ANIMATE_LoadFileA(ANIMATE_INFO *infoPtr, LPSTR lpName)
|
||||
{
|
||||
infoPtr->hMMio = mmioOpenA((LPSTR)lpName, NULL,
|
||||
MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
|
||||
|
||||
if (!infoPtr->hMMio)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT ANIMATE_DoStop(ANIMATE_INFO *infoPtr)
|
||||
{
|
||||
EnterCriticalSection(&infoPtr->cs);
|
||||
|
||||
/* should stop playing */
|
||||
if (infoPtr->hThread)
|
||||
{
|
||||
HANDLE handle = infoPtr->hThread;
|
||||
|
||||
TRACE("stopping animation thread\n");
|
||||
infoPtr->hThread = 0;
|
||||
SetEvent( infoPtr->hStopEvent );
|
||||
|
||||
if (infoPtr->threadId != GetCurrentThreadId())
|
||||
{
|
||||
LeaveCriticalSection(&infoPtr->cs); /* leave it a chance to run */
|
||||
WaitForSingleObject( handle, INFINITE );
|
||||
TRACE("animation thread stopped\n");
|
||||
EnterCriticalSection(&infoPtr->cs);
|
||||
}
|
||||
|
||||
CloseHandle( handle );
|
||||
CloseHandle( infoPtr->hStopEvent );
|
||||
infoPtr->hStopEvent = 0;
|
||||
}
|
||||
if (infoPtr->uTimer) {
|
||||
KillTimer(infoPtr->hwndSelf, infoPtr->uTimer);
|
||||
infoPtr->uTimer = 0;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&infoPtr->cs);
|
||||
|
||||
ANIMATE_Notify(infoPtr, ACN_STOP);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void ANIMATE_Free(ANIMATE_INFO *infoPtr)
|
||||
{
|
||||
if (infoPtr->hMMio) {
|
||||
ANIMATE_DoStop(infoPtr);
|
||||
mmioClose(infoPtr->hMMio, 0);
|
||||
if (infoPtr->hRes) {
|
||||
FreeResource(infoPtr->hRes);
|
||||
infoPtr->hRes = 0;
|
||||
}
|
||||
if (infoPtr->lpIndex) {
|
||||
HeapFree(GetProcessHeap(), 0, infoPtr->lpIndex);
|
||||
infoPtr->lpIndex = NULL;
|
||||
}
|
||||
if (infoPtr->hic) {
|
||||
fnIC.fnICClose(infoPtr->hic);
|
||||
infoPtr->hic = 0;
|
||||
}
|
||||
if (infoPtr->inbih) {
|
||||
HeapFree(GetProcessHeap(), 0, infoPtr->inbih);
|
||||
infoPtr->inbih = NULL;
|
||||
}
|
||||
if (infoPtr->outbih) {
|
||||
HeapFree(GetProcessHeap(), 0, infoPtr->outbih);
|
||||
infoPtr->outbih = NULL;
|
||||
}
|
||||
if( infoPtr->indata )
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, infoPtr->indata);
|
||||
infoPtr->indata = NULL;
|
||||
}
|
||||
if( infoPtr->outdata )
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, infoPtr->outdata);
|
||||
infoPtr->outdata = NULL;
|
||||
}
|
||||
if( infoPtr->hbmPrevFrame )
|
||||
{
|
||||
DeleteObject(infoPtr->hbmPrevFrame);
|
||||
infoPtr->hbmPrevFrame = 0;
|
||||
}
|
||||
infoPtr->indata = infoPtr->outdata = NULL;
|
||||
infoPtr->hwndSelf = 0;
|
||||
infoPtr->hMMio = 0;
|
||||
|
||||
memset(&infoPtr->mah, 0, sizeof(infoPtr->mah));
|
||||
memset(&infoPtr->ash, 0, sizeof(infoPtr->ash));
|
||||
infoPtr->nFromFrame = infoPtr->nToFrame = infoPtr->nLoop = infoPtr->currFrame = 0;
|
||||
}
|
||||
infoPtr->transparentColor = ANIMATE_COLOR_NONE;
|
||||
}
|
||||
|
||||
static void ANIMATE_TransparentBlt(ANIMATE_INFO* infoPtr, HDC hdcDest, HDC hdcSource)
|
||||
{
|
||||
HDC hdcMask;
|
||||
HBITMAP hbmMask;
|
||||
HBITMAP hbmOld;
|
||||
|
||||
/* create a transparency mask */
|
||||
hdcMask = CreateCompatibleDC(hdcDest);
|
||||
hbmMask = CreateBitmap(infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, 1,1,NULL);
|
||||
hbmOld = SelectObject(hdcMask, hbmMask);
|
||||
|
||||
SetBkColor(hdcSource,infoPtr->transparentColor);
|
||||
BitBlt(hdcMask,0,0,infoPtr->inbih->biWidth, infoPtr->inbih->biHeight,hdcSource,0,0,SRCCOPY);
|
||||
|
||||
/* mask the source bitmap */
|
||||
SetBkColor(hdcSource, RGB(0,0,0));
|
||||
SetTextColor(hdcSource, RGB(255,255,255));
|
||||
BitBlt(hdcSource, 0, 0, infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, hdcMask, 0, 0, SRCAND);
|
||||
|
||||
/* mask the destination bitmap */
|
||||
SetBkColor(hdcDest, RGB(255,255,255));
|
||||
SetTextColor(hdcDest, RGB(0,0,0));
|
||||
BitBlt(hdcDest, 0, 0, infoPtr->inbih->biWidth, infoPtr->inbih->biHeight, hdcMask, 0, 0, SRCAND);
|
||||
|
||||
/* combine source and destination */
|
||||
BitBlt(hdcDest,0,0,infoPtr->inbih->biWidth, infoPtr->inbih->biHeight,hdcSource,0,0,SRCPAINT);
|
||||
|
||||
SelectObject(hdcMask, hbmOld);
|
||||
DeleteObject(hbmMask);
|
||||
DeleteDC(hdcMask);
|
||||
}
|
||||
|
||||
static LRESULT ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
|
||||
{
|
||||
void* pBitmapData = NULL;
|
||||
LPBITMAPINFO pBitmapInfo = NULL;
|
||||
|
||||
HDC hdcMem;
|
||||
HBITMAP hbmOld;
|
||||
|
||||
int nOffsetX = 0;
|
||||
int nOffsetY = 0;
|
||||
|
||||
int nWidth;
|
||||
int nHeight;
|
||||
|
||||
if (!hDC || !infoPtr->inbih)
|
||||
return TRUE;
|
||||
|
||||
if (infoPtr->hic )
|
||||
{
|
||||
pBitmapData = infoPtr->outdata;
|
||||
pBitmapInfo = (LPBITMAPINFO)infoPtr->outbih;
|
||||
|
||||
nWidth = infoPtr->outbih->biWidth;
|
||||
nHeight = infoPtr->outbih->biHeight;
|
||||
} else
|
||||
{
|
||||
pBitmapData = infoPtr->indata;
|
||||
pBitmapInfo = (LPBITMAPINFO)infoPtr->inbih;
|
||||
|
||||
nWidth = infoPtr->inbih->biWidth;
|
||||
nHeight = infoPtr->inbih->biHeight;
|
||||
}
|
||||
|
||||
if(!infoPtr->hbmPrevFrame)
|
||||
{
|
||||
infoPtr->hbmPrevFrame=CreateCompatibleBitmap(hDC, nWidth,nHeight );
|
||||
}
|
||||
|
||||
SetDIBits(hDC, infoPtr->hbmPrevFrame, 0, nHeight, pBitmapData, (LPBITMAPINFO)pBitmapInfo, DIB_RGB_COLORS);
|
||||
|
||||
hdcMem = CreateCompatibleDC(hDC);
|
||||
hbmOld = SelectObject(hdcMem, infoPtr->hbmPrevFrame);
|
||||
|
||||
/*
|
||||
* we need to get the transparent color even without ACS_TRANSPARENT,
|
||||
* because the style can be changed later on and the color should always
|
||||
* be obtained in the first frame
|
||||
*/
|
||||
if(infoPtr->transparentColor == ANIMATE_COLOR_NONE)
|
||||
{
|
||||
infoPtr->transparentColor = GetPixel(hdcMem,0,0);
|
||||
}
|
||||
|
||||
if(GetWindowLongA(infoPtr->hwndSelf, GWL_STYLE) & ACS_TRANSPARENT)
|
||||
{
|
||||
HDC hdcFinal = CreateCompatibleDC(hDC);
|
||||
HBITMAP hbmFinal = CreateCompatibleBitmap(hDC,nWidth, nHeight);
|
||||
HBITMAP hbmOld2 = SelectObject(hdcFinal, hbmFinal);
|
||||
RECT rect;
|
||||
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
rect.right = nWidth;
|
||||
rect.bottom = nHeight;
|
||||
|
||||
if(!infoPtr->hbrushBG)
|
||||
infoPtr->hbrushBG = GetCurrentObject(hDC, OBJ_BRUSH);
|
||||
|
||||
FillRect(hdcFinal, &rect, infoPtr->hbrushBG);
|
||||
ANIMATE_TransparentBlt(infoPtr, hdcFinal, hdcMem);
|
||||
|
||||
SelectObject(hdcFinal, hbmOld2);
|
||||
SelectObject(hdcMem, hbmFinal);
|
||||
DeleteDC(hdcFinal);
|
||||
DeleteObject(infoPtr->hbmPrevFrame);
|
||||
infoPtr->hbmPrevFrame = hbmFinal;
|
||||
}
|
||||
|
||||
if (GetWindowLongA(infoPtr->hwndSelf, GWL_STYLE) & ACS_CENTER)
|
||||
{
|
||||
RECT rect;
|
||||
|
||||
GetWindowRect(infoPtr->hwndSelf, &rect);
|
||||
nOffsetX = ((rect.right - rect.left) - nWidth)/2;
|
||||
nOffsetY = ((rect.bottom - rect.top) - nHeight)/2;
|
||||
}
|
||||
BitBlt(hDC, nOffsetX, nOffsetY, nWidth, nHeight, hdcMem, 0, 0, SRCCOPY);
|
||||
|
||||
SelectObject(hdcMem, hbmOld);
|
||||
DeleteDC(hdcMem);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT ANIMATE_DrawFrame(ANIMATE_INFO* infoPtr)
|
||||
{
|
||||
HDC hDC;
|
||||
|
||||
TRACE("Drawing frame %d (loop %d)\n", infoPtr->currFrame, infoPtr->nLoop);
|
||||
|
||||
EnterCriticalSection(&infoPtr->cs);
|
||||
|
||||
mmioSeek(infoPtr->hMMio, infoPtr->lpIndex[infoPtr->currFrame], SEEK_SET);
|
||||
mmioRead(infoPtr->hMMio, infoPtr->indata, infoPtr->ash.dwSuggestedBufferSize);
|
||||
|
||||
if (infoPtr->hic &&
|
||||
fnIC.fnICDecompress(infoPtr->hic, 0, infoPtr->inbih, infoPtr->indata,
|
||||
infoPtr->outbih, infoPtr->outdata) != ICERR_OK) {
|
||||
LeaveCriticalSection(&infoPtr->cs);
|
||||
WARN("Decompression error\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((hDC = GetDC(infoPtr->hwndSelf)) != 0) {
|
||||
ANIMATE_PaintFrame(infoPtr, hDC);
|
||||
ReleaseDC(infoPtr->hwndSelf, hDC);
|
||||
}
|
||||
|
||||
if (infoPtr->currFrame++ >= infoPtr->nToFrame) {
|
||||
infoPtr->currFrame = infoPtr->nFromFrame;
|
||||
if (infoPtr->nLoop != -1) {
|
||||
if (--infoPtr->nLoop == 0) {
|
||||
ANIMATE_DoStop(infoPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&infoPtr->cs);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
|
||||
{
|
||||
ANIMATE_INFO* infoPtr = (ANIMATE_INFO*)ptr_;
|
||||
HANDLE event;
|
||||
DWORD timeout;
|
||||
|
||||
while(1)
|
||||
{
|
||||
EnterCriticalSection(&infoPtr->cs);
|
||||
ANIMATE_DrawFrame(infoPtr);
|
||||
timeout = infoPtr->mah.dwMicroSecPerFrame;
|
||||
event = infoPtr->hStopEvent;
|
||||
LeaveCriticalSection(&infoPtr->cs);
|
||||
|
||||
/* time is in microseconds, we should convert it to milliseconds */
|
||||
if ((event == 0) || WaitForSingleObject( event, (timeout+500)/1000) == WAIT_OBJECT_0)
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT ANIMATE_Play(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
|
||||
/* nothing opened */
|
||||
if (!infoPtr->hMMio)
|
||||
return FALSE;
|
||||
|
||||
if (infoPtr->hThread || infoPtr->uTimer) {
|
||||
TRACE("Already playing\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
infoPtr->nFromFrame = (INT)LOWORD(lParam);
|
||||
infoPtr->nToFrame = (INT)HIWORD(lParam);
|
||||
infoPtr->nLoop = (INT)wParam;
|
||||
|
||||
if (infoPtr->nToFrame == 0xFFFF)
|
||||
infoPtr->nToFrame = infoPtr->mah.dwTotalFrames - 1;
|
||||
|
||||
TRACE("(repeat=%d from=%d to=%d);\n",
|
||||
infoPtr->nLoop, infoPtr->nFromFrame, infoPtr->nToFrame);
|
||||
|
||||
if (infoPtr->nFromFrame >= infoPtr->nToFrame ||
|
||||
infoPtr->nToFrame >= infoPtr->mah.dwTotalFrames)
|
||||
return FALSE;
|
||||
|
||||
infoPtr->currFrame = infoPtr->nFromFrame;
|
||||
|
||||
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TIMER) {
|
||||
TRACE("Using a timer\n");
|
||||
/* create a timer to display AVI */
|
||||
infoPtr->uTimer = SetTimer(hWnd, 1, infoPtr->mah.dwMicroSecPerFrame / 1000, NULL);
|
||||
} else {
|
||||
if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
|
||||
{
|
||||
infoPtr->hbrushBG = (HBRUSH)SendMessageA(infoPtr->hwndNotify,
|
||||
WM_CTLCOLORSTATIC, 0, (LPARAM)hWnd);
|
||||
}
|
||||
|
||||
TRACE("Using an animation thread\n");
|
||||
infoPtr->hStopEvent = CreateEventW( NULL, TRUE, FALSE, NULL );
|
||||
infoPtr->hThread = CreateThread(0,0,ANIMATE_AnimationThread,(LPVOID)infoPtr, 0, &infoPtr->threadId);
|
||||
if(!infoPtr->hThread)
|
||||
{
|
||||
ERR("Could not create animation thread!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ANIMATE_Notify(infoPtr, ACN_START);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
|
||||
{
|
||||
MMCKINFO ckMainRIFF;
|
||||
MMCKINFO mmckHead;
|
||||
MMCKINFO mmckList;
|
||||
MMCKINFO mmckInfo;
|
||||
DWORD numFrame;
|
||||
DWORD insize;
|
||||
|
||||
if (mmioDescend(infoPtr->hMMio, &ckMainRIFF, NULL, 0) != 0) {
|
||||
WARN("Can't find 'RIFF' chunk\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((ckMainRIFF.ckid != FOURCC_RIFF) ||
|
||||
(ckMainRIFF.fccType != mmioFOURCC('A', 'V', 'I', ' '))) {
|
||||
WARN("Can't find 'AVI ' chunk\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mmckHead.fccType = mmioFOURCC('h', 'd', 'r', 'l');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckHead, &ckMainRIFF, MMIO_FINDLIST) != 0) {
|
||||
WARN("Can't find 'hdrl' list\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mmckInfo.ckid = mmioFOURCC('a', 'v', 'i', 'h');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckHead, MMIO_FINDCHUNK) != 0) {
|
||||
WARN("Can't find 'avih' chunk\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->mah, sizeof(infoPtr->mah));
|
||||
|
||||
TRACE("mah.dwMicroSecPerFrame=%ld\n", infoPtr->mah.dwMicroSecPerFrame);
|
||||
TRACE("mah.dwMaxBytesPerSec=%ld\n", infoPtr->mah.dwMaxBytesPerSec);
|
||||
TRACE("mah.dwPaddingGranularity=%ld\n", infoPtr->mah.dwPaddingGranularity);
|
||||
TRACE("mah.dwFlags=%ld\n", infoPtr->mah.dwFlags);
|
||||
TRACE("mah.dwTotalFrames=%ld\n", infoPtr->mah.dwTotalFrames);
|
||||
TRACE("mah.dwInitialFrames=%ld\n", infoPtr->mah.dwInitialFrames);
|
||||
TRACE("mah.dwStreams=%ld\n", infoPtr->mah.dwStreams);
|
||||
TRACE("mah.dwSuggestedBufferSize=%ld\n", infoPtr->mah.dwSuggestedBufferSize);
|
||||
TRACE("mah.dwWidth=%ld\n", infoPtr->mah.dwWidth);
|
||||
TRACE("mah.dwHeight=%ld\n", infoPtr->mah.dwHeight);
|
||||
|
||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||
|
||||
mmckList.fccType = mmioFOURCC('s', 't', 'r', 'l');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckList, &mmckHead, MMIO_FINDLIST) != 0) {
|
||||
WARN("Can't find 'strl' list\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mmckInfo.ckid = mmioFOURCC('s', 't', 'r', 'h');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, MMIO_FINDCHUNK) != 0) {
|
||||
WARN("Can't find 'strh' chunk\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->ash, sizeof(infoPtr->ash));
|
||||
|
||||
TRACE("ash.fccType='%c%c%c%c'\n", LOBYTE(LOWORD(infoPtr->ash.fccType)),
|
||||
HIBYTE(LOWORD(infoPtr->ash.fccType)),
|
||||
LOBYTE(HIWORD(infoPtr->ash.fccType)),
|
||||
HIBYTE(HIWORD(infoPtr->ash.fccType)));
|
||||
TRACE("ash.fccHandler='%c%c%c%c'\n", LOBYTE(LOWORD(infoPtr->ash.fccHandler)),
|
||||
HIBYTE(LOWORD(infoPtr->ash.fccHandler)),
|
||||
LOBYTE(HIWORD(infoPtr->ash.fccHandler)),
|
||||
HIBYTE(HIWORD(infoPtr->ash.fccHandler)));
|
||||
TRACE("ash.dwFlags=%ld\n", infoPtr->ash.dwFlags);
|
||||
TRACE("ash.wPriority=%d\n", infoPtr->ash.wPriority);
|
||||
TRACE("ash.wLanguage=%d\n", infoPtr->ash.wLanguage);
|
||||
TRACE("ash.dwInitialFrames=%ld\n", infoPtr->ash.dwInitialFrames);
|
||||
TRACE("ash.dwScale=%ld\n", infoPtr->ash.dwScale);
|
||||
TRACE("ash.dwRate=%ld\n", infoPtr->ash.dwRate);
|
||||
TRACE("ash.dwStart=%ld\n", infoPtr->ash.dwStart);
|
||||
TRACE("ash.dwLength=%ld\n", infoPtr->ash.dwLength);
|
||||
TRACE("ash.dwSuggestedBufferSize=%ld\n", infoPtr->ash.dwSuggestedBufferSize);
|
||||
TRACE("ash.dwQuality=%ld\n", infoPtr->ash.dwQuality);
|
||||
TRACE("ash.dwSampleSize=%ld\n", infoPtr->ash.dwSampleSize);
|
||||
TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left,
|
||||
infoPtr->ash.rcFrame.bottom, infoPtr->ash.rcFrame.right);
|
||||
|
||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||
|
||||
mmckInfo.ckid = mmioFOURCC('s', 't', 'r', 'f');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, MMIO_FINDCHUNK) != 0) {
|
||||
WARN("Can't find 'strh' chunk\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
infoPtr->inbih = HeapAlloc(GetProcessHeap(), 0, mmckInfo.cksize);
|
||||
if (!infoPtr->inbih) {
|
||||
WARN("Can't alloc input BIH\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mmioRead(infoPtr->hMMio, (LPSTR)infoPtr->inbih, mmckInfo.cksize);
|
||||
|
||||
TRACE("bih.biSize=%ld\n", infoPtr->inbih->biSize);
|
||||
TRACE("bih.biWidth=%ld\n", infoPtr->inbih->biWidth);
|
||||
TRACE("bih.biHeight=%ld\n", infoPtr->inbih->biHeight);
|
||||
TRACE("bih.biPlanes=%d\n", infoPtr->inbih->biPlanes);
|
||||
TRACE("bih.biBitCount=%d\n", infoPtr->inbih->biBitCount);
|
||||
TRACE("bih.biCompression=%ld\n", infoPtr->inbih->biCompression);
|
||||
TRACE("bih.biSizeImage=%ld\n", infoPtr->inbih->biSizeImage);
|
||||
TRACE("bih.biXPelsPerMeter=%ld\n", infoPtr->inbih->biXPelsPerMeter);
|
||||
TRACE("bih.biYPelsPerMeter=%ld\n", infoPtr->inbih->biYPelsPerMeter);
|
||||
TRACE("bih.biClrUsed=%ld\n", infoPtr->inbih->biClrUsed);
|
||||
TRACE("bih.biClrImportant=%ld\n", infoPtr->inbih->biClrImportant);
|
||||
|
||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||
|
||||
mmioAscend(infoPtr->hMMio, &mmckList, 0);
|
||||
|
||||
#if 0
|
||||
/* an AVI has 0 or 1 video stream, and to be animated should not contain
|
||||
* an audio stream, so only one strl is allowed
|
||||
*/
|
||||
mmckList.fccType = mmioFOURCC('s', 't', 'r', 'l');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckList, &mmckHead, MMIO_FINDLIST) == 0) {
|
||||
WARN("There should be a single 'strl' list\n");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
mmioAscend(infoPtr->hMMio, &mmckHead, 0);
|
||||
|
||||
/* no need to read optional JUNK chunk */
|
||||
|
||||
mmckList.fccType = mmioFOURCC('m', 'o', 'v', 'i');
|
||||
if (mmioDescend(infoPtr->hMMio, &mmckList, &ckMainRIFF, MMIO_FINDLIST) != 0) {
|
||||
WARN("Can't find 'movi' list\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME: should handle the 'rec ' LIST when present */
|
||||
|
||||
infoPtr->lpIndex = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
infoPtr->mah.dwTotalFrames * sizeof(DWORD));
|
||||
if (!infoPtr->lpIndex) {
|
||||
WARN("Can't alloc index array\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
numFrame = insize = 0;
|
||||
while (mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, 0) == 0 &&
|
||||
numFrame < infoPtr->mah.dwTotalFrames) {
|
||||
infoPtr->lpIndex[numFrame] = mmckInfo.dwDataOffset;
|
||||
if (insize < mmckInfo.cksize)
|
||||
insize = mmckInfo.cksize;
|
||||
numFrame++;
|
||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||
}
|
||||
if (numFrame != infoPtr->mah.dwTotalFrames) {
|
||||
WARN("Found %ld frames (/%ld)\n", numFrame, infoPtr->mah.dwTotalFrames);
|
||||
return FALSE;
|
||||
}
|
||||
if (insize > infoPtr->ash.dwSuggestedBufferSize) {
|
||||
WARN("insize=%ld suggestedSize=%ld\n", insize, infoPtr->ash.dwSuggestedBufferSize);
|
||||
infoPtr->ash.dwSuggestedBufferSize = insize;
|
||||
}
|
||||
|
||||
infoPtr->indata = HeapAlloc(GetProcessHeap(), 0, infoPtr->ash.dwSuggestedBufferSize);
|
||||
if (!infoPtr->indata) {
|
||||
WARN("Can't alloc input buffer\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
|
||||
{
|
||||
DWORD outSize;
|
||||
|
||||
/* check uncompressed AVI */
|
||||
if ((infoPtr->ash.fccHandler == mmioFOURCC('D', 'I', 'B', ' ')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC('R', 'L', 'E', ' ')) ||
|
||||
(infoPtr->ash.fccHandler == mmioFOURCC(0, 0, 0, 0)))
|
||||
{
|
||||
infoPtr->hic = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* try to get a decompressor for that type */
|
||||
infoPtr->hic = fnIC.fnICOpen(ICTYPE_VIDEO, infoPtr->ash.fccHandler, ICMODE_DECOMPRESS);
|
||||
if (!infoPtr->hic) {
|
||||
WARN("Can't load codec for the file\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
outSize = fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
|
||||
(DWORD)infoPtr->inbih, 0L);
|
||||
|
||||
infoPtr->outbih = HeapAlloc(GetProcessHeap(), 0, outSize);
|
||||
if (!infoPtr->outbih) {
|
||||
WARN("Can't alloc output BIH\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
|
||||
(DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) != outSize) {
|
||||
WARN("Can't get output BIH\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
infoPtr->outdata = HeapAlloc(GetProcessHeap(), 0, infoPtr->outbih->biSizeImage);
|
||||
if (!infoPtr->outdata) {
|
||||
WARN("Can't alloc output buffer\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
|
||||
(DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) != ICERR_OK) {
|
||||
WARN("Can't begin decompression\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT ANIMATE_OpenA(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
HINSTANCE hInstance = (HINSTANCE)wParam;
|
||||
|
||||
ANIMATE_Free(infoPtr);
|
||||
infoPtr->hwndSelf = hWnd;
|
||||
|
||||
if (!lParam) {
|
||||
TRACE("Closing avi!\n");
|
||||
/* installer of thebat! v1.62 requires FALSE here */
|
||||
return (infoPtr->hMMio != 0);
|
||||
}
|
||||
|
||||
if (!hInstance)
|
||||
hInstance = (HINSTANCE)GetWindowLongPtrW(hWnd, GWLP_HINSTANCE);
|
||||
|
||||
if (HIWORD(lParam)) {
|
||||
TRACE("(\"%s\");\n", (LPSTR)lParam);
|
||||
|
||||
if (!ANIMATE_LoadResA(infoPtr, hInstance, (LPSTR)lParam)) {
|
||||
TRACE("No AVI resource found!\n");
|
||||
if (!ANIMATE_LoadFileA(infoPtr, (LPSTR)lParam)) {
|
||||
WARN("No AVI file found!\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TRACE("(%u);\n", (WORD)LOWORD(lParam));
|
||||
|
||||
if (!ANIMATE_LoadResA(infoPtr, hInstance,
|
||||
MAKEINTRESOURCEA((INT)lParam))) {
|
||||
WARN("No AVI resource found!\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ANIMATE_GetAviInfo(infoPtr)) {
|
||||
WARN("Can't get AVI information\n");
|
||||
ANIMATE_Free(infoPtr);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!ANIMATE_GetAviCodec(infoPtr)) {
|
||||
WARN("Can't get AVI Codec\n");
|
||||
ANIMATE_Free(infoPtr);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!GetWindowLongA(hWnd, GWL_STYLE) & ACS_CENTER) {
|
||||
SetWindowPos(hWnd, 0, 0, 0, infoPtr->mah.dwWidth, infoPtr->mah.dwHeight,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
|
||||
}
|
||||
|
||||
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_AUTOPLAY) {
|
||||
return ANIMATE_Play(hWnd, -1, (LPARAM)MAKELONG(0, infoPtr->mah.dwTotalFrames-1));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* << ANIMATE_Open32W >> */
|
||||
|
||||
static LRESULT ANIMATE_Stop(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
|
||||
/* nothing opened */
|
||||
if (!infoPtr->hMMio)
|
||||
return FALSE;
|
||||
|
||||
ANIMATE_DoStop(infoPtr);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT ANIMATE_Create(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO* infoPtr;
|
||||
|
||||
if (!fnIC.hModule) /* FIXME: not thread safe */
|
||||
{
|
||||
/* since there's a circular dep between msvfw32 and comctl32, we could either:
|
||||
* - fix the build chain to allow this circular dep
|
||||
* - handle it by hand
|
||||
* AJ wants the latter :-(
|
||||
*/
|
||||
fnIC.hModule = LoadLibraryA("msvfw32.dll");
|
||||
if (!fnIC.hModule) return FALSE;
|
||||
|
||||
fnIC.fnICOpen = (void*)GetProcAddress(fnIC.hModule, "ICOpen");
|
||||
fnIC.fnICClose = (void*)GetProcAddress(fnIC.hModule, "ICClose");
|
||||
fnIC.fnICSendMessage = (void*)GetProcAddress(fnIC.hModule, "ICSendMessage");
|
||||
fnIC.fnICDecompress = (void*)GetProcAddress(fnIC.hModule, "ICDecompress");
|
||||
}
|
||||
|
||||
/* allocate memory for info structure */
|
||||
infoPtr = (ANIMATE_INFO *)Alloc(sizeof(ANIMATE_INFO));
|
||||
if (!infoPtr) {
|
||||
ERR("could not allocate info memory!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* store crossref hWnd <-> info structure */
|
||||
SetWindowLongPtrW(hWnd, 0, (DWORD_PTR)infoPtr);
|
||||
infoPtr->hwndSelf = hWnd;
|
||||
infoPtr->hwndNotify = ((LPCREATESTRUCTA)lParam)->hwndParent;
|
||||
infoPtr->transparentColor = ANIMATE_COLOR_NONE;
|
||||
infoPtr->hbmPrevFrame = 0;
|
||||
|
||||
TRACE("Animate style=0x%08lx, parent=%p\n", GetWindowLongA(hWnd, GWL_STYLE), infoPtr->hwndNotify);
|
||||
|
||||
InitializeCriticalSection(&infoPtr->cs);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT ANIMATE_Destroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
|
||||
|
||||
/* free avi data */
|
||||
ANIMATE_Free(infoPtr);
|
||||
|
||||
/* free animate info data */
|
||||
Free(infoPtr);
|
||||
SetWindowLongPtrW(hWnd, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT ANIMATE_EraseBackground(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
RECT rect;
|
||||
HBRUSH hBrush = 0;
|
||||
|
||||
if(GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
|
||||
{
|
||||
hBrush = (HBRUSH)SendMessageA(infoPtr->hwndNotify,WM_CTLCOLORSTATIC,
|
||||
wParam, (LPARAM)hWnd);
|
||||
}
|
||||
|
||||
GetClientRect(hWnd, &rect);
|
||||
FillRect((HDC)wParam, &rect, hBrush ? hBrush : GetCurrentObject((HDC)wParam, OBJ_BRUSH));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT WINAPI ANIMATE_Size(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_CENTER) {
|
||||
InvalidateRect(hWnd, NULL, TRUE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hWnd, uMsg, wParam, lParam);
|
||||
if (!ANIMATE_GetInfoPtr(hWnd) && (uMsg != WM_NCCREATE))
|
||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||
switch (uMsg)
|
||||
{
|
||||
case ACM_OPENA:
|
||||
return ANIMATE_OpenA(hWnd, wParam, lParam);
|
||||
|
||||
case ACM_OPENW:
|
||||
FIXME("ACM_OPENW: stub!\n");
|
||||
/* return ANIMATE_Open32W(hWnd, wParam, lParam); */
|
||||
return 0;
|
||||
|
||||
case ACM_PLAY:
|
||||
return ANIMATE_Play(hWnd, wParam, lParam);
|
||||
|
||||
case ACM_STOP:
|
||||
return ANIMATE_Stop(hWnd, wParam, lParam);
|
||||
|
||||
case WM_NCCREATE:
|
||||
return ANIMATE_Create(hWnd, wParam, lParam);
|
||||
|
||||
case WM_NCHITTEST:
|
||||
return HTTRANSPARENT;
|
||||
|
||||
case WM_DESTROY:
|
||||
return ANIMATE_Destroy(hWnd, wParam, lParam);
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return ANIMATE_EraseBackground(hWnd, wParam, lParam);
|
||||
|
||||
/* case WM_STYLECHANGED: FIXME shall we do something ?? */
|
||||
|
||||
case WM_TIMER:
|
||||
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
|
||||
{
|
||||
ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
infoPtr->hbrushBG = (HBRUSH)SendMessageA(infoPtr->hwndNotify,
|
||||
WM_CTLCOLORSTATIC,
|
||||
wParam, (LPARAM)hWnd);
|
||||
}
|
||||
return ANIMATE_DrawFrame(ANIMATE_GetInfoPtr(hWnd));
|
||||
|
||||
case WM_PAINT:
|
||||
{
|
||||
ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
||||
|
||||
/* the animation isn't playing, or has not decompressed
|
||||
* (and displayed) the first frame yet, don't paint
|
||||
*/
|
||||
if ((!infoPtr->uTimer && !infoPtr->hThread) ||
|
||||
!infoPtr->hbmPrevFrame)
|
||||
{
|
||||
/* default paint handling */
|
||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT)
|
||||
infoPtr->hbrushBG = (HBRUSH)SendMessageA(infoPtr->hwndNotify,
|
||||
WM_CTLCOLORSTATIC,
|
||||
wParam, (LPARAM)hWnd);
|
||||
|
||||
if (wParam)
|
||||
{
|
||||
EnterCriticalSection(&infoPtr->cs);
|
||||
ANIMATE_PaintFrame(infoPtr, (HDC)wParam);
|
||||
LeaveCriticalSection(&infoPtr->cs);
|
||||
}
|
||||
else
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC = BeginPaint(hWnd, &ps);
|
||||
|
||||
EnterCriticalSection(&infoPtr->cs);
|
||||
ANIMATE_PaintFrame(infoPtr, hDC);
|
||||
LeaveCriticalSection(&infoPtr->cs);
|
||||
|
||||
EndPaint(hWnd, &ps);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
return ANIMATE_Size(hWnd, wParam, lParam);
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
|
||||
ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
|
||||
|
||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ANIMATE_Register(void)
|
||||
{
|
||||
WNDCLASSA wndClass;
|
||||
|
||||
ZeroMemory(&wndClass, sizeof(WNDCLASSA));
|
||||
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS;
|
||||
wndClass.lpfnWndProc = ANIMATE_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(ANIMATE_INFO *);
|
||||
wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wndClass.lpszClassName = ANIMATE_CLASSA;
|
||||
|
||||
RegisterClassA(&wndClass);
|
||||
}
|
||||
|
||||
|
||||
void ANIMATE_Unregister(void)
|
||||
{
|
||||
UnregisterClassA(ANIMATE_CLASSA, NULL);
|
||||
}
|
2270
reactos/lib/comctl32/comboex.c
Normal file
2270
reactos/lib/comctl32/comboex.c
Normal file
File diff suppressed because it is too large
Load diff
194
reactos/lib/comctl32/comctl32.h
Normal file
194
reactos/lib/comctl32/comctl32.h
Normal file
|
@ -0,0 +1,194 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Common definitions (resource ids and global variables)
|
||||
*
|
||||
* Copyright 1999 Thuy Nguyen
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2002 Dimitrie O. Paun
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_COMCTL32_H
|
||||
#define __WINE_COMCTL32_H
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
|
||||
extern HMODULE COMCTL32_hModule;
|
||||
extern HBRUSH COMCTL32_hPattern55AABrush;
|
||||
|
||||
/* Property sheet / Wizard */
|
||||
#define IDD_PROPSHEET 1006
|
||||
#define IDD_WIZARD 1020
|
||||
|
||||
#define IDC_TABCONTROL 12320
|
||||
#define IDC_APPLY_BUTTON 12321
|
||||
#define IDC_BACK_BUTTON 12323
|
||||
#define IDC_NEXT_BUTTON 12324
|
||||
#define IDC_FINISH_BUTTON 12325
|
||||
#define IDC_SUNKEN_LINE 12326
|
||||
#define IDC_SUNKEN_LINEHEADER 12327
|
||||
|
||||
#define IDS_CLOSE 4160
|
||||
|
||||
/* Toolbar customization dialog */
|
||||
#define IDD_TBCUSTOMIZE 200
|
||||
|
||||
#define IDC_AVAILBTN_LBOX 201
|
||||
#define IDC_RESET_BTN 202
|
||||
#define IDC_TOOLBARBTN_LBOX 203
|
||||
#define IDC_REMOVE_BTN 204
|
||||
#define IDC_HELP_BTN 205
|
||||
#define IDC_MOVEUP_BTN 206
|
||||
#define IDC_MOVEDN_BTN 207
|
||||
|
||||
#define IDS_SEPARATOR 1024
|
||||
|
||||
/* Toolbar imagelist bitmaps */
|
||||
#define IDB_STD_SMALL 120
|
||||
#define IDB_STD_LARGE 121
|
||||
#define IDB_VIEW_SMALL 124
|
||||
#define IDB_VIEW_LARGE 125
|
||||
#define IDB_HIST_SMALL 130
|
||||
#define IDB_HIST_LARGE 131
|
||||
|
||||
|
||||
/* Month calendar month menu popup */
|
||||
#define IDD_MCMONTHMENU 300
|
||||
|
||||
#define IDM_JAN 301
|
||||
#define IDM_FEB 302
|
||||
#define IDM_MAR 303
|
||||
#define IDM_APR 304
|
||||
#define IDM_MAY 305
|
||||
#define IDM_JUN 306
|
||||
#define IDM_JUL 307
|
||||
#define IDM_AUG 308
|
||||
#define IDM_SEP 309
|
||||
#define IDM_OCT 310
|
||||
#define IDM_NOV 311
|
||||
#define IDM_DEC 312
|
||||
|
||||
#define IDM_TODAY 4163
|
||||
#define IDM_GOTODAY 4164
|
||||
|
||||
/* Treeview Checkboxes */
|
||||
|
||||
#define IDT_CHECK 401
|
||||
|
||||
|
||||
/* Header cursors */
|
||||
#define IDC_DIVIDER 106
|
||||
#define IDC_DIVIDEROPEN 107
|
||||
|
||||
|
||||
/* DragList resources */
|
||||
#define IDI_DRAGARROW 501
|
||||
#define IDC_COPY 502
|
||||
|
||||
#define IDC_MOVEBUTTON 1
|
||||
|
||||
/* HOTKEY internal strings */
|
||||
#define HKY_NONE 2048
|
||||
|
||||
/* Tooltip icons */
|
||||
#define IDI_TT_INFO_SM 22
|
||||
#define IDI_TT_WARN_SM 25
|
||||
#define IDI_TT_ERROR_SM 28
|
||||
|
||||
typedef struct
|
||||
{
|
||||
COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */
|
||||
COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */
|
||||
COLORREF clrBtnText; /* COLOR_BTNTEXT */
|
||||
COLORREF clrBtnFace; /* COLOR_BTNFACE */
|
||||
COLORREF clrHighlight; /* COLOR_HIGHLIGHT */
|
||||
COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */
|
||||
COLORREF clr3dHilight; /* COLOR_3DHILIGHT */
|
||||
COLORREF clr3dShadow; /* COLOR_3DSHADOW */
|
||||
COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */
|
||||
COLORREF clr3dFace; /* COLOR_3DFACE */
|
||||
COLORREF clrWindow; /* COLOR_WINDOW */
|
||||
COLORREF clrWindowText; /* COLOR_WINDOWTEXT */
|
||||
COLORREF clrGrayText; /* COLOR_GREYTEXT */
|
||||
COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */
|
||||
COLORREF clrInfoBk; /* COLOR_INFOBK */
|
||||
COLORREF clrInfoText; /* COLOR_INFOTEXT */
|
||||
} COMCTL32_SysColor;
|
||||
|
||||
extern COMCTL32_SysColor comctl32_color;
|
||||
|
||||
/* Internal function */
|
||||
HWND COMCTL32_CreateToolTip (HWND);
|
||||
VOID COMCTL32_RefreshSysColors(void);
|
||||
void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal);
|
||||
INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
|
||||
BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
|
||||
|
||||
#define COMCTL32_VERSION_MINOR 80
|
||||
#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0
|
||||
#define WINE_FILEVERSIONSTR "5.80"
|
||||
|
||||
/* Our internal stack structure of the window procedures to subclass */
|
||||
typedef struct _SUBCLASSPROCS {
|
||||
SUBCLASSPROC subproc;
|
||||
UINT_PTR id;
|
||||
DWORD_PTR ref;
|
||||
struct _SUBCLASSPROCS *next;
|
||||
} SUBCLASSPROCS, *LPSUBCLASSPROCS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SUBCLASSPROCS *SubclassProcs;
|
||||
SUBCLASSPROCS *stackpos;
|
||||
WNDPROC origproc;
|
||||
int running;
|
||||
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
|
||||
|
||||
/* undocumented functions */
|
||||
|
||||
LPVOID WINAPI Alloc (DWORD);
|
||||
LPVOID WINAPI ReAlloc (LPVOID, DWORD);
|
||||
BOOL WINAPI Free (LPVOID);
|
||||
DWORD WINAPI GetSize (LPVOID);
|
||||
|
||||
INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
|
||||
INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
|
||||
|
||||
INT WINAPI DPA_GetPtrIndex (const HDPA, LPVOID);
|
||||
BOOL WINAPI DPA_Grow (const HDPA, INT);
|
||||
|
||||
#define DPAM_NOSORT 0x0001
|
||||
#define DPAM_INSERT 0x0004
|
||||
#define DPAM_DELETE 0x0008
|
||||
|
||||
typedef PVOID (CALLBACK *PFNDPAMERGE)(DWORD,PVOID,PVOID,LPARAM);
|
||||
BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE, LPARAM);
|
||||
|
||||
#define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
|
||||
|
||||
LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);
|
||||
BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);
|
||||
|
||||
#endif /* __WINE_COMCTL32_H */
|
188
reactos/lib/comctl32/comctl32.spec
Normal file
188
reactos/lib/comctl32/comctl32.spec
Normal file
|
@ -0,0 +1,188 @@
|
|||
# Functions exported by the Win95 comctl32.dll
|
||||
# (these need to have these exact ordinals, because some win95 dlls
|
||||
# import comctl32.dll by ordinal)
|
||||
# This list was created from a comctl32.dll v5.81 (IE5.01).
|
||||
|
||||
2 stdcall MenuHelp(long long long long long long ptr)
|
||||
3 stdcall ShowHideMenuCtl(long long ptr)
|
||||
4 stdcall GetEffectiveClientRect(long long long)
|
||||
5 stdcall DrawStatusTextA(long ptr str long)
|
||||
6 stdcall CreateStatusWindowA(long str long long)
|
||||
7 stdcall CreateToolbar(long long long long long long ptr long)
|
||||
8 stdcall CreateMappedBitmap(long long long ptr long)
|
||||
9 stdcall -noname DPA_LoadStream(ptr ptr ptr long)
|
||||
10 stdcall -noname DPA_SaveStream(ptr ptr ptr long)
|
||||
11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
|
||||
#12 stub Cctl1632_ThunkData32
|
||||
13 stdcall MakeDragList(long)
|
||||
14 stdcall LBItemFromPt(long long long long)
|
||||
15 stdcall DrawInsert(long long long)
|
||||
16 stdcall CreateUpDownControl(long long long long long long long long long long long long)
|
||||
17 stdcall InitCommonControls()
|
||||
71 stdcall -noname Alloc(long)
|
||||
72 stdcall -noname ReAlloc(ptr long)
|
||||
73 stdcall -noname Free(ptr)
|
||||
74 stdcall -noname GetSize(ptr)
|
||||
151 stdcall -noname CreateMRUListA(ptr)
|
||||
152 stdcall -noname FreeMRUList(long)
|
||||
153 stdcall -noname AddMRUStringA(long str)
|
||||
154 stdcall -noname EnumMRUListA(long long ptr long)
|
||||
155 stdcall -noname FindMRUStringA(long str ptr)
|
||||
156 stdcall -noname DelMRUString(long long)
|
||||
157 stdcall -noname CreateMRUListLazyA(ptr long long long)
|
||||
163 stub -noname CreatePage
|
||||
164 stub -noname CreateProxyPage
|
||||
167 stdcall -noname AddMRUData(long ptr long)
|
||||
169 stdcall -noname FindMRUData(long ptr long ptr)
|
||||
233 stdcall -noname Str_GetPtrA(str str long)
|
||||
234 stdcall -noname Str_SetPtrA(str str)
|
||||
235 stdcall -noname Str_GetPtrW(wstr wstr long)
|
||||
236 stdcall -noname Str_SetPtrW(wstr wstr)
|
||||
320 stdcall -noname DSA_Create(long long)
|
||||
321 stdcall -noname DSA_Destroy(ptr)
|
||||
322 stdcall -noname DSA_GetItem(ptr long long)
|
||||
323 stdcall -noname DSA_GetItemPtr(ptr long)
|
||||
324 stdcall -noname DSA_InsertItem(ptr long long)
|
||||
325 stdcall -noname DSA_SetItem (ptr long long)
|
||||
326 stdcall -noname DSA_DeleteItem(ptr long)
|
||||
327 stdcall -noname DSA_DeleteAllItems(ptr)
|
||||
328 stdcall -noname DPA_Create(long)
|
||||
329 stdcall -noname DPA_Destroy(ptr)
|
||||
330 stdcall -noname DPA_Grow(ptr long)
|
||||
331 stdcall -noname DPA_Clone(ptr ptr)
|
||||
332 stdcall -noname DPA_GetPtr(ptr long)
|
||||
333 stdcall -noname DPA_GetPtrIndex(ptr ptr)
|
||||
334 stdcall -noname DPA_InsertPtr(ptr long ptr)
|
||||
335 stdcall -noname DPA_SetPtr(ptr long ptr)
|
||||
336 stdcall -noname DPA_DeletePtr(ptr long)
|
||||
337 stdcall -noname DPA_DeleteAllPtrs(ptr)
|
||||
338 stdcall -noname DPA_Sort(ptr ptr long)
|
||||
339 stdcall -noname DPA_Search(ptr ptr long ptr long long)
|
||||
340 stdcall -noname DPA_CreateEx(long long)
|
||||
341 stdcall -noname SendNotify(long long long ptr)
|
||||
342 stdcall -noname SendNotifyEx(long long long ptr long)
|
||||
350 stdcall -noname StrChrA(str str)
|
||||
351 stdcall -noname StrRChrA(str str long)
|
||||
352 stdcall -noname StrCmpNA(str str long)
|
||||
353 stdcall -noname StrCmpNIA(str str long)
|
||||
354 stdcall -noname StrStrA(str str)
|
||||
355 stdcall -noname StrStrIA(str str)
|
||||
356 stdcall -noname StrCSpnA(str str)
|
||||
357 stdcall -noname StrToIntA(str)
|
||||
358 stdcall -noname StrChrW(wstr long)
|
||||
359 stdcall -noname StrRChrW(wstr wstr long)
|
||||
360 stdcall -noname StrCmpNW(wstr wstr long)
|
||||
361 stdcall -noname StrCmpNIW(wstr wstr long)
|
||||
362 stdcall -noname StrStrW(wstr wstr)
|
||||
363 stdcall -noname StrStrIW(wstr wstr)
|
||||
364 stdcall -noname StrCSpnW(wstr wstr)
|
||||
365 stdcall -noname StrToIntW(wstr)
|
||||
366 stdcall -noname StrChrIA(str long)
|
||||
367 stdcall -noname StrChrIW(wstr long)
|
||||
368 stdcall -noname StrRChrIA(str str long)
|
||||
369 stdcall -noname StrRChrIW(wstr wstr long)
|
||||
372 stdcall -noname StrRStrIA(str str str)
|
||||
373 stdcall -noname StrRStrIW(wstr wstr wstr)
|
||||
374 stdcall -noname StrCSpnIA(str str)
|
||||
375 stdcall -noname StrCSpnIW(wstr wstr)
|
||||
376 stdcall -noname IntlStrEqWorkerA(long str str long)
|
||||
377 stdcall -noname IntlStrEqWorkerW(long wstr wstr long)
|
||||
382 stdcall -noname SmoothScrollWindow(ptr)
|
||||
383 stub -noname DoReaderMode
|
||||
384 stdcall -noname SetPathWordBreakProc(ptr long)
|
||||
385 stdcall -noname DPA_EnumCallback(long long long)
|
||||
386 stdcall -noname DPA_DestroyCallback(ptr ptr long)
|
||||
387 stdcall -noname DSA_EnumCallback(ptr ptr long)
|
||||
388 stdcall -noname DSA_DestroyCallback(ptr ptr long)
|
||||
389 stub -noname SHGetProcessDword
|
||||
390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
|
||||
400 stdcall -noname CreateMRUListW(ptr)
|
||||
401 stdcall -noname AddMRUStringW(long wstr)
|
||||
402 stdcall -noname FindMRUStringW(long wstr ptr)
|
||||
403 stdcall -noname EnumMRUListW(long long ptr long)
|
||||
404 stdcall -noname CreateMRUListLazyW(ptr long long long)
|
||||
410 stdcall SetWindowSubclass(long ptr long long)
|
||||
411 stdcall GetWindowSubclass(long ptr long ptr)
|
||||
412 stdcall RemoveWindowSubclass(long ptr long)
|
||||
413 stdcall DefSubclassProc(long long long long)
|
||||
414 stdcall -noname MirrorIcon(ptr ptr)
|
||||
415 stdcall DrawTextWrap(long wstr long ptr long) user32.DrawTextW
|
||||
416 stdcall DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW
|
||||
417 stdcall ExtTextOutWrap(long long long long ptr wstr long ptr) gdi32.ExtTextOutW
|
||||
418 stdcall GetCharWidthWrap(long long long long) gdi32.GetCharWidthW
|
||||
419 stdcall GetTextExtentPointWrap(long wstr long ptr) gdi32.GetTextExtentPointW
|
||||
420 stdcall GetTextExtentPoint32Wrap(long wstr long ptr) gdi32.GetTextExtentPoint32W
|
||||
421 stdcall TextOutWrap(long long long wstr long) gdi32.TextOutW
|
||||
|
||||
# Functions imported by name
|
||||
|
||||
@ stdcall CreatePropertySheetPage(ptr) CreatePropertySheetPageA
|
||||
@ stdcall CreatePropertySheetPageA(ptr)
|
||||
@ stdcall CreatePropertySheetPageW(ptr)
|
||||
@ stdcall CreateStatusWindow(long str long long) CreateStatusWindowA
|
||||
@ stdcall CreateStatusWindowW(long wstr long long)
|
||||
@ stdcall CreateToolbarEx(long long long long long long ptr long long long long long long)
|
||||
@ stdcall DestroyPropertySheetPage(long)
|
||||
@ stdcall DllGetVersion(ptr) COMCTL32_DllGetVersion
|
||||
@ stdcall DllInstall(long ptr) COMCTL32_DllInstall
|
||||
@ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA
|
||||
@ stdcall DrawStatusTextW(long ptr wstr long)
|
||||
@ stdcall FlatSB_EnableScrollBar (long long long)
|
||||
@ stdcall FlatSB_GetScrollInfo (long long ptr)
|
||||
@ stdcall FlatSB_GetScrollPos (long long)
|
||||
@ stdcall FlatSB_GetScrollProp (long long ptr)
|
||||
@ stdcall FlatSB_GetScrollRange (long long ptr ptr)
|
||||
@ stdcall FlatSB_SetScrollInfo (long long ptr long)
|
||||
@ stdcall FlatSB_SetScrollPos (long long long long)
|
||||
@ stdcall FlatSB_SetScrollProp (long long long long)
|
||||
@ stdcall FlatSB_SetScrollRange (long long long long long)
|
||||
@ stdcall FlatSB_ShowScrollBar (long long long)
|
||||
@ stdcall GetMUILanguage()
|
||||
@ stdcall ImageList_Add(ptr long long)
|
||||
@ stdcall ImageList_AddIcon(ptr long)
|
||||
@ stdcall ImageList_AddMasked(ptr long long)
|
||||
@ stdcall ImageList_BeginDrag(ptr long long long)
|
||||
@ stdcall ImageList_Copy(ptr long ptr long long)
|
||||
@ stdcall ImageList_Create(long long long long long)
|
||||
@ stdcall ImageList_Destroy(ptr)
|
||||
@ stdcall ImageList_DragEnter(long long long)
|
||||
@ stdcall ImageList_DragLeave(long)
|
||||
@ stdcall ImageList_DragMove(long long)
|
||||
@ stdcall ImageList_DragShowNolock(long)
|
||||
@ stdcall ImageList_Draw(ptr long long long long long)
|
||||
@ stdcall ImageList_DrawEx(ptr long long long long long long long long long)
|
||||
@ stdcall ImageList_DrawIndirect(ptr)
|
||||
@ stdcall ImageList_Duplicate(ptr)
|
||||
@ stdcall ImageList_EndDrag()
|
||||
@ stdcall ImageList_GetBkColor(ptr)
|
||||
@ stdcall ImageList_GetDragImage(ptr ptr)
|
||||
@ stdcall ImageList_GetFlags(ptr)
|
||||
@ stdcall ImageList_GetIcon(ptr long long)
|
||||
@ stdcall ImageList_GetIconSize(ptr ptr ptr)
|
||||
@ stdcall ImageList_GetImageCount(ptr)
|
||||
@ stdcall ImageList_GetImageInfo(ptr long ptr)
|
||||
@ stdcall ImageList_GetImageRect(ptr long ptr)
|
||||
@ stdcall ImageList_LoadImage(long str long long long long long) ImageList_LoadImageA
|
||||
@ stdcall ImageList_LoadImageA(long str long long long long long)
|
||||
@ stdcall ImageList_LoadImageW(long wstr long long long long long)
|
||||
@ stdcall ImageList_Merge(ptr long ptr long long long)
|
||||
@ stdcall ImageList_Read(ptr)
|
||||
@ stdcall ImageList_Remove(ptr long)
|
||||
@ stdcall ImageList_Replace(ptr long long long)
|
||||
@ stdcall ImageList_ReplaceIcon(ptr long long)
|
||||
@ stdcall ImageList_SetBkColor(ptr long)
|
||||
@ stdcall ImageList_SetDragCursorImage(ptr long long long)
|
||||
@ stdcall ImageList_SetFilter(ptr long long)
|
||||
@ stdcall ImageList_SetFlags(ptr long)
|
||||
@ stdcall ImageList_SetIconSize(ptr long long)
|
||||
@ stdcall ImageList_SetImageCount(ptr long)
|
||||
@ stdcall ImageList_SetOverlayImage(ptr long long)
|
||||
@ stdcall ImageList_Write(ptr ptr)
|
||||
@ stdcall InitCommonControlsEx(ptr)
|
||||
@ stdcall InitMUILanguage(long)
|
||||
@ stdcall InitializeFlatSB(long)
|
||||
@ stdcall PropertySheet(ptr) PropertySheetA
|
||||
@ stdcall PropertySheetA(ptr)
|
||||
@ stdcall PropertySheetW(ptr)
|
||||
@ stdcall UninitializeFlatSB(long)
|
||||
@ stdcall _TrackMouseEvent(ptr)
|
2542
reactos/lib/comctl32/comctl32undoc.c
Normal file
2542
reactos/lib/comctl32/comctl32undoc.c
Normal file
File diff suppressed because it is too large
Load diff
90
reactos/lib/comctl32/comctl_Cn.rc
Normal file
90
reactos/lib/comctl32/comctl_Cn.rc
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright 2002 Tisheng Chen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
#pragma code_page(936)
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "属性 "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "确定", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "取消", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "应用(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "帮助", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "结束", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "下一步(&N) >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< 上一步(&B)", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "取消", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "帮助", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "自定义工具栏"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "关闭(&C)", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "重置(&e)", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "帮助(&H)", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "上移(&U)", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "下移(&D)", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "可用工具栏按钮(&V):", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "添加(&A) ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- 删除(&R)", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "当前工具栏按钮(&T):", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "关闭"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Today:"
|
||||
IDM_GOTODAY "Go to today"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "分隔符"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "None"
|
||||
}
|
||||
|
||||
#pragma code_page(default)
|
90
reactos/lib/comctl32/comctl_Cs.rc
Normal file
90
reactos/lib/comctl32/comctl_Cs.rc
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright 1999 Eric Kohl
|
||||
*
|
||||
* Czech resources for comctl32
|
||||
* Copyright 2004 David Kredba
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Vlastnosti "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Storno", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Pou¾ít", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Nápovìda", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Prùvodce"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Dokonèit", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Dal¹í >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Zpìt", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Storno", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Nápovìda", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Nastavení panelu"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Zavøít", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Výchozí", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Nápovìda", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Nahor&u", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "&Dolù", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "D&ostupná tlaèítka:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Pøid&at ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- Odeb&rat", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Tlaèítka panelu:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Zavøít"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Dnes:"
|
||||
IDM_GOTODAY "Jdi na dne¹ek"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Oddìlovaè"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "®ádný"
|
||||
}
|
87
reactos/lib/comctl32/comctl_De.rc
Normal file
87
reactos/lib/comctl32/comctl_De.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2000 Uwe Bonnes
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Schließen"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Heute:"
|
||||
IDM_GOTODAY "Gehe zu Heute"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Trennzeichen"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Keiner"
|
||||
}
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Eigenschaften für "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "A&bbrechen", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Anwenden", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Hilfe", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Beenden", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Weiter >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Zurück", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Abbrechen", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "&Hilfe", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Toolbar einrichten"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Schließen", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Zurücksetzen", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Hilfe", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Nach &Oben verschieben", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Nach &Unten verschieben", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Vorhandene Knöpfe:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "H&inzufügen ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Löschen", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbarknöpfe:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
87
reactos/lib/comctl32/comctl_En.rc
Normal file
87
reactos/lib/comctl32/comctl_En.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 1999 Eric Kohl
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Properties for "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Cancel", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Apply", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Help", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Finish", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Next >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Back", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Cancel", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Help", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Customize Toolbar"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Close", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "R&eset", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Help", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Move &Up", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Move &Down", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "A&vailable buttons:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Add ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Remove", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbar buttons:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Close"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Today:"
|
||||
IDM_GOTODAY "Go to today"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separator"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "None"
|
||||
}
|
87
reactos/lib/comctl32/comctl_Es.rc
Normal file
87
reactos/lib/comctl32/comctl_Es.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2003 José Manuel Ferrer Ortiz
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Propiedades de "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Aceptar", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Cancelar", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Aplicar", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Ayuda", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Ayudante"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Terminar", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Siguiente >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Anterior", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Cancelar", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Ayuda", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Personalizar barra de herramientas"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Cerrar", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "R&estaurar", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Ayuda", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Mover A&rriba", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Mover A&bajo", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Botones &disponibles:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "A&ñadir ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Eliminar", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "B&otones de la barra:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Cerrar"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Hoy:"
|
||||
IDM_GOTODAY "Ir a hoy"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separador"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Ninguno"
|
||||
}
|
91
reactos/lib/comctl32/comctl_Fr.rc
Normal file
91
reactos/lib/comctl32/comctl_Fr.rc
Normal file
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Comctl32
|
||||
* French language support
|
||||
*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2003 Vincent Béron
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Propriétés pour "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Annuler", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Appliquer", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Aide", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Assistant"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Terminer", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Suivant >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Précédent", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Annuler", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Aide", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Personnaliser la barre d'outils"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Fermer", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Réinitialiser", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Aide", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "&Monter", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "&Descendre", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Boutons disponibles :", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "A&jouter ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Enlever", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Boutons de la barre d'outils :", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Fermer"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Aujourd'hui:"
|
||||
IDM_GOTODAY "Aller à aujourd'hui"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Séparateur"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Aucun"
|
||||
}
|
88
reactos/lib/comctl32/comctl_It.rc
Normal file
88
reactos/lib/comctl32/comctl_It.rc
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2003 Ivan Leo Puoti
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Proprietà per "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Annulla", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Applica", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Aiuto", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Linguetta", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Fine", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Avanti >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Indietro", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Anulla", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Aiuto", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Linguetta", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Personalitta la barra degli strumenti"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Chiudi", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "R&eimpostare", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Aiuto", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Muovi &Su", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Muovi &giù", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Tasti disponibili:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Aggiungi ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Rimuovi", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Tast della barra degli strumenti:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Chiudi"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Oggi:"
|
||||
IDM_GOTODAY "Vai a oggi"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separatore"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Nessuno"
|
||||
}
|
87
reactos/lib/comctl32/comctl_Ja.rc
Normal file
87
reactos/lib/comctl32/comctl_Ja.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2003 Hajime Segawa
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Properties for "
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "キャンセル", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "適用(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "ヘルプ", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "完了", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "進む(&N) >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< 戻る(&B)", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "キャンセル", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "ヘルプ", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Customize Toolbar"
|
||||
FONT 9, "MS UI Gothic"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "閉じる(&C)", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "リセット(R&)", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "ヘルプ(&H)", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "上へ (&U)", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "下へ (&D)", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "A&vailable buttons:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "追加(&A) ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- 削除(&R)", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbar buttons:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Close"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Today:"
|
||||
IDM_GOTODAY "Go to today"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separator"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "None"
|
||||
}
|
82
reactos/lib/comctl32/comctl_Ko.rc
Normal file
82
reactos/lib/comctl32/comctl_Ko.rc
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2002 Won-kyu Park <wkpark@kldp.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Properties for "
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "확인", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "취소", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "적용(&A)", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "도움말", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "종료", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "다음(&N) >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< 이전(&B)", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "취소", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "도움말", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Customize Toolbar"
|
||||
FONT 9, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "닫기(&C)", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "다시(&e)", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "도움말(&H)", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Move &Up", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Move &Down", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "A&vailable buttons:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Add ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Remove", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Toolbar buttons:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "닫기"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "오늘:"
|
||||
IDM_GOTODAY "Go to today"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separator"
|
||||
}
|
89
reactos/lib/comctl32/comctl_Nl.rc
Normal file
89
reactos/lib/comctl32/comctl_Nl.rc
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* comctl (Dutch resources)
|
||||
*
|
||||
* Copyright 2003 Hans Leidekker
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Eigenschappen van "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Annuleren", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Toepassen", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Help", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tabblad", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Assistent"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Beëindigen", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Volgende >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< V&orige", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Annuleren", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Help", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tabblad", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Gereedschappenbalk aanpassen"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Afsluiten", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Reset", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Help", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Verplaats Om&hoog", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Verplaats Om&laag", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Beschikbare knoppen:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Toevoegen ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Verwijderen", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Knoppen:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Sluiten"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Vandaag:"
|
||||
IDM_GOTODAY "Ga vandaag naar"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Scheidingsteken"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Geen"
|
||||
}
|
83
reactos/lib/comctl32/comctl_Pl.rc
Normal file
83
reactos/lib/comctl32/comctl_Pl.rc
Normal file
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2002 Jacek Bator
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "W³aœciwoœci "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Anuluj", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Zastosuj", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Pomoc", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Kreator"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Zakoñcz", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Dalej >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Wstecz", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Anuluj", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Pomoc", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dostosowywanie paska narzêdzi"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Zamknij", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "Z&resetuj", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Pomoc", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Przenieœ &w górê", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Przenieœ w &dó³", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Do&stêpne przyciski:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "D&odaj ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Usuñ", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Przyciski paska narzêdzi:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Zamknij"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Dziœ:"
|
||||
IDM_GOTODAY "IdŸ do dziœ"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Odstêp"
|
||||
}
|
87
reactos/lib/comctl32/comctl_Pt.rc
Normal file
87
reactos/lib/comctl32/comctl_Pt.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2003 Marcelo Duarte
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Propriedades para "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Cancelar", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Aplicar", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Ajuda", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Assistente"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Finalizar", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Avançar >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Voltar", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Cancelar", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Ajuda", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Personalizar barra de ferramentas"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Fechar", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "R&estaurar", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Ajuda", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "A&cima", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "A&baixo", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Botões &disponíveis:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Adicionar ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Remover", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Botões da barra de ferramentas:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Fechar"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Hoje:"
|
||||
IDM_GOTODAY "Ir para hoje"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separador"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Nenhum"
|
||||
}
|
89
reactos/lib/comctl32/comctl_Ru.rc
Normal file
89
reactos/lib/comctl32/comctl_Ru.rc
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* comctl (Russian resources)
|
||||
*
|
||||
* Copyright 2003 Igor Stepin
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Ñâîéñòâà äëÿ "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Îòìåíà", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "Ïðè&ìåíèòü", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Ñïðàâêà", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Ìàñòåð"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Çàâåðøèòü", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Äàëåå >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Íàçàä", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Îòìåíà", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "&Ñïðàâêà", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Íàñòðîéêà ïàíåëè èíñòðóìåíòîâ"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Çàêðûòü", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "Ñ&áðîñèòü", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Ñïðàâêà", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Ïåðåìåñòèòü &ââåðõ", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Ïåðåìåñòèòü &âíèç", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Äîñòóïíûå êíîïêè:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Äîáàâèòü ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Óäàëèòü", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Êíîïêè ïàíåëè èíñòðóìåíòîâ:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Çàêðûòü"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Ñåãîäíÿ:"
|
||||
IDM_GOTODAY "Òåêóùàÿ äàòà"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Ðàçäåëèòåëü"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Íåò"
|
||||
}
|
82
reactos/lib/comctl32/comctl_Si.rc
Normal file
82
reactos/lib/comctl32/comctl_Si.rc
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright 2002-2003 Rok Mandeljc <rok.mandeljc@gimb.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Lastnosti"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "V redu", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "Preklièi", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Uporabi", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "Pomoè", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Èarovnik"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Dokonèaj", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "Naprej >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< Na&zaj", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "Preklièi", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "Pomoè", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Prilagoditev orodne vrstice"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Zapri", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "Po&nastavi", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Pomoè", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "N&avzgor", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Na&vzdol", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "&Gumbi na voljo:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Dodaj ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Odstrani", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "G&umbi orodne vrstice:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Zapri"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Danes:"
|
||||
IDM_GOTODAY "&Poglejte danes"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Loèilo"
|
||||
}
|
87
reactos/lib/comctl32/comctl_Th.rc
Normal file
87
reactos/lib/comctl32/comctl_Th.rc
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright 2003 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_THAI, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "¤Ø³ÊÁºÑµÔ¢Í§ "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "µ¡Å§", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "¡àÅÔ¡", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "Áռŷѹ·Õ", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "ªèÇÂàËÅÕÍ", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Wizard"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "·íÒãËéàÊÃç¨", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "µèÍä» >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< Âé͹¡ÅѺ", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "¡àÅÔ¡", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "ªèÇÂàËÅÕÍ", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "»ÃѺáµè§á¶ºà¤Ã×èͧÁ×Í"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "»Ô´", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "á¡éÍÍ¡", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "ªèÇÂàËÅÕÍ", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "ÂéÒ¢Öé¹", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "ÂéÒÂŧ", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "·ÕàÅ×Í¡ä´é:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "ºÇ¡ ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- ¶Í´ÍÍ¡", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "¡ÒáÃзíÒᶺà¤Ã×èͧÁ×Í:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "»Õ´"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Çѹ¹Õé:"
|
||||
IDM_GOTODAY "ä»¶Ö§Çѹ¹Õé"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Separator"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "äÁèÁÕàÅÂ"
|
||||
}
|
89
reactos/lib/comctl32/comctl_Uk.rc
Normal file
89
reactos/lib/comctl32/comctl_Uk.rc
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* comctl (Ukrainian resources)
|
||||
*
|
||||
* Copyright 2004 Ilya Korniyko
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Âëàñòèâîñò³ äëÿ "
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
|
||||
PUSHBUTTON "&³äì³íà", IDCANCEL,58,122,50,14
|
||||
PUSHBUTTON "&Çàñòîñóâàòè", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
|
||||
PUSHBUTTON "&Äîâ³äêà", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
|
||||
END
|
||||
|
||||
|
||||
IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||
CAPTION "Ìàñòåð"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Çàâåðøèòè", IDC_FINISH_BUTTON,121,138,50,14
|
||||
DEFPUSHBUTTON "&Äàë³ >", IDC_NEXT_BUTTON,121,138,50,14
|
||||
PUSHBUTTON "< &Íàçàä", IDC_BACK_BUTTON,71,138,50,14
|
||||
PUSHBUTTON "&³äì³íà", IDCANCEL,178,138,50,14
|
||||
PUSHBUTTON "&Äîâ³äêà", IDHELP,235,138,50,14,WS_GROUP
|
||||
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
|
||||
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
|
||||
LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
|
||||
END
|
||||
|
||||
|
||||
IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Íàñòðîéêà ïàíåë³ ³íñòðóìåíò³â"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Çàêðèòè", IDCANCEL,308,6,44,14
|
||||
PUSHBUTTON "&Ñêèíóòè", IDC_RESET_BTN,308,23,44,14
|
||||
PUSHBUTTON "&Äîâ³äêà", IDC_HELP_BTN,308,40,44,14
|
||||
PUSHBUTTON "Ïåðåñóíóòè â&ãîðó", IDC_MOVEUP_BTN,308,74,44,14
|
||||
PUSHBUTTON "Ïåðåñóíóòè äî&íèçó", IDC_MOVEDN_BTN,308,91,44,14
|
||||
LTEXT "Íà&ÿâí³ êíîïêè:", -1,4,5,84,10
|
||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "&Äîäàòè ->", IDOK, 131, 42, 44, 14
|
||||
PUSHBUTTON "<- &Ïðèáðàòè", IDC_REMOVE_BTN,131,62,44,14
|
||||
LTEXT "&Êíîïêè ïàíåë³ ³íñòðóìåíò³â:", -1,182,5,78,10
|
||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_CLOSE "Çàêðèòè"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDM_TODAY "Ñüîãîäí³:"
|
||||
IDM_GOTODAY "Ïîòî÷íà äàòà"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_SEPARATOR "Ðîçä³ëüíèê"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
HKY_NONE "Íåìà"
|
||||
}
|
1551
reactos/lib/comctl32/commctrl.c
Normal file
1551
reactos/lib/comctl32/commctrl.c
Normal file
File diff suppressed because it is too large
Load diff
1059
reactos/lib/comctl32/datetime.c
Normal file
1059
reactos/lib/comctl32/datetime.c
Normal file
File diff suppressed because it is too large
Load diff
345
reactos/lib/comctl32/draglist.c
Normal file
345
reactos/lib/comctl32/draglist.c
Normal file
|
@ -0,0 +1,345 @@
|
|||
/*
|
||||
* Drag List control
|
||||
*
|
||||
* Copyright 1999 Eric Kohl
|
||||
* Copyright 2004 Robert Shearman
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
* This code was audited for completeness against the documented features
|
||||
* of Comctl32.dll version 6.0 on Mar. 10, 2004, by Robert Shearman.
|
||||
*
|
||||
* Unless otherwise noted, we believe this code to be complete, as per
|
||||
* the specification mentioned above.
|
||||
* If you discover missing features or bugs please note them below.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
/* for compiler compatibility we only accept literal ASCII strings */
|
||||
#undef TEXT
|
||||
#define TEXT(string) string
|
||||
|
||||
#define DRAGLIST_SUBCLASSID 0
|
||||
#define DRAGLIST_SCROLLPERIOD 200
|
||||
#define DRAGLIST_TIMERID 666
|
||||
|
||||
/* properties relating to IDI_DRAGICON */
|
||||
#define DRAGICON_HOTSPOT_X 17
|
||||
#define DRAGICON_HOTSPOT_Y 7
|
||||
#define DRAGICON_HEIGHT 32
|
||||
|
||||
/* internal Wine specific data for the drag list control */
|
||||
typedef struct _DRAGLISTDATA
|
||||
{
|
||||
/* are we currently in dragging mode? */
|
||||
BOOL dragging;
|
||||
|
||||
/* cursor to use as determined by DL_DRAGGING notification.
|
||||
* NOTE: as we use LoadCursor we don't have to use DeleteCursor
|
||||
* when we are finished with it */
|
||||
HCURSOR cursor;
|
||||
|
||||
/* optimisation so that we don't have to load the cursor
|
||||
* all of the time whilst dragging */
|
||||
LRESULT last_dragging_response;
|
||||
|
||||
/* prevents flicker with drawing drag arrow */
|
||||
RECT last_drag_icon_rect;
|
||||
} DRAGLISTDATA;
|
||||
|
||||
UINT uDragListMessage = 0; /* registered window message code */
|
||||
static DWORD dwLastScrollTime = 0;
|
||||
static HICON hDragArrow = NULL;
|
||||
|
||||
/***********************************************************************
|
||||
* DragList_Notify (internal)
|
||||
*
|
||||
* Sends notification messages to the parent control. Note that it
|
||||
* does not use WM_NOTIFY like the rest of the controls, but a registered
|
||||
* window message.
|
||||
*/
|
||||
static LRESULT DragList_Notify(HWND hwndLB, UINT uNotification)
|
||||
{
|
||||
DRAGLISTINFO dli;
|
||||
dli.hWnd = hwndLB;
|
||||
dli.uNotification = uNotification;
|
||||
GetCursorPos(&dli.ptCursor);
|
||||
return SendMessageW(GetParent(hwndLB), uDragListMessage, GetDlgCtrlID(hwndLB), (LPARAM)&dli);
|
||||
}
|
||||
|
||||
/* cleans up after dragging */
|
||||
static inline void DragList_EndDrag(HWND hwnd, DRAGLISTDATA * data)
|
||||
{
|
||||
KillTimer(hwnd, DRAGLIST_TIMERID);
|
||||
ReleaseCapture();
|
||||
/* clear any drag insert icon present */
|
||||
InvalidateRect(GetParent(hwnd), &data->last_drag_icon_rect, TRUE);
|
||||
/* clear data for next use */
|
||||
memset(data, 0, sizeof(*data));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DragList_SubclassWindowProc (internal)
|
||||
*
|
||||
* Handles certain messages to enable dragging for the ListBox and forwards
|
||||
* the rest to the ListBox.
|
||||
*/
|
||||
static LRESULT CALLBACK
|
||||
DragList_SubclassWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
|
||||
{
|
||||
DRAGLISTDATA * data = (DRAGLISTDATA*)dwRefData;
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_LBUTTONDOWN:
|
||||
SetFocus(hwnd);
|
||||
data->dragging = DragList_Notify(hwnd, DL_BEGINDRAG);
|
||||
if (data->dragging)
|
||||
{
|
||||
SetCapture(hwnd);
|
||||
SetTimer(hwnd, DRAGLIST_TIMERID, DRAGLIST_SCROLLPERIOD, NULL);
|
||||
}
|
||||
/* note that we don't absorb this message to let the list box
|
||||
* do its thing (normally selecting an item) */
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
/* user cancelled drag by either right clicking or
|
||||
* by pressing the escape key */
|
||||
if ((data->dragging) &&
|
||||
((uMsg == WM_RBUTTONDOWN) || (wParam == VK_ESCAPE)))
|
||||
{
|
||||
/* clean up and absorb message */
|
||||
DragList_EndDrag(hwnd, data);
|
||||
DragList_Notify(hwnd, DL_CANCELDRAG);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOUSEMOVE:
|
||||
case WM_TIMER:
|
||||
if (data->dragging)
|
||||
{
|
||||
LRESULT cursor = DragList_Notify(hwnd, DL_DRAGGING);
|
||||
/* optimisation so that we don't have to load the cursor
|
||||
* all of the time whilst dragging */
|
||||
if (data->last_dragging_response != cursor)
|
||||
{
|
||||
switch (cursor)
|
||||
{
|
||||
case DL_STOPCURSOR:
|
||||
data->cursor = LoadCursorW(NULL, (LPCWSTR)IDC_NO);
|
||||
SetCursor(data->cursor);
|
||||
break;
|
||||
case DL_COPYCURSOR:
|
||||
data->cursor = LoadCursorW(COMCTL32_hModule, (LPCWSTR)IDC_COPY);
|
||||
SetCursor(data->cursor);
|
||||
break;
|
||||
case DL_MOVECURSOR:
|
||||
data->cursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
|
||||
SetCursor(data->cursor);
|
||||
break;
|
||||
}
|
||||
data->last_dragging_response = cursor;
|
||||
}
|
||||
/* don't pass this message on to List Box */
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if (data->dragging)
|
||||
{
|
||||
DragList_EndDrag(hwnd, data);
|
||||
DragList_Notify(hwnd, DL_DROPPED);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_GETDLGCODE:
|
||||
/* tell dialog boxes that we want to receive WM_KEYDOWN events
|
||||
* for keys like VK_ESCAPE */
|
||||
if (data->dragging)
|
||||
return DLGC_WANTALLKEYS;
|
||||
break;
|
||||
case WM_NCDESTROY:
|
||||
RemoveWindowSubclass(hwnd, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID);
|
||||
Free(data);
|
||||
break;
|
||||
}
|
||||
return DefSubclassProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MakeDragList (COMCTL32.13)
|
||||
*
|
||||
* Makes a normal ListBox into a DragList by subclassing it.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Non-zero
|
||||
* Failure: Zero
|
||||
*/
|
||||
BOOL WINAPI MakeDragList (HWND hwndLB)
|
||||
{
|
||||
DRAGLISTDATA * data = Alloc(sizeof(DRAGLISTDATA));
|
||||
|
||||
TRACE("(%p)\n", hwndLB);
|
||||
|
||||
if (!uDragListMessage)
|
||||
uDragListMessage = RegisterWindowMessageA(DRAGLISTMSGSTRING);
|
||||
|
||||
return SetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR)data);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DrawInsert (COMCTL32.15)
|
||||
*
|
||||
* Draws insert arrow by the side of the ListBox item in the parent window.
|
||||
*
|
||||
* RETURNS
|
||||
* Nothing.
|
||||
*/
|
||||
VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem)
|
||||
{
|
||||
RECT rcItem, rcListBox, rcDragIcon;
|
||||
HDC hdc;
|
||||
DRAGLISTDATA * data;
|
||||
|
||||
TRACE("(%p %p %d)\n", hwndParent, hwndLB, nItem);
|
||||
|
||||
if (!hDragArrow)
|
||||
hDragArrow = LoadIconW(COMCTL32_hModule, (LPCWSTR)IDI_DRAGARROW);
|
||||
|
||||
if (LB_ERR == SendMessageW(hwndLB, LB_GETITEMRECT, nItem, (LPARAM)&rcItem))
|
||||
return;
|
||||
|
||||
if (!GetWindowRect(hwndLB, &rcListBox))
|
||||
return;
|
||||
|
||||
/* convert item rect to parent co-ordinates */
|
||||
if (!MapWindowPoints(hwndLB, hwndParent, (LPPOINT)&rcItem, 2))
|
||||
return;
|
||||
|
||||
/* convert list box rect to parent co-ordinates */
|
||||
if (!MapWindowPoints(HWND_DESKTOP, hwndParent, (LPPOINT)&rcListBox, 2))
|
||||
return;
|
||||
|
||||
rcDragIcon.left = rcListBox.left - DRAGICON_HOTSPOT_X;
|
||||
rcDragIcon.top = rcItem.top - DRAGICON_HOTSPOT_Y;
|
||||
rcDragIcon.right = rcListBox.left;
|
||||
rcDragIcon.bottom = rcDragIcon.top + DRAGICON_HEIGHT;
|
||||
|
||||
if (!GetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR*)&data))
|
||||
return;
|
||||
|
||||
if (nItem < 0)
|
||||
SetRectEmpty(&rcDragIcon);
|
||||
|
||||
/* prevent flicker by only redrawing when necessary */
|
||||
if (!EqualRect(&rcDragIcon, &data->last_drag_icon_rect))
|
||||
{
|
||||
/* get rid of any previous inserts drawn */
|
||||
RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL,
|
||||
RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
|
||||
|
||||
CopyRect(&data->last_drag_icon_rect, &rcDragIcon);
|
||||
|
||||
if (nItem >= 0)
|
||||
{
|
||||
hdc = GetDC(hwndParent);
|
||||
|
||||
DrawIcon(hdc, rcDragIcon.left, rcDragIcon.top, hDragArrow);
|
||||
|
||||
ReleaseDC(hwndParent, hdc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LBItemFromPt (COMCTL32.14)
|
||||
*
|
||||
* Gets the index of the ListBox item under the specified point,
|
||||
* scrolling if bAutoScroll is TRUE and pt is outside of the ListBox.
|
||||
*
|
||||
* RETURNS
|
||||
* The ListBox item ID if pt is over a list item or -1 otherwise.
|
||||
*/
|
||||
INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
|
||||
{
|
||||
RECT rcClient;
|
||||
INT nIndex;
|
||||
DWORD dwScrollTime;
|
||||
|
||||
TRACE("(%p %ld x %ld %s)\n",
|
||||
hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
|
||||
|
||||
ScreenToClient (hwndLB, &pt);
|
||||
GetClientRect (hwndLB, &rcClient);
|
||||
nIndex = (INT)SendMessageA (hwndLB, LB_GETTOPINDEX, 0, 0);
|
||||
|
||||
if (PtInRect (&rcClient, pt))
|
||||
{
|
||||
/* point is inside -- get the item index */
|
||||
while (TRUE)
|
||||
{
|
||||
if (SendMessageA (hwndLB, LB_GETITEMRECT, nIndex, (LPARAM)&rcClient) == LB_ERR)
|
||||
return -1;
|
||||
|
||||
if (PtInRect (&rcClient, pt))
|
||||
return nIndex;
|
||||
|
||||
nIndex++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* point is outside */
|
||||
if (!bAutoScroll)
|
||||
return -1;
|
||||
|
||||
if ((pt.x > rcClient.right) || (pt.x < rcClient.left))
|
||||
return -1;
|
||||
|
||||
if (pt.y < 0)
|
||||
nIndex--;
|
||||
else
|
||||
nIndex++;
|
||||
|
||||
dwScrollTime = GetTickCount ();
|
||||
|
||||
if ((dwScrollTime - dwLastScrollTime) < DRAGLIST_SCROLLPERIOD)
|
||||
return -1;
|
||||
|
||||
dwLastScrollTime = dwScrollTime;
|
||||
|
||||
SendMessageA (hwndLB, LB_SETTOPINDEX, (WPARAM)nIndex, 0);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
292
reactos/lib/comctl32/flatsb.c
Normal file
292
reactos/lib/comctl32/flatsb.c
Normal file
|
@ -0,0 +1,292 @@
|
|||
/*
|
||||
* Flat Scrollbar control
|
||||
*
|
||||
* Copyright 1998, 1999 Eric Kohl
|
||||
* Copyright 1998 Alex Priem
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTES
|
||||
* This is just a dummy control. An author is needed! Any volunteers?
|
||||
* I will only improve this control once in a while.
|
||||
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||
*
|
||||
* TODO:
|
||||
* - All messages.
|
||||
* - All notifications.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwDummy; /* just to keep the compiler happy ;-) */
|
||||
} FLATSB_INFO, *LPFLATSB_INFO;
|
||||
|
||||
#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongPtrW (hwnd, 0))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* InitializeFlatSB (COMCTL32.@)
|
||||
*
|
||||
* Initializes flat scroll bars for the specified window.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Non-zero
|
||||
* Failure: Zero
|
||||
*
|
||||
* NOTES
|
||||
* Subclasses specified window so that flat scroll bars may be drawn
|
||||
* and used.
|
||||
*/
|
||||
BOOL WINAPI InitializeFlatSB(HWND hwnd)
|
||||
{
|
||||
TRACE("[%p]\n", hwnd);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* UninitializeFlatSB (COMCTL32.@)
|
||||
*
|
||||
* Uninitializes flat scroll bars for the specified window.
|
||||
*
|
||||
* RETURNS
|
||||
* E_FAIL if one of the scroll bars is currently in use
|
||||
* S_FALSE if InitializeFlatSB() was never called on this hwnd
|
||||
* S_OK otherwise
|
||||
*
|
||||
* NOTES
|
||||
* Removes any subclassing on the specified window so that regular
|
||||
* scroll bars are drawn and used.
|
||||
*/
|
||||
HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
|
||||
{
|
||||
TRACE("[%p]\n", hwnd);
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_GetScrollProp (COMCTL32.@)
|
||||
*
|
||||
* Retrieves flat-scroll-bar-specific properties for the specified window.
|
||||
*
|
||||
* RETURNS
|
||||
* nonzero if successful, or zero otherwise. If index is WSB_PROP_HSTYLE,
|
||||
* the return is nonzero if InitializeFlatSB has been called for this window, or
|
||||
* zero otherwise.
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
|
||||
{
|
||||
TRACE("[%p] propIndex=%d\n", hwnd, propIndex);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_SetScrollProp (COMCTL32.@)
|
||||
*
|
||||
* Sets flat-scroll-bar-specific properties for the specified window.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: Non-zero
|
||||
* Failure: Zero
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
|
||||
{
|
||||
TRACE("[%p] index=%u newValue=%d flag=%d\n", hwnd, index, newValue, flag);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* From the Microsoft docs:
|
||||
* "If flat scroll bars haven't been initialized for the
|
||||
* window, the flat scroll bar APIs will defer to the corresponding
|
||||
* standard APIs. This allows the developer to turn flat scroll
|
||||
* bars on and off without having to write conditional code."
|
||||
*
|
||||
* So, if we just call the standard functions until we implement
|
||||
* the flat scroll bar functions, flat scroll bars will show up and
|
||||
* behave properly, as though they had simply not been setup to
|
||||
* have flat properties.
|
||||
*
|
||||
* Susan <sfarley@codeweavers.com>
|
||||
*
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_EnableScrollBar (COMCTL32.@)
|
||||
*
|
||||
* See EnableScrollBar.
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlatSB_EnableScrollBar(HWND hwnd, int nBar, UINT flags)
|
||||
{
|
||||
return EnableScrollBar(hwnd, nBar, flags);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_ShowScrollBar (COMCTL32.@)
|
||||
*
|
||||
* See ShowScrollBar.
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlatSB_ShowScrollBar(HWND hwnd, int nBar, BOOL fShow)
|
||||
{
|
||||
return ShowScrollBar(hwnd, nBar, fShow);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_GetScrollRange (COMCTL32.@)
|
||||
*
|
||||
* See GetScrollRange.
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlatSB_GetScrollRange(HWND hwnd, int nBar, LPINT min, LPINT max)
|
||||
{
|
||||
return GetScrollRange(hwnd, nBar, min, max);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_GetScrollInfo (COMCTL32.@)
|
||||
*
|
||||
* See GetScrollInfo.
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlatSB_GetScrollInfo(HWND hwnd, int nBar, LPSCROLLINFO info)
|
||||
{
|
||||
return GetScrollInfo(hwnd, nBar, info);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_GetScrollPos (COMCTL32.@)
|
||||
*
|
||||
* See GetScrollPos.
|
||||
*/
|
||||
INT WINAPI
|
||||
FlatSB_GetScrollPos(HWND hwnd, int nBar)
|
||||
{
|
||||
return GetScrollPos(hwnd, nBar);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_SetScrollPos (COMCTL32.@)
|
||||
*
|
||||
* See SetScrollPos.
|
||||
*/
|
||||
INT WINAPI
|
||||
FlatSB_SetScrollPos(HWND hwnd, int nBar, INT pos, BOOL bRedraw)
|
||||
{
|
||||
return SetScrollPos(hwnd, nBar, pos, bRedraw);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_SetScrollInfo (COMCTL32.@)
|
||||
*
|
||||
* See SetScrollInfo.
|
||||
*/
|
||||
INT WINAPI
|
||||
FlatSB_SetScrollInfo(HWND hwnd, int nBar, LPSCROLLINFO info, BOOL bRedraw)
|
||||
{
|
||||
return SetScrollInfo(hwnd, nBar, info, bRedraw);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FlatSB_SetScrollRange (COMCTL32.@)
|
||||
*
|
||||
* See SetScrollRange.
|
||||
*/
|
||||
INT WINAPI
|
||||
FlatSB_SetScrollRange(HWND hwnd, int nBar, INT min, INT max, BOOL bRedraw)
|
||||
{
|
||||
return SetScrollRange(hwnd, nBar, min, max, bRedraw);
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
FlatSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TRACE("[%p] wParam=%04x lParam=%08lx\n", hwnd, wParam, lParam);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
FlatSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
TRACE("[%p] wParam=%04x lParam=%08lx\n", hwnd, wParam, lParam);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT WINAPI
|
||||
FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (!FlatSB_GetInfoPtr(hwnd) && (uMsg != WM_CREATE))
|
||||
return DefWindowProcA( hwnd, uMsg, wParam, lParam );
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
return FlatSB_Create (hwnd, wParam, lParam);
|
||||
|
||||
case WM_DESTROY:
|
||||
return FlatSB_Destroy (hwnd, wParam, lParam);
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
|
||||
ERR("unknown msg %04x wp=%08x lp=%08lx\n",
|
||||
uMsg, wParam, lParam);
|
||||
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
FLATSB_Register (void)
|
||||
{
|
||||
WNDCLASSA wndClass;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
|
||||
wndClass.style = CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = FlatSB_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(FLATSB_INFO *);
|
||||
wndClass.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
||||
wndClass.lpszClassName = FLATSB_CLASSA;
|
||||
|
||||
RegisterClassA (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
FLATSB_Unregister (void)
|
||||
{
|
||||
UnregisterClassA (FLATSB_CLASSA, NULL);
|
||||
}
|
1859
reactos/lib/comctl32/header.c
Normal file
1859
reactos/lib/comctl32/header.c
Normal file
File diff suppressed because it is too large
Load diff
561
reactos/lib/comctl32/hotkey.c
Normal file
561
reactos/lib/comctl32/hotkey.c
Normal file
|
@ -0,0 +1,561 @@
|
|||
/*
|
||||
* Hotkey control
|
||||
*
|
||||
* Copyright 1998, 1999 Eric Kohl
|
||||
* Copyright 2002 Gyorgy 'Nog' Jeney
|
||||
* Copyright 2004 Robert Shearman
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* This code was audited for completeness against the documented features
|
||||
* of Comctl32.dll version 6.0 on Sep. 21, 2004, by Robert Shearman.
|
||||
*
|
||||
* Unless otherwise noted, we believe this code to be complete, as per
|
||||
* the specification mentioned above.
|
||||
* If you discover missing features or bugs please note them below.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(hotkey);
|
||||
|
||||
typedef struct tagHOTKEY_INFO
|
||||
{
|
||||
HWND hwndSelf;
|
||||
HWND hwndNotify;
|
||||
HFONT hFont;
|
||||
BOOL bFocus;
|
||||
INT nHeight;
|
||||
WORD HotKey;
|
||||
WORD InvComb;
|
||||
WORD InvMod;
|
||||
BYTE CurrMod;
|
||||
INT CaretPos;
|
||||
DWORD ScanCode;
|
||||
WCHAR strNone[15]; /* hope its long enough ... */
|
||||
} HOTKEY_INFO;
|
||||
|
||||
static const WCHAR HOTKEY_plussep[] = { ' ', '+', ' ' };
|
||||
static LRESULT HOTKEY_SetFont (HOTKEY_INFO *infoPtr, HFONT hFont, BOOL redraw);
|
||||
|
||||
#define IsOnlySet(flags) (infoPtr->CurrMod == (flags))
|
||||
|
||||
static BOOL
|
||||
HOTKEY_IsCombInv(HOTKEY_INFO *infoPtr)
|
||||
{
|
||||
TRACE("(infoPtr=%p)\n", infoPtr);
|
||||
if((infoPtr->InvComb & HKCOMB_NONE) && !infoPtr->CurrMod)
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_S) && IsOnlySet(HOTKEYF_SHIFT))
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_C) && IsOnlySet(HOTKEYF_CONTROL))
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_A) && IsOnlySet(HOTKEYF_ALT))
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_SC) &&
|
||||
IsOnlySet(HOTKEYF_SHIFT | HOTKEYF_CONTROL))
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_SA) && IsOnlySet(HOTKEYF_SHIFT | HOTKEYF_ALT))
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_CA) &&
|
||||
IsOnlySet(HOTKEYF_CONTROL | HOTKEYF_ALT))
|
||||
return TRUE;
|
||||
if((infoPtr->InvComb & HKCOMB_SCA) &&
|
||||
IsOnlySet(HOTKEYF_SHIFT | HOTKEYF_CONTROL | HOTKEYF_ALT))
|
||||
return TRUE;
|
||||
|
||||
TRACE("() Modifiers are valid\n");
|
||||
return FALSE;
|
||||
}
|
||||
#undef IsOnlySet
|
||||
|
||||
static void
|
||||
HOTKEY_DrawHotKey(HOTKEY_INFO *infoPtr, HDC hdc, LPCWSTR KeyName, WORD NameLen)
|
||||
{
|
||||
SIZE TextSize;
|
||||
INT nXStart, nYStart;
|
||||
COLORREF clrOldText, clrOldBk;
|
||||
HFONT hFontOld;
|
||||
|
||||
/* Make a gap from the frame */
|
||||
nXStart = GetSystemMetrics(SM_CXBORDER);
|
||||
nYStart = GetSystemMetrics(SM_CYBORDER);
|
||||
|
||||
hFontOld = SelectObject(hdc, infoPtr->hFont);
|
||||
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
||||
{
|
||||
clrOldText = SetTextColor(hdc, comctl32_color.clrGrayText);
|
||||
clrOldBk = SetBkColor(hdc, comctl32_color.clrBtnFace);
|
||||
}
|
||||
else
|
||||
{
|
||||
clrOldText = SetTextColor(hdc, comctl32_color.clrWindowText);
|
||||
clrOldBk = SetBkColor(hdc, comctl32_color.clrWindow);
|
||||
}
|
||||
|
||||
TextOutW(hdc, nXStart, nYStart, KeyName, NameLen);
|
||||
|
||||
/* Get the text width for the caret */
|
||||
GetTextExtentPoint32W(hdc, KeyName, NameLen, &TextSize);
|
||||
infoPtr->CaretPos = nXStart + TextSize.cx;
|
||||
|
||||
SetBkColor(hdc, clrOldBk);
|
||||
SetTextColor(hdc, clrOldText);
|
||||
SelectObject(hdc, hFontOld);
|
||||
|
||||
/* position the caret */
|
||||
SetCaretPos(infoPtr->CaretPos, nYStart);
|
||||
}
|
||||
|
||||
/* Draw the names of the keys in the control */
|
||||
static void
|
||||
HOTKEY_Refresh(HOTKEY_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
WCHAR KeyName[64];
|
||||
WORD NameLen = 0;
|
||||
BYTE Modifier;
|
||||
|
||||
TRACE("(infoPtr=%p hdc=%p)\n", infoPtr, hdc);
|
||||
|
||||
if(!infoPtr->CurrMod && !infoPtr->HotKey) {
|
||||
HOTKEY_DrawHotKey (infoPtr, hdc, infoPtr->strNone, 4);
|
||||
return;
|
||||
}
|
||||
|
||||
if(infoPtr->HotKey)
|
||||
Modifier = HIBYTE(infoPtr->HotKey);
|
||||
else if(HOTKEY_IsCombInv(infoPtr))
|
||||
Modifier = infoPtr->InvMod;
|
||||
else
|
||||
Modifier = infoPtr->CurrMod;
|
||||
|
||||
if(Modifier & HOTKEYF_CONTROL) {
|
||||
GetKeyNameTextW(MAKELPARAM(0, MapVirtualKeyW(VK_CONTROL, 0)),
|
||||
KeyName, 64);
|
||||
NameLen = lstrlenW(KeyName);
|
||||
memcpy(&KeyName[NameLen], HOTKEY_plussep, sizeof(HOTKEY_plussep));
|
||||
NameLen += 3;
|
||||
}
|
||||
if(Modifier & HOTKEYF_SHIFT) {
|
||||
GetKeyNameTextW(MAKELPARAM(0, MapVirtualKeyW(VK_SHIFT, 0)),
|
||||
&KeyName[NameLen], 64 - NameLen);
|
||||
NameLen = lstrlenW(KeyName);
|
||||
memcpy(&KeyName[NameLen], HOTKEY_plussep, sizeof(HOTKEY_plussep));
|
||||
NameLen += 3;
|
||||
}
|
||||
if(Modifier & HOTKEYF_ALT) {
|
||||
GetKeyNameTextW(MAKELPARAM(0, MapVirtualKeyW(VK_MENU, 0)),
|
||||
&KeyName[NameLen], 64 - NameLen);
|
||||
NameLen = lstrlenW(KeyName);
|
||||
memcpy(&KeyName[NameLen], HOTKEY_plussep, sizeof(HOTKEY_plussep));
|
||||
NameLen += 3;
|
||||
}
|
||||
|
||||
if(infoPtr->HotKey) {
|
||||
GetKeyNameTextW(infoPtr->ScanCode, &KeyName[NameLen], 64 - NameLen);
|
||||
NameLen = lstrlenW(KeyName);
|
||||
}
|
||||
else
|
||||
KeyName[NameLen] = 0;
|
||||
|
||||
HOTKEY_DrawHotKey (infoPtr, hdc, KeyName, NameLen);
|
||||
}
|
||||
|
||||
static void
|
||||
HOTKEY_Paint(HOTKEY_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
if (hdc)
|
||||
HOTKEY_Refresh(infoPtr, hdc);
|
||||
else {
|
||||
PAINTSTRUCT ps;
|
||||
hdc = BeginPaint (infoPtr->hwndSelf, &ps);
|
||||
HOTKEY_Refresh (infoPtr, hdc);
|
||||
EndPaint (infoPtr->hwndSelf, &ps);
|
||||
}
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_GetHotKey(HOTKEY_INFO *infoPtr)
|
||||
{
|
||||
TRACE("(infoPtr=%p) Modifiers: 0x%x, Virtual Key: %d\n", infoPtr,
|
||||
HIBYTE(infoPtr->HotKey), LOBYTE(infoPtr->HotKey));
|
||||
return (LRESULT)infoPtr->HotKey;
|
||||
}
|
||||
|
||||
static void
|
||||
HOTKEY_SetHotKey(HOTKEY_INFO *infoPtr, WORD hotKey)
|
||||
{
|
||||
infoPtr->HotKey = hotKey;
|
||||
infoPtr->ScanCode =
|
||||
MAKELPARAM(0, MapVirtualKeyW(LOBYTE(infoPtr->HotKey), 0));
|
||||
TRACE("(infoPtr=%p hotKey=%x) Modifiers: 0x%x, Virtual Key: %d\n", infoPtr,
|
||||
hotKey, HIBYTE(infoPtr->HotKey), LOBYTE(infoPtr->HotKey));
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
HOTKEY_SetRules(HOTKEY_INFO *infoPtr, WORD invComb, WORD invMod)
|
||||
{
|
||||
infoPtr->InvComb = invComb;
|
||||
infoPtr->InvMod = invMod;
|
||||
TRACE("(infoPtr=%p) Invalid Modifers: 0x%x, If Invalid: 0x%x\n", infoPtr,
|
||||
infoPtr->InvComb, infoPtr->InvMod);
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_Create (HOTKEY_INFO *infoPtr, LPCREATESTRUCTW lpcs)
|
||||
{
|
||||
infoPtr->hwndNotify = lpcs->hwndParent;
|
||||
|
||||
HOTKEY_SetFont(infoPtr, GetStockObject(SYSTEM_FONT), 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_Destroy (HOTKEY_INFO *infoPtr)
|
||||
{
|
||||
HWND hwnd = infoPtr->hwndSelf;
|
||||
/* free hotkey info data */
|
||||
Free (infoPtr);
|
||||
SetWindowLongPtrW (hwnd, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_EraseBackground (HOTKEY_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
HBRUSH hBrush, hSolidBrush = NULL;
|
||||
RECT rc;
|
||||
|
||||
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
||||
hBrush = hSolidBrush = CreateSolidBrush(comctl32_color.clrBtnFace);
|
||||
else
|
||||
{
|
||||
hBrush = (HBRUSH)SendMessageW(infoPtr->hwndNotify, WM_CTLCOLOREDIT,
|
||||
(WPARAM)hdc, (LPARAM)infoPtr->hwndSelf);
|
||||
if (!hBrush)
|
||||
hBrush = hSolidBrush = CreateSolidBrush(comctl32_color.clrWindow);
|
||||
}
|
||||
|
||||
GetClientRect (infoPtr->hwndSelf, &rc);
|
||||
|
||||
FillRect (hdc, &rc, hBrush);
|
||||
|
||||
if (hSolidBrush)
|
||||
DeleteObject(hSolidBrush);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
inline static LRESULT
|
||||
HOTKEY_GetFont (HOTKEY_INFO *infoPtr)
|
||||
{
|
||||
return (LRESULT)infoPtr->hFont;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_KeyDown (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags)
|
||||
{
|
||||
WORD wOldHotKey;
|
||||
BYTE bOldMod;
|
||||
|
||||
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
||||
return 0;
|
||||
|
||||
TRACE("() Key: %ld\n", key);
|
||||
|
||||
wOldHotKey = infoPtr->HotKey;
|
||||
bOldMod = infoPtr->CurrMod;
|
||||
|
||||
/* If any key is Pressed, we have to reset the hotkey in the control */
|
||||
infoPtr->HotKey = 0;
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case VK_RETURN:
|
||||
case VK_TAB:
|
||||
case VK_SPACE:
|
||||
case VK_DELETE:
|
||||
case VK_ESCAPE:
|
||||
case VK_BACK:
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
return DefWindowProcW (infoPtr->hwndSelf, WM_KEYDOWN, key, flags);
|
||||
|
||||
case VK_SHIFT:
|
||||
infoPtr->CurrMod |= HOTKEYF_SHIFT;
|
||||
break;
|
||||
case VK_CONTROL:
|
||||
infoPtr->CurrMod |= HOTKEYF_CONTROL;
|
||||
break;
|
||||
case VK_MENU:
|
||||
infoPtr->CurrMod |= HOTKEYF_ALT;
|
||||
break;
|
||||
|
||||
default:
|
||||
if(HOTKEY_IsCombInv(infoPtr))
|
||||
infoPtr->HotKey = MAKEWORD(key, infoPtr->InvMod);
|
||||
else
|
||||
infoPtr->HotKey = MAKEWORD(key, infoPtr->CurrMod);
|
||||
infoPtr->ScanCode = flags;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((wOldHotKey != infoPtr->HotKey) || (bOldMod != infoPtr->CurrMod))
|
||||
{
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
|
||||
/* send EN_CHANGE notification */
|
||||
SendMessageW(infoPtr->hwndNotify, WM_COMMAND,
|
||||
MAKEWPARAM(GetDlgCtrlID(infoPtr->hwndSelf), EN_CHANGE),
|
||||
(LPARAM)infoPtr->hwndSelf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags)
|
||||
{
|
||||
BYTE bOldMod;
|
||||
|
||||
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
||||
return 0;
|
||||
|
||||
TRACE("() Key: %ld\n", key);
|
||||
|
||||
bOldMod = infoPtr->CurrMod;
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case VK_SHIFT:
|
||||
infoPtr->CurrMod &= ~HOTKEYF_SHIFT;
|
||||
break;
|
||||
case VK_CONTROL:
|
||||
infoPtr->CurrMod &= ~HOTKEYF_CONTROL;
|
||||
break;
|
||||
case VK_MENU:
|
||||
infoPtr->CurrMod &= ~HOTKEYF_ALT;
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (bOldMod != infoPtr->CurrMod)
|
||||
{
|
||||
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
|
||||
|
||||
/* send EN_CHANGE notification */
|
||||
SendMessageW(infoPtr->hwndNotify, WM_COMMAND,
|
||||
MAKEWPARAM(GetDlgCtrlID(infoPtr->hwndSelf), EN_CHANGE),
|
||||
(LPARAM)infoPtr->hwndSelf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_KillFocus (HOTKEY_INFO *infoPtr, HWND receiveFocus)
|
||||
{
|
||||
infoPtr->bFocus = FALSE;
|
||||
DestroyCaret ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_LButtonDown (HOTKEY_INFO *infoPtr)
|
||||
{
|
||||
if (!(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED))
|
||||
SetFocus (infoPtr->hwndSelf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
inline static LRESULT
|
||||
HOTKEY_NCCreate (HWND hwnd, LPCREATESTRUCTW lpcs)
|
||||
{
|
||||
HOTKEY_INFO *infoPtr;
|
||||
DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE);
|
||||
SetWindowLongW (hwnd, GWL_EXSTYLE,
|
||||
dwExStyle | WS_EX_CLIENTEDGE);
|
||||
|
||||
/* allocate memory for info structure */
|
||||
infoPtr = (HOTKEY_INFO *)Alloc (sizeof(HOTKEY_INFO));
|
||||
SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr);
|
||||
|
||||
/* initialize info structure */
|
||||
infoPtr->HotKey = infoPtr->InvComb = infoPtr->InvMod = infoPtr->CurrMod = 0;
|
||||
infoPtr->CaretPos = GetSystemMetrics(SM_CXBORDER);
|
||||
infoPtr->hwndSelf = hwnd;
|
||||
LoadStringW(COMCTL32_hModule, HKY_NONE, infoPtr->strNone, 15);
|
||||
|
||||
return DefWindowProcW (infoPtr->hwndSelf, WM_NCCREATE, 0, (LPARAM)lpcs);
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_SetFocus (HOTKEY_INFO *infoPtr, HWND lostFocus)
|
||||
{
|
||||
infoPtr->bFocus = TRUE;
|
||||
|
||||
CreateCaret (infoPtr->hwndSelf, NULL, 1, infoPtr->nHeight);
|
||||
SetCaretPos (infoPtr->CaretPos, GetSystemMetrics(SM_CYBORDER));
|
||||
ShowCaret (infoPtr->hwndSelf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT
|
||||
HOTKEY_SetFont (HOTKEY_INFO *infoPtr, HFONT hFont, BOOL redraw)
|
||||
{
|
||||
TEXTMETRICW tm;
|
||||
HDC hdc;
|
||||
HFONT hOldFont = 0;
|
||||
|
||||
infoPtr->hFont = hFont;
|
||||
|
||||
hdc = GetDC (infoPtr->hwndSelf);
|
||||
if (infoPtr->hFont)
|
||||
hOldFont = SelectObject (hdc, infoPtr->hFont);
|
||||
|
||||
GetTextMetricsW (hdc, &tm);
|
||||
infoPtr->nHeight = tm.tmHeight;
|
||||
|
||||
if (infoPtr->hFont)
|
||||
SelectObject (hdc, hOldFont);
|
||||
ReleaseDC (infoPtr->hwndSelf, hdc);
|
||||
|
||||
if (redraw)
|
||||
InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT WINAPI
|
||||
HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HOTKEY_INFO *infoPtr = (HOTKEY_INFO *)GetWindowLongPtrW (hwnd, 0);
|
||||
TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, uMsg, wParam, lParam);
|
||||
if (!infoPtr && (uMsg != WM_NCCREATE))
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
switch (uMsg)
|
||||
{
|
||||
case HKM_GETHOTKEY:
|
||||
return HOTKEY_GetHotKey (infoPtr);
|
||||
case HKM_SETHOTKEY:
|
||||
HOTKEY_SetHotKey (infoPtr, (WORD)wParam);
|
||||
break;
|
||||
case HKM_SETRULES:
|
||||
HOTKEY_SetRules (infoPtr, (WORD)wParam, (WORD)lParam);
|
||||
break;
|
||||
|
||||
case WM_CHAR:
|
||||
case WM_SYSCHAR:
|
||||
return HOTKEY_KeyDown (infoPtr, MapVirtualKeyW(LOBYTE(HIWORD(lParam)), 1), lParam);
|
||||
|
||||
case WM_CREATE:
|
||||
return HOTKEY_Create (infoPtr, (LPCREATESTRUCTW)lParam);
|
||||
|
||||
case WM_DESTROY:
|
||||
return HOTKEY_Destroy (infoPtr);
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return HOTKEY_EraseBackground (infoPtr, (HDC)wParam);
|
||||
|
||||
case WM_GETDLGCODE:
|
||||
return DLGC_WANTCHARS | DLGC_WANTARROWS;
|
||||
|
||||
case WM_GETFONT:
|
||||
return HOTKEY_GetFont (infoPtr);
|
||||
|
||||
case WM_KEYDOWN:
|
||||
case WM_SYSKEYDOWN:
|
||||
return HOTKEY_KeyDown (infoPtr, wParam, lParam);
|
||||
|
||||
case WM_KEYUP:
|
||||
case WM_SYSKEYUP:
|
||||
return HOTKEY_KeyUp (infoPtr, wParam, lParam);
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
return HOTKEY_KillFocus (infoPtr, (HWND)wParam);
|
||||
|
||||
case WM_LBUTTONDOWN:
|
||||
return HOTKEY_LButtonDown (infoPtr);
|
||||
|
||||
case WM_NCCREATE:
|
||||
return HOTKEY_NCCreate (hwnd, (LPCREATESTRUCTW)lParam);
|
||||
|
||||
case WM_PAINT:
|
||||
HOTKEY_Paint(infoPtr, (HDC)wParam);
|
||||
return 0;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
return HOTKEY_SetFocus (infoPtr, (HWND)wParam);
|
||||
|
||||
case WM_SETFONT:
|
||||
return HOTKEY_SetFont (infoPtr, (HFONT)wParam, LOWORD(lParam));
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
|
||||
ERR("unknown msg %04x wp=%08x lp=%08lx\n",
|
||||
uMsg, wParam, lParam);
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HOTKEY_Register (void)
|
||||
{
|
||||
WNDCLASSW wndClass;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(WNDCLASSW));
|
||||
wndClass.style = CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = HOTKEY_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(HOTKEY_INFO *);
|
||||
wndClass.hCursor = 0;
|
||||
wndClass.hbrBackground = 0;
|
||||
wndClass.lpszClassName = HOTKEY_CLASSW;
|
||||
|
||||
RegisterClassW (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HOTKEY_Unregister (void)
|
||||
{
|
||||
UnregisterClassW (HOTKEY_CLASSW, NULL);
|
||||
}
|
2884
reactos/lib/comctl32/imagelist.c
Normal file
2884
reactos/lib/comctl32/imagelist.c
Normal file
File diff suppressed because it is too large
Load diff
78
reactos/lib/comctl32/imagelist.h
Normal file
78
reactos/lib/comctl32/imagelist.h
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* ImageList definitions
|
||||
*
|
||||
* Copyright 1998 Eric Kohl
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_IMAGELIST_H
|
||||
#define __WINE_IMAGELIST_H
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
||||
#include "pshpack1.h"
|
||||
|
||||
/* the ones with offsets at the end are the same as in Windows */
|
||||
struct _IMAGELIST
|
||||
{
|
||||
DWORD magic; /* 00: 'SAMX' */
|
||||
INT cCurImage; /* 04: ImageCount */
|
||||
INT cMaxImage; /* 08: maximages */
|
||||
INT cGrow; /* 0c: cGrow */
|
||||
INT cx; /* 10: cx */
|
||||
INT cy; /* 14: cy */
|
||||
DWORD x4;
|
||||
UINT flags; /* 1c: flags */
|
||||
COLORREF clrFg; /* 20: foreground color */
|
||||
COLORREF clrBk; /* 24: backgournd color */
|
||||
|
||||
|
||||
HBITMAP hbmImage; /* 30: images Bitmap */
|
||||
HBITMAP hbmMask; /* 34: masks Bitmap */
|
||||
HDC hdcImage; /* 38: images MemDC */
|
||||
HDC hdcMask; /* 3C: masks MemDC */
|
||||
INT nOvlIdx[15]; /* 40: overlay images index */
|
||||
|
||||
/* not yet found out */
|
||||
HBRUSH hbrBlend25;
|
||||
HBRUSH hbrBlend50;
|
||||
INT cInitial;
|
||||
UINT uBitsPixel;
|
||||
};
|
||||
|
||||
#define IMAGELIST_MAGIC 0x53414D58
|
||||
|
||||
/* Header used by ImageList_Read() and ImageList_Write() */
|
||||
typedef struct _ILHEAD
|
||||
{
|
||||
USHORT usMagic;
|
||||
USHORT usVersion;
|
||||
WORD cCurImage;
|
||||
WORD cMaxImage;
|
||||
WORD cGrow;
|
||||
WORD cx;
|
||||
WORD cy;
|
||||
COLORREF bkcolor;
|
||||
WORD flags;
|
||||
SHORT ovls[4];
|
||||
} ILHEAD;
|
||||
|
||||
#include "poppack.h"
|
||||
#endif /* __WINE_IMAGELIST_H */
|
583
reactos/lib/comctl32/ipaddress.c
Normal file
583
reactos/lib/comctl32/ipaddress.c
Normal file
|
@ -0,0 +1,583 @@
|
|||
/*
|
||||
* IP Address control
|
||||
*
|
||||
* Copyright 2002 Dimitrie O. Paun
|
||||
* Copyright 1999 Chris Morgan<cmorgan@wpi.edu>
|
||||
* Copyright 1999 James Abbatiello<abbeyj@wpi.edu>
|
||||
* Copyright 1998, 1999 Eric Kohl
|
||||
* Copyright 1998 Alex Priem <alexp@sci.kun.nl>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTE
|
||||
*
|
||||
* This code was audited for completeness against the documented features
|
||||
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
||||
*
|
||||
* Unless otherwise noted, we believe this code to be complete, as per
|
||||
* the specification mentioned above.
|
||||
* If you discover missing features, or bugs, please note them below.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ipaddress);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HWND EditHwnd;
|
||||
INT LowerLimit;
|
||||
INT UpperLimit;
|
||||
WNDPROC OrigProc;
|
||||
} IPPART_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HWND Self;
|
||||
HWND Notify;
|
||||
IPPART_INFO Part[4];
|
||||
} IPADDRESS_INFO;
|
||||
|
||||
static const WCHAR IP_SUBCLASS_PROP[] =
|
||||
{ 'C', 'C', 'I', 'P', '3', '2', 'S', 'u', 'b', 'c', 'l', 'a', 's', 's', 'I', 'n', 'f', 'o', 0 };
|
||||
|
||||
#define POS_DEFAULT 0
|
||||
#define POS_LEFT 1
|
||||
#define POS_RIGHT 2
|
||||
#define POS_SELALL 3
|
||||
|
||||
static LRESULT CALLBACK
|
||||
IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
static LRESULT IPADDRESS_Notify (IPADDRESS_INFO *infoPtr, UINT command)
|
||||
{
|
||||
HWND hwnd = infoPtr->Self;
|
||||
|
||||
TRACE("(command=%x)\n", command);
|
||||
|
||||
return SendMessageW (infoPtr->Notify, WM_COMMAND,
|
||||
MAKEWPARAM (GetWindowLongPtrW (hwnd, GWLP_ID), command), (LPARAM)hwnd);
|
||||
}
|
||||
|
||||
static INT IPADDRESS_IPNotify (IPADDRESS_INFO *infoPtr, INT field, INT value)
|
||||
{
|
||||
NMIPADDRESS nmip;
|
||||
|
||||
TRACE("(field=%x, value=%d)\n", field, value);
|
||||
|
||||
nmip.hdr.hwndFrom = infoPtr->Self;
|
||||
nmip.hdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
|
||||
nmip.hdr.code = IPN_FIELDCHANGED;
|
||||
|
||||
nmip.iField = field;
|
||||
nmip.iValue = value;
|
||||
|
||||
SendMessageW (infoPtr->Notify, WM_NOTIFY,
|
||||
(WPARAM)nmip.hdr.idFrom, (LPARAM)&nmip);
|
||||
|
||||
TRACE("<-- %d\n", nmip.iValue);
|
||||
|
||||
return nmip.iValue;
|
||||
}
|
||||
|
||||
|
||||
static int IPADDRESS_GetPartIndex(IPADDRESS_INFO *infoPtr, HWND hwnd)
|
||||
{
|
||||
int i;
|
||||
|
||||
TRACE("(hwnd=%p)\n", hwnd);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
if (infoPtr->Part[i].EditHwnd == hwnd) return i;
|
||||
|
||||
ERR("We subclassed the wrong window! (hwnd=%p)\n", hwnd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT IPADDRESS_Draw (IPADDRESS_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
static const WCHAR dotW[] = { '.', 0 };
|
||||
RECT rect, rcPart;
|
||||
POINT pt;
|
||||
int i;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
GetClientRect (infoPtr->Self, &rect);
|
||||
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
GetWindowRect (infoPtr->Part[i].EditHwnd, &rcPart);
|
||||
pt.x = rcPart.right;
|
||||
ScreenToClient(infoPtr->Self, &pt);
|
||||
rect.left = pt.x;
|
||||
GetWindowRect (infoPtr->Part[i+1].EditHwnd, &rcPart);
|
||||
pt.x = rcPart.left;
|
||||
ScreenToClient(infoPtr->Self, &pt);
|
||||
rect.right = pt.x;
|
||||
DrawTextW(hdc, dotW, 1, &rect, DT_SINGLELINE | DT_CENTER | DT_BOTTOM);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT IPADDRESS_Create (HWND hwnd, LPCREATESTRUCTA lpCreate)
|
||||
{
|
||||
static const WCHAR EDIT[] = { 'E', 'd', 'i', 't', 0 };
|
||||
IPADDRESS_INFO *infoPtr;
|
||||
RECT rcClient, edit;
|
||||
int i, fieldsize;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
SetWindowLongW (hwnd, GWL_STYLE,
|
||||
GetWindowLongW(hwnd, GWL_STYLE) & ~WS_BORDER);
|
||||
|
||||
infoPtr = (IPADDRESS_INFO *)Alloc (sizeof(IPADDRESS_INFO));
|
||||
if (!infoPtr) return -1;
|
||||
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
|
||||
|
||||
GetClientRect (hwnd, &rcClient);
|
||||
|
||||
fieldsize = (rcClient.right - rcClient.left) / 4;
|
||||
|
||||
edit.top = rcClient.top + 2;
|
||||
edit.bottom = rcClient.bottom - 2;
|
||||
|
||||
infoPtr->Self = hwnd;
|
||||
infoPtr->Notify = lpCreate->hwndParent;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
IPPART_INFO* part = &infoPtr->Part[i];
|
||||
|
||||
part->LowerLimit = 0;
|
||||
part->UpperLimit = 255;
|
||||
edit.left = rcClient.left + i*fieldsize + 6;
|
||||
edit.right = rcClient.left + (i+1)*fieldsize - 2;
|
||||
part->EditHwnd =
|
||||
CreateWindowW (EDIT, NULL, WS_CHILD | WS_VISIBLE | ES_CENTER,
|
||||
edit.left, edit.top, edit.right - edit.left,
|
||||
edit.bottom - edit.top, hwnd, (HMENU) 1,
|
||||
(HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), NULL);
|
||||
SetPropW(part->EditHwnd, IP_SUBCLASS_PROP, hwnd);
|
||||
part->OrigProc = (WNDPROC)
|
||||
SetWindowLongPtrW (part->EditHwnd, GWLP_WNDPROC,
|
||||
(DWORD_PTR)IPADDRESS_SubclassProc);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT IPADDRESS_Destroy (IPADDRESS_INFO *infoPtr)
|
||||
{
|
||||
int i;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
IPPART_INFO* part = &infoPtr->Part[i];
|
||||
SetWindowLongPtrW (part->EditHwnd, GWLP_WNDPROC, (DWORD_PTR)part->OrigProc);
|
||||
}
|
||||
|
||||
SetWindowLongPtrW (infoPtr->Self, 0, 0);
|
||||
Free (infoPtr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static LRESULT IPADDRESS_Paint (IPADDRESS_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if (hdc) return IPADDRESS_Draw (infoPtr, hdc);
|
||||
|
||||
hdc = BeginPaint (infoPtr->Self, &ps);
|
||||
IPADDRESS_Draw (infoPtr, hdc);
|
||||
EndPaint (infoPtr->Self, &ps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static BOOL IPADDRESS_IsBlank (IPADDRESS_INFO *infoPtr)
|
||||
{
|
||||
int i;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
if (GetWindowTextLengthW (infoPtr->Part[i].EditHwnd)) return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static int IPADDRESS_GetAddress (IPADDRESS_INFO *infoPtr, LPDWORD ip_address)
|
||||
{
|
||||
WCHAR field[5];
|
||||
int i, invalid = 0;
|
||||
DWORD ip_addr = 0;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
ip_addr *= 256;
|
||||
if (GetWindowTextW (infoPtr->Part[i].EditHwnd, field, 4))
|
||||
ip_addr += atolW(field);
|
||||
else
|
||||
invalid++;
|
||||
}
|
||||
*ip_address = ip_addr;
|
||||
|
||||
return 4 - invalid;
|
||||
}
|
||||
|
||||
|
||||
static BOOL IPADDRESS_SetRange (IPADDRESS_INFO *infoPtr, int index, WORD range)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
if ( (index < 0) || (index > 3) ) return FALSE;
|
||||
|
||||
infoPtr->Part[index].LowerLimit = range & 0xFF;
|
||||
infoPtr->Part[index].UpperLimit = (range >> 8) & 0xFF;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void IPADDRESS_ClearAddress (IPADDRESS_INFO *infoPtr)
|
||||
{
|
||||
WCHAR nil[1] = { 0 };
|
||||
int i;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
SetWindowTextW (infoPtr->Part[i].EditHwnd, nil);
|
||||
}
|
||||
|
||||
|
||||
static LRESULT IPADDRESS_SetAddress (IPADDRESS_INFO *infoPtr, DWORD ip_address)
|
||||
{
|
||||
WCHAR buf[20];
|
||||
static const WCHAR fmt[] = { '%', 'd', 0 };
|
||||
int i;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
for (i = 3; i >= 0; i--) {
|
||||
IPPART_INFO* part = &infoPtr->Part[i];
|
||||
int value = ip_address & 0xff;
|
||||
if ( (value >= part->LowerLimit) && (value <= part->UpperLimit) ) {
|
||||
wsprintfW (buf, fmt, value);
|
||||
SetWindowTextW (part->EditHwnd, buf);
|
||||
IPADDRESS_Notify (infoPtr, EN_CHANGE);
|
||||
}
|
||||
ip_address >>= 8;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void IPADDRESS_SetFocusToField (IPADDRESS_INFO *infoPtr, INT index)
|
||||
{
|
||||
TRACE("(index=%d)\n", index);
|
||||
|
||||
if (index > 3) {
|
||||
for (index = 0; index < 4; index++)
|
||||
if (!GetWindowTextLengthW(infoPtr->Part[index].EditHwnd)) break;
|
||||
}
|
||||
if (index < 9 || index > 3) index = 0;
|
||||
|
||||
SetFocus (infoPtr->Part[index].EditHwnd);
|
||||
}
|
||||
|
||||
|
||||
static BOOL IPADDRESS_ConstrainField (IPADDRESS_INFO *infoPtr, int currentfield)
|
||||
{
|
||||
IPPART_INFO *part = &infoPtr->Part[currentfield];
|
||||
WCHAR field[10];
|
||||
static const WCHAR fmt[] = { '%', 'd', 0 };
|
||||
int curValue, newValue;
|
||||
|
||||
TRACE("(currentfield=%d)\n", currentfield);
|
||||
|
||||
if (currentfield < 0 || currentfield > 3) return FALSE;
|
||||
|
||||
if (!GetWindowTextW (part->EditHwnd, field, 4)) return FALSE;
|
||||
|
||||
curValue = atoiW(field);
|
||||
TRACE(" curValue=%d\n", curValue);
|
||||
|
||||
newValue = IPADDRESS_IPNotify(infoPtr, currentfield, curValue);
|
||||
TRACE(" newValue=%d\n", newValue);
|
||||
|
||||
if (newValue < part->LowerLimit) newValue = part->LowerLimit;
|
||||
if (newValue > part->UpperLimit) newValue = part->UpperLimit;
|
||||
|
||||
if (newValue == curValue) return FALSE;
|
||||
|
||||
wsprintfW (field, fmt, newValue);
|
||||
TRACE(" field='%s'\n", debugstr_w(field));
|
||||
return SetWindowTextW (part->EditHwnd, field);
|
||||
}
|
||||
|
||||
|
||||
static BOOL IPADDRESS_GotoNextField (IPADDRESS_INFO *infoPtr, int cur, int sel)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
if(cur >= -1 && cur < 4) {
|
||||
IPADDRESS_ConstrainField(infoPtr, cur);
|
||||
|
||||
if(cur < 3) {
|
||||
IPPART_INFO *next = &infoPtr->Part[cur + 1];
|
||||
int start = 0, end = 0;
|
||||
SetFocus (next->EditHwnd);
|
||||
if (sel != POS_DEFAULT) {
|
||||
if (sel == POS_RIGHT)
|
||||
start = end = GetWindowTextLengthW(next->EditHwnd);
|
||||
else if (sel == POS_SELALL)
|
||||
end = -1;
|
||||
SendMessageW(next->EditHwnd, EM_SETSEL, start, end);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* period: move and select the text in the next field to the right if
|
||||
* the current field is not empty(l!=0), we are not in the
|
||||
* left most position, and nothing is selected(startsel==endsel)
|
||||
*
|
||||
* spacebar: same behavior as period
|
||||
*
|
||||
* alpha characters: completely ignored
|
||||
*
|
||||
* digits: accepted when field text length < 2 ignored otherwise.
|
||||
* when 3 numbers have been entered into the field the value
|
||||
* of the field is checked, if the field value exceeds the
|
||||
* maximum value and is changed the field remains the current
|
||||
* field, otherwise focus moves to the field to the right
|
||||
*
|
||||
* tab: change focus from the current ipaddress control to the next
|
||||
* control in the tab order
|
||||
*
|
||||
* right arrow: move to the field on the right to the left most
|
||||
* position in that field if no text is selected,
|
||||
* we are in the right most position in the field,
|
||||
* we are not in the right most field
|
||||
*
|
||||
* left arrow: move to the field on the left to the right most
|
||||
* position in that field if no text is selected,
|
||||
* we are in the left most position in the current field
|
||||
* and we are not in the left most field
|
||||
*
|
||||
* backspace: delete the character to the left of the cursor position,
|
||||
* if none are present move to the field on the left if
|
||||
* we are not in the left most field and delete the right
|
||||
* most digit in that field while keeping the cursor
|
||||
* on the right side of the field
|
||||
*/
|
||||
LRESULT CALLBACK
|
||||
IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND Self = (HWND)GetPropW (hwnd, IP_SUBCLASS_PROP);
|
||||
IPADDRESS_INFO *infoPtr = (IPADDRESS_INFO *)GetWindowLongPtrW (Self, 0);
|
||||
CHAR c = (CHAR)wParam;
|
||||
INT index, len = 0, startsel, endsel;
|
||||
IPPART_INFO *part;
|
||||
|
||||
TRACE("(hwnd=%p msg=0x%x wparam=0x%x lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam);
|
||||
|
||||
if ( (index = IPADDRESS_GetPartIndex(infoPtr, hwnd)) < 0) return 0;
|
||||
part = &infoPtr->Part[index];
|
||||
|
||||
if (uMsg == WM_CHAR || uMsg == WM_KEYDOWN) {
|
||||
len = GetWindowTextLengthW (hwnd);
|
||||
SendMessageW(hwnd, EM_GETSEL, (WPARAM)&startsel, (LPARAM)&endsel);
|
||||
}
|
||||
switch (uMsg) {
|
||||
case WM_CHAR:
|
||||
if(isdigit(c)) {
|
||||
if(len == 2 && startsel==endsel && endsel==len) {
|
||||
/* process the digit press before we check the field */
|
||||
int return_val = CallWindowProcW (part->OrigProc, hwnd, uMsg, wParam, lParam);
|
||||
|
||||
/* if the field value was changed stay at the current field */
|
||||
if(!IPADDRESS_ConstrainField(infoPtr, index))
|
||||
IPADDRESS_GotoNextField (infoPtr, index, POS_DEFAULT);
|
||||
|
||||
return return_val;
|
||||
} else if (len == 3 && startsel==endsel && endsel==len)
|
||||
IPADDRESS_GotoNextField (infoPtr, index, POS_SELALL);
|
||||
else if (len < 3) break;
|
||||
} else if(c == '.' || c == ' ') {
|
||||
if(len && startsel==endsel && startsel != 0) {
|
||||
IPADDRESS_GotoNextField(infoPtr, index, POS_SELALL);
|
||||
}
|
||||
} else if (c == VK_BACK) break;
|
||||
return 0;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
switch(c) {
|
||||
case VK_RIGHT:
|
||||
if(startsel==endsel && startsel==len) {
|
||||
IPADDRESS_GotoNextField(infoPtr, index, POS_LEFT);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case VK_LEFT:
|
||||
if(startsel==0 && startsel==endsel && index > 0) {
|
||||
IPADDRESS_GotoNextField(infoPtr, index - 2, POS_RIGHT);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case VK_BACK:
|
||||
if(startsel==endsel && startsel==0 && index > 0) {
|
||||
IPPART_INFO *prev = &infoPtr->Part[index-1];
|
||||
WCHAR val[10];
|
||||
|
||||
if(GetWindowTextW(prev->EditHwnd, val, 5)) {
|
||||
val[lstrlenW(val) - 1] = 0;
|
||||
SetWindowTextW(prev->EditHwnd, val);
|
||||
}
|
||||
|
||||
IPADDRESS_GotoNextField(infoPtr, index - 2, POS_RIGHT);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WM_KILLFOCUS:
|
||||
if (IPADDRESS_GetPartIndex(infoPtr, (HWND)wParam) < 0)
|
||||
IPADDRESS_Notify(infoPtr, EN_KILLFOCUS);
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
if (IPADDRESS_GetPartIndex(infoPtr, (HWND)wParam) < 0)
|
||||
IPADDRESS_Notify(infoPtr, EN_SETFOCUS);
|
||||
break;
|
||||
}
|
||||
return CallWindowProcW (part->OrigProc, hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
static LRESULT WINAPI
|
||||
IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
IPADDRESS_INFO *infoPtr = (IPADDRESS_INFO *)GetWindowLongPtrW (hwnd, 0);
|
||||
|
||||
TRACE("(hwnd=%p msg=0x%x wparam=0x%x lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam);
|
||||
|
||||
if (!infoPtr && (uMsg != WM_CREATE))
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
return IPADDRESS_Create (hwnd, (LPCREATESTRUCTA)lParam);
|
||||
|
||||
case WM_DESTROY:
|
||||
return IPADDRESS_Destroy (infoPtr);
|
||||
|
||||
case WM_PAINT:
|
||||
return IPADDRESS_Paint (infoPtr, (HDC)wParam);
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(wParam >> 16) {
|
||||
case EN_CHANGE:
|
||||
IPADDRESS_Notify(infoPtr, EN_CHANGE);
|
||||
break;
|
||||
case EN_KILLFOCUS:
|
||||
IPADDRESS_ConstrainField(infoPtr, IPADDRESS_GetPartIndex(infoPtr, (HWND)lParam));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case IPM_CLEARADDRESS:
|
||||
IPADDRESS_ClearAddress (infoPtr);
|
||||
break;
|
||||
|
||||
case IPM_SETADDRESS:
|
||||
return IPADDRESS_SetAddress (infoPtr, (DWORD)lParam);
|
||||
|
||||
case IPM_GETADDRESS:
|
||||
return IPADDRESS_GetAddress (infoPtr, (LPDWORD)lParam);
|
||||
|
||||
case IPM_SETRANGE:
|
||||
return IPADDRESS_SetRange (infoPtr, (int)wParam, (WORD)lParam);
|
||||
|
||||
case IPM_SETFOCUS:
|
||||
IPADDRESS_SetFocusToField (infoPtr, (int)wParam);
|
||||
break;
|
||||
|
||||
case IPM_ISBLANK:
|
||||
return IPADDRESS_IsBlank (infoPtr);
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
|
||||
ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void IPADDRESS_Register (void)
|
||||
{
|
||||
WNDCLASSW wndClass;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(WNDCLASSW));
|
||||
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
|
||||
wndClass.lpfnWndProc = IPADDRESS_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(IPADDRESS_INFO *);
|
||||
wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_IBEAM);
|
||||
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||
wndClass.lpszClassName = WC_IPADDRESSW;
|
||||
|
||||
RegisterClassW (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
void IPADDRESS_Unregister (void)
|
||||
{
|
||||
UnregisterClassW (WC_IPADDRESSW, NULL);
|
||||
}
|
9552
reactos/lib/comctl32/listview.c
Normal file
9552
reactos/lib/comctl32/listview.c
Normal file
File diff suppressed because it is too large
Load diff
9
reactos/lib/comctl32/makefile
Normal file
9
reactos/lib/comctl32/makefile
Normal file
|
@ -0,0 +1,9 @@
|
|||
# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
TARGET_TYPE = winedll
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
2045
reactos/lib/comctl32/monthcal.c
Normal file
2045
reactos/lib/comctl32/monthcal.c
Normal file
File diff suppressed because it is too large
Load diff
135
reactos/lib/comctl32/nativefont.c
Normal file
135
reactos/lib/comctl32/nativefont.c
Normal file
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* Native Font control
|
||||
*
|
||||
* Copyright 1998, 1999 Eric Kohl
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTES
|
||||
* This is just a dummy control. An author is needed! Any volunteers?
|
||||
* I will only improve this control once in a while.
|
||||
* Eric <ekohl@abo.rhein-zeitung.de>
|
||||
*
|
||||
* TODO:
|
||||
* - All messages.
|
||||
* - All notifications.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(nativefont);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HWND hwndSelf; /* my own handle */
|
||||
} NATIVEFONT_INFO;
|
||||
|
||||
#define NATIVEFONT_GetInfoPtr(hwnd) ((NATIVEFONT_INFO *)GetWindowLongPtrW (hwnd, 0))
|
||||
|
||||
static LRESULT
|
||||
NATIVEFONT_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
NATIVEFONT_INFO *infoPtr;
|
||||
|
||||
/* allocate memory for info structure */
|
||||
infoPtr = (NATIVEFONT_INFO *)Alloc (sizeof(NATIVEFONT_INFO));
|
||||
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
|
||||
|
||||
/* initialize info structure */
|
||||
infoPtr->hwndSelf = hwnd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT
|
||||
NATIVEFONT_Destroy (NATIVEFONT_INFO *infoPtr)
|
||||
{
|
||||
/* free control info data */
|
||||
SetWindowLongPtrW( infoPtr->hwndSelf, 0, 0 );
|
||||
Free (infoPtr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT WINAPI
|
||||
NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
NATIVEFONT_INFO *infoPtr = NATIVEFONT_GetInfoPtr(hwnd);
|
||||
|
||||
TRACE("hwnd=%p msg=%04x wparam=%08x lparam=%08lx\n",
|
||||
hwnd, uMsg, wParam, lParam);
|
||||
|
||||
if (!infoPtr && (uMsg != WM_CREATE))
|
||||
return DefWindowProcW( hwnd, uMsg, wParam, lParam );
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_CREATE:
|
||||
return NATIVEFONT_Create (hwnd, wParam, lParam);
|
||||
|
||||
case WM_DESTROY:
|
||||
return NATIVEFONT_Destroy (infoPtr);
|
||||
|
||||
case WM_MOVE:
|
||||
case WM_SIZE:
|
||||
case WM_SHOWWINDOW:
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
case WM_SETFONT:
|
||||
case WM_GETDLGCODE:
|
||||
/* FIXME("message %04x seen but stubbed\n", uMsg); */
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
|
||||
default:
|
||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
|
||||
ERR("unknown msg %04x wp=%08x lp=%08lx\n",
|
||||
uMsg, wParam, lParam);
|
||||
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NATIVEFONT_Register (void)
|
||||
{
|
||||
WNDCLASSW wndClass;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(WNDCLASSW));
|
||||
wndClass.style = CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = NATIVEFONT_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof(NATIVEFONT_INFO *);
|
||||
wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
||||
wndClass.lpszClassName = WC_NATIVEFONTCTLW;
|
||||
|
||||
RegisterClassW (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
NATIVEFONT_Unregister (void)
|
||||
{
|
||||
UnregisterClassW (WC_NATIVEFONTCTLW, NULL);
|
||||
}
|
1398
reactos/lib/comctl32/pager.c
Normal file
1398
reactos/lib/comctl32/pager.c
Normal file
File diff suppressed because it is too large
Load diff
681
reactos/lib/comctl32/progress.c
Normal file
681
reactos/lib/comctl32/progress.c
Normal file
|
@ -0,0 +1,681 @@
|
|||
/*
|
||||
* Progress control
|
||||
*
|
||||
* Copyright 1997, 2002 Dimitrie O. Paun
|
||||
* Copyright 1998, 1999 Eric Kohl
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* NOTE
|
||||
*
|
||||
* This code was audited for completeness against the documented features
|
||||
* of Comctl32.dll version 6.0 on Sep. 9, 2002, by Dimitrie O. Paun.
|
||||
*
|
||||
* Unless otherwise noted, we believe this code to be complete, as per
|
||||
* the specification mentioned above.
|
||||
* If you discover missing features, or bugs, please note them below.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "comctl32.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(progress);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HWND Self; /* The window handle for this control */
|
||||
INT CurVal; /* Current progress value */
|
||||
INT MinVal; /* Minimum progress value */
|
||||
INT MaxVal; /* Maximum progress value */
|
||||
INT Step; /* Step to use on PMB_STEPIT */
|
||||
INT MarqueePos; /* Marquee animation position */
|
||||
BOOL Marquee; /* Whether the marquee animation is enabled */
|
||||
COLORREF ColorBar; /* Bar color */
|
||||
COLORREF ColorBk; /* Background color */
|
||||
HFONT Font; /* Handle to font (not unused) */
|
||||
} PROGRESS_INFO;
|
||||
|
||||
/* Control configuration constants */
|
||||
|
||||
#define LED_GAP 2
|
||||
#define MARQUEE_LEDS 5
|
||||
#define ID_MARQUEE_TIMER 1
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_Invalidate
|
||||
*
|
||||
* Invalide the range between old and new pos.
|
||||
*/
|
||||
static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new )
|
||||
{
|
||||
LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE);
|
||||
RECT rect;
|
||||
int oldPos, newPos, ledWidth;
|
||||
|
||||
GetClientRect (infoPtr->Self, &rect);
|
||||
InflateRect(&rect, -1, -1);
|
||||
|
||||
if (style & PBS_VERTICAL)
|
||||
{
|
||||
oldPos = rect.bottom - MulDiv (old - infoPtr->MinVal, rect.bottom - rect.top,
|
||||
infoPtr->MaxVal - infoPtr->MinVal);
|
||||
newPos = rect.bottom - MulDiv (new - infoPtr->MinVal, rect.bottom - rect.top,
|
||||
infoPtr->MaxVal - infoPtr->MinVal);
|
||||
ledWidth = MulDiv (rect.right - rect.left, 2, 3);
|
||||
rect.top = min( oldPos, newPos );
|
||||
rect.bottom = max( oldPos, newPos );
|
||||
if (!(style & PBS_SMOOTH)) rect.top -= ledWidth;
|
||||
InvalidateRect( infoPtr->Self, &rect, oldPos < newPos );
|
||||
}
|
||||
else
|
||||
{
|
||||
oldPos = rect.left + MulDiv (old - infoPtr->MinVal, rect.right - rect.left,
|
||||
infoPtr->MaxVal - infoPtr->MinVal);
|
||||
newPos = rect.left + MulDiv (new - infoPtr->MinVal, rect.right - rect.left,
|
||||
infoPtr->MaxVal - infoPtr->MinVal);
|
||||
ledWidth = MulDiv (rect.bottom - rect.top, 2, 3);
|
||||
rect.left = min( oldPos, newPos );
|
||||
rect.right = max( oldPos, newPos );
|
||||
if (!(style & PBS_SMOOTH)) rect.right += ledWidth;
|
||||
InvalidateRect( infoPtr->Self, &rect, oldPos > newPos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_Draw
|
||||
* Draws the progress bar.
|
||||
*/
|
||||
static LRESULT PROGRESS_Draw (PROGRESS_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
HBRUSH hbrBar, hbrBk;
|
||||
int rightBar, rightMost, ledWidth;
|
||||
RECT rect;
|
||||
DWORD dwStyle;
|
||||
|
||||
TRACE("(infoPtr=%p, hdc=%p)\n", infoPtr, hdc);
|
||||
|
||||
/* get the required bar brush */
|
||||
if (infoPtr->ColorBar == CLR_DEFAULT)
|
||||
hbrBar = GetSysColorBrush(COLOR_HIGHLIGHT);
|
||||
else
|
||||
hbrBar = CreateSolidBrush (infoPtr->ColorBar);
|
||||
|
||||
if (infoPtr->ColorBk == CLR_DEFAULT)
|
||||
hbrBk = GetSysColorBrush(COLOR_3DFACE);
|
||||
else
|
||||
hbrBk = CreateSolidBrush(infoPtr->ColorBk);
|
||||
|
||||
/* get client rectangle */
|
||||
GetClientRect (infoPtr->Self, &rect);
|
||||
FrameRect( hdc, &rect, hbrBk );
|
||||
InflateRect(&rect, -1, -1);
|
||||
|
||||
/* get the window style */
|
||||
dwStyle = GetWindowLongW (infoPtr->Self, GWL_STYLE);
|
||||
|
||||
/* compute extent of progress bar */
|
||||
if (dwStyle & PBS_VERTICAL) {
|
||||
rightBar = rect.bottom -
|
||||
MulDiv (infoPtr->CurVal - infoPtr->MinVal,
|
||||
rect.bottom - rect.top,
|
||||
infoPtr->MaxVal - infoPtr->MinVal);
|
||||
ledWidth = MulDiv (rect.right - rect.left, 2, 3);
|
||||
rightMost = rect.top;
|
||||
} else {
|
||||
rightBar = rect.left +
|
||||
MulDiv (infoPtr->CurVal - infoPtr->MinVal,
|
||||
rect.right - rect.left,
|
||||
infoPtr->MaxVal - infoPtr->MinVal);
|
||||
ledWidth = MulDiv (rect.bottom - rect.top, 2, 3);
|
||||
rightMost = rect.right;
|
||||
}
|
||||
|
||||
/* now draw the bar */
|
||||
if (dwStyle & PBS_SMOOTH)
|
||||
{
|
||||
if (dwStyle & PBS_VERTICAL)
|
||||
{
|
||||
if (dwStyle & PBS_MARQUEE)
|
||||
{
|
||||
INT old_top, old_bottom, ledMStart, leds;
|
||||
old_top = rect.top;
|
||||
old_bottom = rect.bottom;
|
||||
|
||||
leds = rect.bottom - rect.top;
|
||||
ledMStart = (infoPtr->MarqueePos + MARQUEE_LEDS) - leds;
|
||||
|
||||
if(ledMStart > 0)
|
||||
{
|
||||
rect.top = max(rect.bottom - ledMStart, old_top);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.bottom = rect.top;
|
||||
}
|
||||
if(infoPtr->MarqueePos > 0)
|
||||
{
|
||||
rect.top = max(old_bottom - infoPtr->MarqueePos, old_top);
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.bottom = rect.top;
|
||||
}
|
||||
if(rect.top >= old_top)
|
||||
{
|
||||
rect.top = max(rect.bottom - MARQUEE_LEDS, old_top);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.bottom = rect.top;
|
||||
}
|
||||
if(rect.top >= old_top)
|
||||
{
|
||||
rect.top = old_top;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT old_top = rect.top;
|
||||
rect.top = rightBar;
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.bottom = rect.top;
|
||||
rect.top = old_top;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dwStyle & PBS_MARQUEE)
|
||||
{
|
||||
INT old_left, old_right, ledMStart, leds;
|
||||
old_left = rect.left;
|
||||
old_right = rect.right;
|
||||
|
||||
leds = rect.right - rect.left;
|
||||
ledMStart = (infoPtr->MarqueePos + MARQUEE_LEDS) - leds;
|
||||
rect.right = rect.left;
|
||||
|
||||
if(ledMStart > 0)
|
||||
{
|
||||
rect.right = min(rect.left + ledMStart, old_right);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.left = rect.right;
|
||||
}
|
||||
if(infoPtr->MarqueePos > 0)
|
||||
{
|
||||
rect.right = min(old_left + infoPtr->MarqueePos, old_right);
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.left = rect.right;
|
||||
}
|
||||
if(rect.right < old_right)
|
||||
{
|
||||
rect.right = min(rect.left + MARQUEE_LEDS, old_right);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.left = rect.right;
|
||||
}
|
||||
if(rect.right < old_right)
|
||||
{
|
||||
rect.right = old_right;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
INT old_right = rect.right;
|
||||
rect.right = rightBar;
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.left = rect.right;
|
||||
rect.right = old_right;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (dwStyle & PBS_VERTICAL) {
|
||||
if (dwStyle & PBS_MARQUEE)
|
||||
{
|
||||
INT i, old_top, old_bottom, ledMStart, leds;
|
||||
old_top = rect.top;
|
||||
old_bottom = rect.bottom;
|
||||
|
||||
leds = ((rect.bottom - rect.top) + (ledWidth + LED_GAP) - 1) / (ledWidth + LED_GAP);
|
||||
ledMStart = (infoPtr->MarqueePos + MARQUEE_LEDS) - leds;
|
||||
|
||||
while(ledMStart > 0)
|
||||
{
|
||||
rect.top = max(rect.bottom - ledWidth, old_top);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.bottom = rect.top;
|
||||
rect.top -= LED_GAP;
|
||||
if (rect.top <= old_top) break;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.bottom = rect.top;
|
||||
ledMStart--;
|
||||
}
|
||||
if(infoPtr->MarqueePos > 0)
|
||||
{
|
||||
rect.top = max(old_bottom - (infoPtr->MarqueePos * (ledWidth + LED_GAP)), old_top);
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.bottom = rect.top;
|
||||
}
|
||||
for(i = 0; i < MARQUEE_LEDS && rect.top >= old_top; i++)
|
||||
{
|
||||
rect.top = max(rect.bottom - ledWidth, old_top);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.bottom = rect.top;
|
||||
rect.top -= LED_GAP;
|
||||
if (rect.top <= old_top) break;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.bottom = rect.top;
|
||||
}
|
||||
if(rect.top >= old_top)
|
||||
{
|
||||
rect.top = old_top;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while(rect.bottom > rightBar) {
|
||||
rect.top = rect.bottom - ledWidth;
|
||||
if (rect.top < rightMost)
|
||||
rect.top = rightMost;
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.bottom = rect.top;
|
||||
rect.top -= LED_GAP;
|
||||
if (rect.top <= rightBar) break;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.bottom = rect.top;
|
||||
}
|
||||
}
|
||||
rect.top = rightMost;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
} else {
|
||||
if (dwStyle & PBS_MARQUEE)
|
||||
{
|
||||
INT i, old_right, old_left, ledMStart, leds;
|
||||
old_left = rect.left;
|
||||
old_right = rect.right;
|
||||
|
||||
leds = ((rect.right - rect.left) + ledWidth - 1) / (ledWidth + LED_GAP);
|
||||
ledMStart = (infoPtr->MarqueePos + MARQUEE_LEDS) - leds;
|
||||
rect.right = rect.left;
|
||||
|
||||
while(ledMStart > 0)
|
||||
{
|
||||
rect.right = min(rect.left + ledWidth, old_right);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.left = rect.right;
|
||||
rect.right += LED_GAP;
|
||||
if (rect.right > old_right) break;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.left = rect.right;
|
||||
ledMStart--;
|
||||
}
|
||||
if(infoPtr->MarqueePos > 0)
|
||||
{
|
||||
rect.right = min(old_left + (infoPtr->MarqueePos * (ledWidth + LED_GAP)), old_right);
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.left = rect.right;
|
||||
}
|
||||
for(i = 0; i < MARQUEE_LEDS && rect.right < old_right; i++)
|
||||
{
|
||||
rect.right = min(rect.left + ledWidth, old_right);
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.left = rect.right;
|
||||
rect.right += LED_GAP;
|
||||
if (rect.right > old_right) break;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.left = rect.right;
|
||||
}
|
||||
if(rect.right < old_right)
|
||||
{
|
||||
rect.right = old_right;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while(rect.left < rightBar) {
|
||||
rect.right = rect.left + ledWidth;
|
||||
if (rect.right > rightMost)
|
||||
rect.right = rightMost;
|
||||
FillRect(hdc, &rect, hbrBar);
|
||||
rect.left = rect.right;
|
||||
rect.right += LED_GAP;
|
||||
if (rect.right >= rightBar) break;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
rect.left = rect.right;
|
||||
}
|
||||
rect.right = rightMost;
|
||||
FillRect(hdc, &rect, hbrBk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* delete bar brush */
|
||||
if (infoPtr->ColorBar != CLR_DEFAULT) DeleteObject (hbrBar);
|
||||
if (infoPtr->ColorBk != CLR_DEFAULT) DeleteObject (hbrBk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_Paint
|
||||
* Draw the progress bar. The background need not be erased.
|
||||
* If dc!=0, it draws on it
|
||||
*/
|
||||
static LRESULT PROGRESS_Paint (PROGRESS_INFO *infoPtr, HDC hdc)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
if (hdc) return PROGRESS_Draw (infoPtr, hdc);
|
||||
hdc = BeginPaint (infoPtr->Self, &ps);
|
||||
PROGRESS_Draw (infoPtr, hdc);
|
||||
EndPaint (infoPtr->Self, &ps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_Timer
|
||||
* Handle the marquee timer messages
|
||||
*/
|
||||
static LRESULT PROGRESS_Timer (PROGRESS_INFO *infoPtr, INT idTimer)
|
||||
{
|
||||
if(idTimer == ID_MARQUEE_TIMER)
|
||||
{
|
||||
LONG style = GetWindowLongW (infoPtr->Self, GWL_STYLE);
|
||||
RECT rect;
|
||||
int ledWidth, leds;
|
||||
|
||||
GetClientRect (infoPtr->Self, &rect);
|
||||
InflateRect(&rect, -1, -1);
|
||||
|
||||
if(!(style & PBS_SMOOTH))
|
||||
{
|
||||
int width, height;
|
||||
|
||||
if(style & PBS_VERTICAL)
|
||||
{
|
||||
width = rect.bottom - rect.top;
|
||||
height = rect.right - rect.left;
|
||||
}
|
||||
else
|
||||
{
|
||||
height = rect.bottom - rect.top;
|
||||
width = rect.right - rect.left;
|
||||
}
|
||||
ledWidth = MulDiv (height, 2, 3);
|
||||
leds = (width + ledWidth - 1) / (ledWidth + LED_GAP);
|
||||
}
|
||||
else
|
||||
{
|
||||
ledWidth = 1;
|
||||
if(style & PBS_VERTICAL)
|
||||
{
|
||||
leds = rect.bottom - rect.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
leds = rect.right - rect.left;
|
||||
}
|
||||
}
|
||||
|
||||
/* increment the marquee progress */
|
||||
if(++infoPtr->MarqueePos >= leds)
|
||||
{
|
||||
infoPtr->MarqueePos = 0;
|
||||
}
|
||||
|
||||
InvalidateRect(infoPtr->Self, &rect, TRUE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_CoercePos
|
||||
* Makes sure the current position (CurVal) is within bounds.
|
||||
*/
|
||||
static void PROGRESS_CoercePos(PROGRESS_INFO *infoPtr)
|
||||
{
|
||||
if(infoPtr->CurVal < infoPtr->MinVal)
|
||||
infoPtr->CurVal = infoPtr->MinVal;
|
||||
if(infoPtr->CurVal > infoPtr->MaxVal)
|
||||
infoPtr->CurVal = infoPtr->MaxVal;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_SetFont
|
||||
* Set new Font for progress bar
|
||||
*/
|
||||
static HFONT PROGRESS_SetFont (PROGRESS_INFO *infoPtr, HFONT hFont, BOOL bRedraw)
|
||||
{
|
||||
HFONT hOldFont = infoPtr->Font;
|
||||
infoPtr->Font = hFont;
|
||||
/* Since infoPtr->Font is not used, there is no need for repaint */
|
||||
return hOldFont;
|
||||
}
|
||||
|
||||
static DWORD PROGRESS_SetRange (PROGRESS_INFO *infoPtr, int low, int high)
|
||||
{
|
||||
DWORD res = MAKELONG(LOWORD(infoPtr->MinVal), LOWORD(infoPtr->MaxVal));
|
||||
|
||||
/* if nothing changes, simply return */
|
||||
if(infoPtr->MinVal == low && infoPtr->MaxVal == high) return res;
|
||||
|
||||
infoPtr->MinVal = low;
|
||||
infoPtr->MaxVal = high;
|
||||
PROGRESS_CoercePos(infoPtr);
|
||||
InvalidateRect(infoPtr->Self, NULL, TRUE);
|
||||
return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ProgressWindowProc
|
||||
*/
|
||||
static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PROGRESS_INFO *infoPtr;
|
||||
|
||||
TRACE("hwnd=%p msg=%04x wparam=%x lParam=%lx\n", hwnd, message, wParam, lParam);
|
||||
|
||||
infoPtr = (PROGRESS_INFO *)GetWindowLongPtrW(hwnd, 0);
|
||||
|
||||
if (!infoPtr && message != WM_CREATE)
|
||||
return DefWindowProcW( hwnd, message, wParam, lParam );
|
||||
|
||||
switch(message) {
|
||||
case WM_CREATE:
|
||||
{
|
||||
DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE);
|
||||
dwExStyle &= ~(WS_EX_CLIENTEDGE | WS_EX_WINDOWEDGE);
|
||||
dwExStyle |= WS_EX_STATICEDGE;
|
||||
SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle);
|
||||
/* Force recalculation of a non-client area */
|
||||
SetWindowPos(hwnd, 0, 0, 0, 0, 0,
|
||||
SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
|
||||
/* allocate memory for info struct */
|
||||
infoPtr = (PROGRESS_INFO *)Alloc (sizeof(PROGRESS_INFO));
|
||||
if (!infoPtr) return -1;
|
||||
SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
|
||||
|
||||
/* initialize the info struct */
|
||||
infoPtr->Self = hwnd;
|
||||
infoPtr->MinVal = 0;
|
||||
infoPtr->MaxVal = 100;
|
||||
infoPtr->CurVal = 0;
|
||||
infoPtr->Step = 10;
|
||||
infoPtr->MarqueePos = 0;
|
||||
infoPtr->Marquee = FALSE;
|
||||
infoPtr->ColorBar = CLR_DEFAULT;
|
||||
infoPtr->ColorBk = CLR_DEFAULT;
|
||||
infoPtr->Font = 0;
|
||||
TRACE("Progress Ctrl creation, hwnd=%p\n", hwnd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
case WM_DESTROY:
|
||||
TRACE("Progress Ctrl destruction, hwnd=%p\n", hwnd);
|
||||
Free (infoPtr);
|
||||
SetWindowLongPtrW(hwnd, 0, 0);
|
||||
return 0;
|
||||
|
||||
case WM_GETFONT:
|
||||
return (LRESULT)infoPtr->Font;
|
||||
|
||||
case WM_SETFONT:
|
||||
return (LRESULT)PROGRESS_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
|
||||
|
||||
case WM_PAINT:
|
||||
return PROGRESS_Paint (infoPtr, (HDC)wParam);
|
||||
|
||||
case WM_TIMER:
|
||||
return PROGRESS_Timer (infoPtr, (INT)wParam);
|
||||
|
||||
case PBM_DELTAPOS:
|
||||
{
|
||||
INT oldVal;
|
||||
oldVal = infoPtr->CurVal;
|
||||
if(wParam != 0) {
|
||||
infoPtr->CurVal += (INT)wParam;
|
||||
PROGRESS_CoercePos (infoPtr);
|
||||
TRACE("PBM_DELTAPOS: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
|
||||
PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
|
||||
}
|
||||
return oldVal;
|
||||
}
|
||||
|
||||
case PBM_SETPOS:
|
||||
{
|
||||
UINT oldVal;
|
||||
oldVal = infoPtr->CurVal;
|
||||
if(oldVal != wParam) {
|
||||
infoPtr->CurVal = (INT)wParam;
|
||||
PROGRESS_CoercePos(infoPtr);
|
||||
TRACE("PBM_SETPOS: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
|
||||
PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
|
||||
}
|
||||
return oldVal;
|
||||
}
|
||||
|
||||
case PBM_SETRANGE:
|
||||
return PROGRESS_SetRange (infoPtr, (int)LOWORD(lParam), (int)HIWORD(lParam));
|
||||
|
||||
case PBM_SETSTEP:
|
||||
{
|
||||
INT oldStep;
|
||||
oldStep = infoPtr->Step;
|
||||
infoPtr->Step = (INT)wParam;
|
||||
return oldStep;
|
||||
}
|
||||
|
||||
case PBM_STEPIT:
|
||||
{
|
||||
INT oldVal;
|
||||
oldVal = infoPtr->CurVal;
|
||||
infoPtr->CurVal += infoPtr->Step;
|
||||
if(infoPtr->CurVal > infoPtr->MaxVal)
|
||||
infoPtr->CurVal = infoPtr->MinVal;
|
||||
if(oldVal != infoPtr->CurVal)
|
||||
{
|
||||
TRACE("PBM_STEPIT: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
|
||||
PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
|
||||
}
|
||||
return oldVal;
|
||||
}
|
||||
|
||||
case PBM_SETRANGE32:
|
||||
return PROGRESS_SetRange (infoPtr, (int)wParam, (int)lParam);
|
||||
|
||||
case PBM_GETRANGE:
|
||||
if (lParam) {
|
||||
((PPBRANGE)lParam)->iLow = infoPtr->MinVal;
|
||||
((PPBRANGE)lParam)->iHigh = infoPtr->MaxVal;
|
||||
}
|
||||
return wParam ? infoPtr->MinVal : infoPtr->MaxVal;
|
||||
|
||||
case PBM_GETPOS:
|
||||
return infoPtr->CurVal;
|
||||
|
||||
case PBM_SETBARCOLOR:
|
||||
infoPtr->ColorBar = (COLORREF)lParam;
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
|
||||
case PBM_SETBKCOLOR:
|
||||
infoPtr->ColorBk = (COLORREF)lParam;
|
||||
InvalidateRect(hwnd, NULL, TRUE);
|
||||
return 0;
|
||||
|
||||
case PBM_SETMARQUEE:
|
||||
if(wParam != 0)
|
||||
{
|
||||
infoPtr->Marquee = TRUE;
|
||||
SetTimer(infoPtr->Self, ID_MARQUEE_TIMER, (UINT)lParam, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
infoPtr->Marquee = FALSE;
|
||||
KillTimer(infoPtr->Self, ID_MARQUEE_TIMER);
|
||||
}
|
||||
return infoPtr->Marquee;
|
||||
|
||||
default:
|
||||
if ((message >= WM_USER) && (message < WM_APP))
|
||||
ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam );
|
||||
return DefWindowProcW( hwnd, message, wParam, lParam );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_Register [Internal]
|
||||
*
|
||||
* Registers the progress bar window class.
|
||||
*/
|
||||
void PROGRESS_Register (void)
|
||||
{
|
||||
WNDCLASSW wndClass;
|
||||
|
||||
ZeroMemory (&wndClass, sizeof(wndClass));
|
||||
wndClass.style = CS_GLOBALCLASS | CS_VREDRAW | CS_HREDRAW;
|
||||
wndClass.lpfnWndProc = (WNDPROC)ProgressWindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
wndClass.cbWndExtra = sizeof (PROGRESS_INFO *);
|
||||
wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
|
||||
wndClass.lpszClassName = PROGRESS_CLASSW;
|
||||
|
||||
RegisterClassW (&wndClass);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* PROGRESS_Unregister [Internal]
|
||||
*
|
||||
* Unregisters the progress bar window class.
|
||||
*/
|
||||
void PROGRESS_Unregister (void)
|
||||
{
|
||||
UnregisterClassW (PROGRESS_CLASSW, NULL);
|
||||
}
|
3695
reactos/lib/comctl32/propsheet.c
Normal file
3695
reactos/lib/comctl32/propsheet.c
Normal file
File diff suppressed because it is too large
Load diff
4732
reactos/lib/comctl32/rebar.c
Normal file
4732
reactos/lib/comctl32/rebar.c
Normal file
File diff suppressed because it is too large
Load diff
1210
reactos/lib/comctl32/rsrc.rc
Normal file
1210
reactos/lib/comctl32/rsrc.rc
Normal file
File diff suppressed because it is too large
Load diff
136
reactos/lib/comctl32/smoothscroll.c
Normal file
136
reactos/lib/comctl32/smoothscroll.c
Normal file
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Undocumented SmoothScrollWindow function from COMCTL32.DLL
|
||||
*
|
||||
* Copyright 2000 Marcus Meissner <marcus@jet.franken.de>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* TODO
|
||||
* - actually add smooth scrolling
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winerror.h"
|
||||
#include "wingdi.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
#include "commctrl.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
static DWORD smoothscroll = 2;
|
||||
|
||||
typedef BOOL (CALLBACK *SCROLLWINDOWEXPROC)(HWND,INT,INT,LPRECT,LPRECT,HRGN,LPRECT,DWORD);
|
||||
typedef struct tagSMOOTHSCROLLSTRUCT {
|
||||
DWORD dwSize;
|
||||
DWORD x2;
|
||||
HWND hwnd;
|
||||
DWORD dx;
|
||||
|
||||
DWORD dy;
|
||||
LPRECT lpscrollrect;
|
||||
LPRECT lpcliprect;
|
||||
HRGN hrgnupdate;
|
||||
|
||||
LPRECT lpupdaterect;
|
||||
DWORD flags;
|
||||
DWORD stepinterval;
|
||||
DWORD dx_step;
|
||||
|
||||
DWORD dy_step;
|
||||
SCROLLWINDOWEXPROC scrollfun; /* same parameters as ScrollWindowEx */
|
||||
} SMOOTHSCROLLSTRUCT;
|
||||
|
||||
/**************************************************************************
|
||||
* SmoothScrollWindow [COMCTL32.382]
|
||||
*
|
||||
* Lots of magic for smooth scrolling windows.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: TRUE
|
||||
* Failure: FALSE
|
||||
*
|
||||
* BUGS
|
||||
* Currently only scrolls ONCE. The comctl32 implementation uses GetTickCount
|
||||
* and what else to do smooth scrolling.
|
||||
*/
|
||||
BOOL WINAPI SmoothScrollWindow( SMOOTHSCROLLSTRUCT *smooth ) {
|
||||
LPRECT lpupdaterect = smooth->lpupdaterect;
|
||||
HRGN hrgnupdate = smooth->hrgnupdate;
|
||||
RECT tmprect;
|
||||
BOOL ret = TRUE;
|
||||
DWORD flags = smooth->flags;
|
||||
|
||||
if (smooth->dwSize!=sizeof(SMOOTHSCROLLSTRUCT))
|
||||
return FALSE;
|
||||
|
||||
if (!lpupdaterect)
|
||||
lpupdaterect = &tmprect;
|
||||
SetRectEmpty(lpupdaterect);
|
||||
|
||||
if (!(flags & 0x40000)) { /* no override, use system wide defaults */
|
||||
if (smoothscroll == 2) {
|
||||
HKEY hkey;
|
||||
|
||||
smoothscroll = 0;
|
||||
if (!RegOpenKeyA(HKEY_CURRENT_USER,"Control Panel\\Desktop",&hkey)) {
|
||||
DWORD len = 4;
|
||||
|
||||
RegQueryValueExA(hkey,"SmoothScroll",0,0,(LPBYTE)&smoothscroll,&len);
|
||||
RegCloseKey(hkey);
|
||||
}
|
||||
}
|
||||
if (!smoothscroll)
|
||||
flags |= 0x20000;
|
||||
}
|
||||
|
||||
if (flags & 0x20000) { /* are we doing jump scrolling? */
|
||||
if ((smooth->x2 & 1) && smooth->scrollfun)
|
||||
return smooth->scrollfun(
|
||||
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
||||
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
||||
flags & 0xffff
|
||||
);
|
||||
else
|
||||
return ScrollWindowEx(
|
||||
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
||||
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
||||
flags & 0xffff
|
||||
);
|
||||
}
|
||||
|
||||
FIXME("(hwnd=%p,flags=%lx,x2=%lx): should smooth scroll here.\n",
|
||||
smooth->hwnd,flags,smooth->x2
|
||||
);
|
||||
/* FIXME: do timer based smooth scrolling */
|
||||
if ((smooth->x2 & 1) && smooth->scrollfun)
|
||||
return smooth->scrollfun(
|
||||
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
||||
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
||||
flags & 0xffff
|
||||
);
|
||||
else
|
||||
return ScrollWindowEx(
|
||||
smooth->hwnd,smooth->dx,smooth->dy,smooth->lpscrollrect,
|
||||
smooth->lpcliprect,hrgnupdate,lpupdaterect,
|
||||
flags & 0xffff
|
||||
);
|
||||
return ret;
|
||||
}
|
1293
reactos/lib/comctl32/status.c
Normal file
1293
reactos/lib/comctl32/status.c
Normal file
File diff suppressed because it is too large
Load diff
851
reactos/lib/comctl32/string.c
Normal file
851
reactos/lib/comctl32/string.c
Normal file
|
@ -0,0 +1,851 @@
|
|||
/*
|
||||
* String manipulation functions
|
||||
*
|
||||
* Copyright 1998 Eric Kohl
|
||||
* 1998 Juergen Schmied <j.schmied@metronet.de>
|
||||
* 2000 Eric Kohl for CodeWeavers
|
||||
* Copyright 2002 Jon Griffiths
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h> /* atoi */
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_ChrCmpHelperA
|
||||
*
|
||||
* Internal helper for ChrCmpA/COMCTL32_ChrCmpIA.
|
||||
*
|
||||
* NOTES
|
||||
* Both this function and its Unicode counterpart are very inneficient. To
|
||||
* fix this, CompareString must be completely implemented and optimised
|
||||
* first. Then the core character test can be taken out of that function and
|
||||
* placed here, so that it need never be called at all. Until then, do not
|
||||
* attempt to optimise this code unless you are willing to test that it
|
||||
* still performs correctly.
|
||||
*/
|
||||
static BOOL COMCTL32_ChrCmpHelperA(WORD ch1, WORD ch2, DWORD dwFlags)
|
||||
{
|
||||
char str1[3], str2[3];
|
||||
|
||||
str1[0] = LOBYTE(ch1);
|
||||
if (IsDBCSLeadByte(str1[0]))
|
||||
{
|
||||
str1[1] = HIBYTE(ch1);
|
||||
str1[2] = '\0';
|
||||
}
|
||||
else
|
||||
str1[1] = '\0';
|
||||
|
||||
str2[0] = LOBYTE(ch2);
|
||||
if (IsDBCSLeadByte(str2[0]))
|
||||
{
|
||||
str2[1] = HIBYTE(ch2);
|
||||
str2[2] = '\0';
|
||||
}
|
||||
else
|
||||
str2[1] = '\0';
|
||||
|
||||
return CompareStringA(GetThreadLocale(), dwFlags, str1, -1, str2, -1) - 2;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_ChrCmpHelperW
|
||||
*
|
||||
* Internal helper for COMCTL32_ChrCmpW/ChrCmpIW.
|
||||
*/
|
||||
static BOOL COMCTL32_ChrCmpHelperW(WCHAR ch1, WCHAR ch2, DWORD dwFlags)
|
||||
{
|
||||
WCHAR str1[2], str2[2];
|
||||
|
||||
str1[0] = ch1;
|
||||
str1[1] = '\0';
|
||||
str2[0] = ch2;
|
||||
str2[1] = '\0';
|
||||
return CompareStringW(GetThreadLocale(), dwFlags, str1, 2, str2, 2) - 2;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_ChrCmpA (internal)
|
||||
*
|
||||
* Internal helper function.
|
||||
*/
|
||||
static BOOL COMCTL32_ChrCmpA(WORD ch1, WORD ch2)
|
||||
{
|
||||
return COMCTL32_ChrCmpHelperA(ch1, ch2, 0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_ChrCmpIA (internal)
|
||||
*
|
||||
* Compare two characters, ignoring case.
|
||||
*
|
||||
* PARAMS
|
||||
* ch1 [I] First character to compare
|
||||
* ch2 [I] Second character to compare
|
||||
*
|
||||
* RETURNS
|
||||
* FALSE, if the characters are equal.
|
||||
* Non-zero otherwise.
|
||||
*/
|
||||
static BOOL COMCTL32_ChrCmpIA(WORD ch1, WORD ch2)
|
||||
{
|
||||
TRACE("(%d,%d)\n", ch1, ch2);
|
||||
|
||||
return COMCTL32_ChrCmpHelperA(ch1, ch2, NORM_IGNORECASE);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_ChrCmpW
|
||||
*
|
||||
* Internal helper function.
|
||||
*/
|
||||
static BOOL COMCTL32_ChrCmpW(WCHAR ch1, WCHAR ch2)
|
||||
{
|
||||
return COMCTL32_ChrCmpHelperW(ch1, ch2, 0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_ChrCmpIW
|
||||
*
|
||||
* Internal helper function.
|
||||
*/
|
||||
static BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
|
||||
{
|
||||
return COMCTL32_ChrCmpHelperW(ch1, ch2, NORM_IGNORECASE);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrChrA [COMCTL32.350]
|
||||
*
|
||||
* Find a given character in a string.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in.
|
||||
* ch [I] Character to search for.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A pointer to the first occurrence of ch in lpszStr, or NULL if
|
||||
* not found.
|
||||
* Failure: NULL, if any arguments are invalid.
|
||||
*/
|
||||
LPSTR WINAPI StrChrA(LPCSTR lpszStr, WORD ch)
|
||||
{
|
||||
TRACE("(%s,%i)\n", debugstr_a(lpszStr), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
while (*lpszStr)
|
||||
{
|
||||
if (!COMCTL32_ChrCmpA(*lpszStr, ch))
|
||||
return (LPSTR)lpszStr;
|
||||
lpszStr = CharNextA(lpszStr);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_StrStrHelperA
|
||||
*
|
||||
* Internal implementation of StrStrA/StrStrIA
|
||||
*/
|
||||
static LPSTR COMCTL32_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
|
||||
int (*pStrCmpFn)(LPCSTR,LPCSTR,size_t))
|
||||
{
|
||||
size_t iLen;
|
||||
|
||||
if (!lpszStr || !lpszSearch || !*lpszSearch)
|
||||
return NULL;
|
||||
|
||||
iLen = strlen(lpszSearch);
|
||||
|
||||
while (*lpszStr)
|
||||
{
|
||||
if (!pStrCmpFn(lpszStr, lpszSearch, iLen))
|
||||
return (LPSTR)lpszStr;
|
||||
lpszStr = CharNextA(lpszStr);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_StrStrHelperW
|
||||
*
|
||||
* Internal implementation of StrStrW/StrStrIW
|
||||
*/
|
||||
static LPWSTR COMCTL32_StrStrHelperW(LPCWSTR lpszStr, LPCWSTR lpszSearch,
|
||||
int (*pStrCmpFn)(LPCWSTR,LPCWSTR,int))
|
||||
{
|
||||
int iLen;
|
||||
|
||||
if (!lpszStr || !lpszSearch || !*lpszSearch)
|
||||
return NULL;
|
||||
|
||||
iLen = strlenW(lpszSearch);
|
||||
|
||||
while (*lpszStr)
|
||||
{
|
||||
if (!pStrCmpFn(lpszStr, lpszSearch, iLen))
|
||||
return (LPWSTR)lpszStr;
|
||||
lpszStr = CharNextW(lpszStr);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrStrIA [COMCTL32.355]
|
||||
*
|
||||
* Find a substring within a string, ignoring case.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in
|
||||
* lpszSearch [I] String to look for
|
||||
*
|
||||
* RETURNS
|
||||
* The start of lpszSearch within lpszStr, or NULL if not found.
|
||||
*/
|
||||
LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
|
||||
{
|
||||
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
|
||||
|
||||
return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, strncasecmp);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrToIntA [COMCTL32.357]
|
||||
*
|
||||
* Read a signed integer from a string.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to read integer from
|
||||
*
|
||||
* RETURNS
|
||||
* The signed integer value represented by the string, or 0 if no integer is
|
||||
* present.
|
||||
*/
|
||||
INT WINAPI StrToIntA (LPSTR lpszStr)
|
||||
{
|
||||
return atoi(lpszStr);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrStrIW [COMCTL32.363]
|
||||
*
|
||||
* See StrStrIA.
|
||||
*/
|
||||
LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
|
||||
{
|
||||
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
|
||||
|
||||
return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int)) wcsnicmp);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrToIntW [COMCTL32.365]
|
||||
*
|
||||
* See StrToIntA.
|
||||
*/
|
||||
INT WINAPI StrToIntW (LPWSTR lpString)
|
||||
{
|
||||
return atoiW(lpString);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_StrSpnHelperA (internal)
|
||||
*
|
||||
* Internal implementation of StrSpnA/StrCSpnA/StrCSpnIA
|
||||
*/
|
||||
static int COMCTL32_StrSpnHelperA(LPCSTR lpszStr, LPCSTR lpszMatch,
|
||||
LPSTR (WINAPI *pStrChrFn)(LPCSTR,WORD),
|
||||
BOOL bInvert)
|
||||
{
|
||||
LPCSTR lpszRead = lpszStr;
|
||||
if (lpszStr && *lpszStr && lpszMatch)
|
||||
{
|
||||
while (*lpszRead)
|
||||
{
|
||||
LPCSTR lpszTest = pStrChrFn(lpszMatch, *lpszRead);
|
||||
|
||||
if (!bInvert && !lpszTest)
|
||||
break;
|
||||
if (bInvert && lpszTest)
|
||||
break;
|
||||
lpszRead = CharNextA(lpszRead);
|
||||
};
|
||||
}
|
||||
return lpszRead - lpszStr;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrCSpnA [COMCTL32.356]
|
||||
*
|
||||
* Find the length of the start of a string that does not contain certain
|
||||
* characters.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search
|
||||
* lpszMatch [I] Characters that cannot be in the substring
|
||||
*
|
||||
* RETURNS
|
||||
* The length of the part of lpszStr containing only chars not in lpszMatch,
|
||||
* or 0 if any parameter is invalid.
|
||||
*/
|
||||
int WINAPI StrCSpnA(LPCSTR lpszStr, LPCSTR lpszMatch)
|
||||
{
|
||||
TRACE("(%s,%s)\n",debugstr_a(lpszStr), debugstr_a(lpszMatch));
|
||||
|
||||
return COMCTL32_StrSpnHelperA(lpszStr, lpszMatch, StrChrA, TRUE);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrChrW [COMCTL32.358]
|
||||
*
|
||||
* See StrChrA.
|
||||
*/
|
||||
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
|
||||
{
|
||||
LPWSTR lpszRet = NULL;
|
||||
|
||||
TRACE("(%s,%i)\n", debugstr_w(lpszStr), ch);
|
||||
|
||||
if (lpszStr)
|
||||
lpszRet = strchrW(lpszStr, ch);
|
||||
return lpszRet;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrCmpNA [COMCTL32.352]
|
||||
*
|
||||
* Compare two strings, up to a maximum length.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] First string to compare
|
||||
* lpszComp [I] Second string to compare
|
||||
* iLen [I] Maximum number of chars to compare.
|
||||
*
|
||||
* RETURNS
|
||||
* An integer less than, equal to or greater than 0, indicating that
|
||||
* lpszStr is less than, the same, or greater than lpszComp.
|
||||
*/
|
||||
INT WINAPI StrCmpNA(LPCSTR lpszStr, LPCSTR lpszComp, INT iLen)
|
||||
{
|
||||
INT iRet;
|
||||
|
||||
TRACE("(%s,%s,%i)\n", debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
|
||||
|
||||
iRet = CompareStringA(GetThreadLocale(), 0, lpszStr, iLen, lpszComp, iLen);
|
||||
return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrCmpNIA [COMCTL32.353]
|
||||
*
|
||||
* Compare two strings, up to a maximum length, ignoring case.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] First string to compare
|
||||
* lpszComp [I] Second string to compare
|
||||
* iLen [I] Maximum number of chars to compare.
|
||||
*
|
||||
* RETURNS
|
||||
* An integer less than, equal to or greater than 0, indicating that
|
||||
* lpszStr is less than, the same, or greater than lpszComp.
|
||||
*/
|
||||
int WINAPI StrCmpNIA(LPCSTR lpszStr, LPCSTR lpszComp, int iLen)
|
||||
{
|
||||
INT iRet;
|
||||
|
||||
TRACE("(%s,%s,%i)\n", debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
|
||||
|
||||
iRet = CompareStringA(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen);
|
||||
return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrCmpNIW [COMCTL32.361]
|
||||
*
|
||||
* See StrCmpNIA.
|
||||
*/
|
||||
INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, int iLen)
|
||||
{
|
||||
INT iRet;
|
||||
|
||||
TRACE("(%s,%s,%i)\n", debugstr_w(lpszStr), debugstr_w(lpszComp), iLen);
|
||||
|
||||
iRet = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen);
|
||||
return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrCmpNW [COMCTL32.360]
|
||||
*
|
||||
* See StrCmpNA.
|
||||
*/
|
||||
INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
|
||||
{
|
||||
INT iRet;
|
||||
|
||||
TRACE("(%s,%s,%i)\n", debugstr_w(lpszStr), debugstr_w(lpszComp), iLen);
|
||||
|
||||
iRet = CompareStringW(GetThreadLocale(), 0, lpszStr, iLen, lpszComp, iLen);
|
||||
return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrRChrA [COMCTL32.351]
|
||||
*
|
||||
* Find the last occurence of a character in string.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in
|
||||
* lpszEnd [I] Place to end search, or NULL to search until the end of lpszStr
|
||||
* ch [I] Character to search for.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A pointer to the last occurrence of ch in lpszStr before lpszEnd,
|
||||
* or NULL if not found.
|
||||
* Failure: NULL, if any arguments are invalid.
|
||||
*/
|
||||
LPSTR WINAPI StrRChrA(LPCSTR lpszStr, LPCSTR lpszEnd, WORD ch)
|
||||
{
|
||||
LPCSTR lpszRet = NULL;
|
||||
|
||||
TRACE("(%s,%s,%x)\n", debugstr_a(lpszStr), debugstr_a(lpszEnd), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
WORD ch2;
|
||||
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + lstrlenA(lpszStr);
|
||||
|
||||
while (*lpszStr && lpszStr <= lpszEnd)
|
||||
{
|
||||
ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | lpszStr[1] : *lpszStr;
|
||||
|
||||
if (!COMCTL32_ChrCmpA(ch, ch2))
|
||||
lpszRet = lpszStr;
|
||||
lpszStr = CharNextA(lpszStr);
|
||||
}
|
||||
}
|
||||
return (LPSTR)lpszRet;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
* StrRChrW [COMCTL32.359]
|
||||
*
|
||||
* See StrRChrA.
|
||||
*/
|
||||
LPWSTR WINAPI StrRChrW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
|
||||
{
|
||||
LPCWSTR lpszRet = NULL;
|
||||
|
||||
TRACE("(%s,%s,%x)\n", debugstr_w(lpszStr), debugstr_w(lpszEnd), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + strlenW(lpszStr);
|
||||
|
||||
while (*lpszStr && lpszStr <= lpszEnd)
|
||||
{
|
||||
if (!COMCTL32_ChrCmpW(ch, *lpszStr))
|
||||
lpszRet = lpszStr;
|
||||
lpszStr = CharNextW(lpszStr);
|
||||
}
|
||||
}
|
||||
return (LPWSTR)lpszRet;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrStrA [COMCTL32.354]
|
||||
*
|
||||
* Find a substring within a string.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in
|
||||
* lpszSearch [I] String to look for
|
||||
*
|
||||
* RETURNS
|
||||
* The start of lpszSearch within lpszStr, or NULL if not found.
|
||||
*/
|
||||
LPSTR WINAPI StrStrA(LPCSTR lpszStr, LPCSTR lpszSearch)
|
||||
{
|
||||
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
|
||||
|
||||
return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, strncmp);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrStrW [COMCTL32.362]
|
||||
*
|
||||
* See StrStrA.
|
||||
*/
|
||||
LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
|
||||
{
|
||||
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
|
||||
|
||||
return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int)) wcsncmp);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrChrIA [COMCTL32.366]
|
||||
*
|
||||
* Find a given character in a string, ignoring case.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in.
|
||||
* ch [I] Character to search for.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A pointer to the first occurrence of ch in lpszStr, or NULL if
|
||||
* not found.
|
||||
* Failure: NULL, if any arguments are invalid.
|
||||
*/
|
||||
LPSTR WINAPI StrChrIA(LPCSTR lpszStr, WORD ch)
|
||||
{
|
||||
TRACE("(%s,%i)\n", debugstr_a(lpszStr), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
while (*lpszStr)
|
||||
{
|
||||
if (!COMCTL32_ChrCmpIA(*lpszStr, ch))
|
||||
return (LPSTR)lpszStr;
|
||||
lpszStr = CharNextA(lpszStr);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrChrIW [COMCTL32.367]
|
||||
*
|
||||
* See StrChrA.
|
||||
*/
|
||||
LPWSTR WINAPI StrChrIW(LPCWSTR lpszStr, WCHAR ch)
|
||||
{
|
||||
TRACE("(%s,%i)\n", debugstr_w(lpszStr), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
ch = toupperW(ch);
|
||||
while (*lpszStr)
|
||||
{
|
||||
if (toupperW(*lpszStr) == ch)
|
||||
return (LPWSTR)lpszStr;
|
||||
lpszStr = CharNextW(lpszStr);
|
||||
}
|
||||
lpszStr = NULL;
|
||||
}
|
||||
return (LPWSTR)lpszStr;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrRStrIA [COMCTL32.372]
|
||||
*
|
||||
* Find the last occurence of a substring within a string.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in
|
||||
* lpszEnd [I] End of lpszStr
|
||||
* lpszSearch [I] String to look for
|
||||
*
|
||||
* RETURNS
|
||||
* The last occurence lpszSearch within lpszStr, or NULL if not found.
|
||||
*/
|
||||
LPSTR WINAPI StrRStrIA(LPCSTR lpszStr, LPCSTR lpszEnd, LPCSTR lpszSearch)
|
||||
{
|
||||
LPSTR lpszRet = NULL;
|
||||
WORD ch1, ch2;
|
||||
INT iLen;
|
||||
|
||||
TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
|
||||
|
||||
if (!lpszStr || !lpszSearch || !*lpszSearch)
|
||||
return NULL;
|
||||
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + lstrlenA(lpszStr);
|
||||
|
||||
if (IsDBCSLeadByte(*lpszSearch))
|
||||
ch1 = *lpszSearch << 8 | lpszSearch[1];
|
||||
else
|
||||
ch1 = *lpszSearch;
|
||||
iLen = lstrlenA(lpszSearch);
|
||||
|
||||
while (lpszStr <= lpszEnd && *lpszStr)
|
||||
{
|
||||
ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | lpszStr[1] : *lpszStr;
|
||||
if (!COMCTL32_ChrCmpIA(ch1, ch2))
|
||||
{
|
||||
if (!StrCmpNIA(lpszStr, lpszSearch, iLen))
|
||||
lpszRet = (LPSTR)lpszStr;
|
||||
}
|
||||
lpszStr = CharNextA(lpszStr);
|
||||
}
|
||||
return lpszRet;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrRStrIW [COMCTL32.373]
|
||||
*
|
||||
* See StrRStrIA.
|
||||
*/
|
||||
LPWSTR WINAPI StrRStrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, LPCWSTR lpszSearch)
|
||||
{
|
||||
LPWSTR lpszRet = NULL;
|
||||
INT iLen;
|
||||
|
||||
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
|
||||
|
||||
if (!lpszStr || !lpszSearch || !*lpszSearch)
|
||||
return NULL;
|
||||
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + strlenW(lpszStr);
|
||||
|
||||
iLen = strlenW(lpszSearch);
|
||||
|
||||
while (lpszStr <= lpszEnd && *lpszStr)
|
||||
{
|
||||
if (!COMCTL32_ChrCmpIW(*lpszSearch, *lpszStr))
|
||||
{
|
||||
if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
|
||||
lpszRet = (LPWSTR)lpszStr;
|
||||
}
|
||||
lpszStr = CharNextW(lpszStr);
|
||||
}
|
||||
return lpszRet;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* COMCTL32_StrSpnHelperW
|
||||
*
|
||||
* Internal implementation of StrSpnW/StrCSpnW/StrCSpnIW
|
||||
*/
|
||||
static int COMCTL32_StrSpnHelperW(LPCWSTR lpszStr, LPCWSTR lpszMatch,
|
||||
LPWSTR (WINAPI *pStrChrFn)(LPCWSTR,WCHAR),
|
||||
BOOL bInvert)
|
||||
{
|
||||
LPCWSTR lpszRead = lpszStr;
|
||||
if (lpszStr && *lpszStr && lpszMatch)
|
||||
{
|
||||
while (*lpszRead)
|
||||
{
|
||||
LPCWSTR lpszTest = pStrChrFn(lpszMatch, *lpszRead);
|
||||
|
||||
if (!bInvert && !lpszTest)
|
||||
break;
|
||||
if (bInvert && lpszTest)
|
||||
break;
|
||||
lpszRead = CharNextW(lpszRead);
|
||||
};
|
||||
}
|
||||
return lpszRead - lpszStr;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrCSpnIA [COMCTL32.374]
|
||||
*
|
||||
* Find the length of the start of a string that does not contain certain
|
||||
* characters, ignoring case.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search
|
||||
* lpszMatch [I] Characters that cannot be in the substring
|
||||
*
|
||||
* RETURNS
|
||||
* The length of the part of lpszStr containing only chars not in lpszMatch,
|
||||
* or 0 if any parameter is invalid.
|
||||
*/
|
||||
int WINAPI StrCSpnIA(LPCSTR lpszStr, LPCSTR lpszMatch)
|
||||
{
|
||||
TRACE("(%s,%s)\n",debugstr_a(lpszStr), debugstr_a(lpszMatch));
|
||||
|
||||
return COMCTL32_StrSpnHelperA(lpszStr, lpszMatch, StrChrIA, TRUE);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrCSpnIW [COMCTL32.375]
|
||||
*
|
||||
* See StrCSpnIA.
|
||||
*/
|
||||
int WINAPI StrCSpnIW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
|
||||
{
|
||||
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
|
||||
|
||||
return COMCTL32_StrSpnHelperW(lpszStr, lpszMatch, StrChrIW, TRUE);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrRChrIA [COMCTL32.368]
|
||||
*
|
||||
* Find the last occurence of a character in string, ignoring case.
|
||||
*
|
||||
* PARAMS
|
||||
* lpszStr [I] String to search in
|
||||
* lpszEnd [I] Place to end search, or NULL to search until the end of lpszStr
|
||||
* ch [I] Character to search for.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: A pointer to the last occurrence of ch in lpszStr before lpszEnd,
|
||||
* or NULL if not found.
|
||||
* Failure: NULL, if any arguments are invalid.
|
||||
*/
|
||||
LPSTR WINAPI StrRChrIA(LPCSTR lpszStr, LPCSTR lpszEnd, WORD ch)
|
||||
{
|
||||
LPCSTR lpszRet = NULL;
|
||||
|
||||
TRACE("(%s,%s,%x)\n", debugstr_a(lpszStr), debugstr_a(lpszEnd), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
WORD ch2;
|
||||
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + lstrlenA(lpszStr);
|
||||
|
||||
while (*lpszStr && lpszStr <= lpszEnd)
|
||||
{
|
||||
ch2 = IsDBCSLeadByte(*lpszStr)? *lpszStr << 8 | lpszStr[1] : *lpszStr;
|
||||
|
||||
if (ch == ch2)
|
||||
lpszRet = lpszStr;
|
||||
lpszStr = CharNextA(lpszStr);
|
||||
}
|
||||
}
|
||||
return (LPSTR)lpszRet;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* StrRChrIW [COMCTL32.369]
|
||||
*
|
||||
* See StrRChrIA.
|
||||
*/
|
||||
LPWSTR WINAPI StrRChrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
|
||||
{
|
||||
LPCWSTR lpszRet = NULL;
|
||||
|
||||
TRACE("(%s,%s,%x)\n", debugstr_w(lpszStr), debugstr_w(lpszEnd), ch);
|
||||
|
||||
if (lpszStr)
|
||||
{
|
||||
if (!lpszEnd)
|
||||
lpszEnd = lpszStr + strlenW(lpszStr);
|
||||
|
||||
while (*lpszStr && lpszStr <= lpszEnd)
|
||||
{
|
||||
if (ch == *lpszStr)
|
||||
lpszRet = lpszStr;
|
||||
lpszStr = CharNextW(lpszStr);
|
||||
}
|
||||
}
|
||||
return (LPWSTR)lpszRet;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* StrCSpnW [COMCTL32.364]
|
||||
*
|
||||
* See StrCSpnA.
|
||||
*/
|
||||
int WINAPI StrCSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
|
||||
{
|
||||
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
|
||||
|
||||
return COMCTL32_StrSpnHelperW(lpszStr, lpszMatch, StrChrW, TRUE);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* IntlStrEqWorkerA [COMCTL32.376]
|
||||
*
|
||||
* Compare two strings.
|
||||
*
|
||||
* PARAMS
|
||||
* bCase [I] Whether to compare case sensitively
|
||||
* lpszStr [I] First string to compare
|
||||
* lpszComp [I] Second string to compare
|
||||
* iLen [I] Length to compare
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE If the strings are equal.
|
||||
* FALSE Otherwise.
|
||||
*/
|
||||
BOOL WINAPI IntlStrEqWorkerA(BOOL bCase, LPCSTR lpszStr, LPCSTR lpszComp,
|
||||
int iLen)
|
||||
{
|
||||
DWORD dwFlags = LOCALE_USE_CP_ACP;
|
||||
int iRet;
|
||||
|
||||
TRACE("(%d,%s,%s,%d)\n", bCase,
|
||||
debugstr_a(lpszStr), debugstr_a(lpszComp), iLen);
|
||||
|
||||
/* FIXME: These flags are undocumented and unknown by our CompareString.
|
||||
* We need defines for them.
|
||||
*/
|
||||
dwFlags |= bCase ? 0x10000000 : 0x10000001;
|
||||
|
||||
iRet = CompareStringA(GetThreadLocale(),
|
||||
dwFlags, lpszStr, iLen, lpszComp, iLen);
|
||||
|
||||
if (!iRet)
|
||||
iRet = CompareStringA(2048, dwFlags, lpszStr, iLen, lpszComp, iLen);
|
||||
|
||||
return iRet == 2 ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* IntlStrEqWorkerW [COMCTL32.377]
|
||||
*
|
||||
* See IntlStrEqWorkerA.
|
||||
*/
|
||||
BOOL WINAPI IntlStrEqWorkerW(BOOL bCase, LPCWSTR lpszStr, LPCWSTR lpszComp,
|
||||
int iLen)
|
||||
{
|
||||
DWORD dwFlags;
|
||||
int iRet;
|
||||
|
||||
TRACE("(%d,%s,%s,%d)\n", bCase,
|
||||
debugstr_w(lpszStr),debugstr_w(lpszComp), iLen);
|
||||
|
||||
/* FIXME: These flags are undocumented and unknown by our CompareString.
|
||||
* We need defines for them.
|
||||
*/
|
||||
dwFlags = bCase ? 0x10000000 : 0x10000001;
|
||||
|
||||
iRet = CompareStringW(GetThreadLocale(),
|
||||
dwFlags, lpszStr, iLen, lpszComp, iLen);
|
||||
|
||||
if (!iRet)
|
||||
iRet = CompareStringW(2048, dwFlags, lpszStr, iLen, lpszComp, iLen);
|
||||
|
||||
return iRet == 2 ? TRUE : FALSE;
|
||||
}
|
1681
reactos/lib/comctl32/syslink.c
Normal file
1681
reactos/lib/comctl32/syslink.c
Normal file
File diff suppressed because it is too large
Load diff
3288
reactos/lib/comctl32/tab.c
Normal file
3288
reactos/lib/comctl32/tab.c
Normal file
File diff suppressed because it is too large
Load diff
7254
reactos/lib/comctl32/toolbar.c
Normal file
7254
reactos/lib/comctl32/toolbar.c
Normal file
File diff suppressed because it is too large
Load diff
2842
reactos/lib/comctl32/tooltips.c
Normal file
2842
reactos/lib/comctl32/tooltips.c
Normal file
File diff suppressed because it is too large
Load diff
1837
reactos/lib/comctl32/trackbar.c
Normal file
1837
reactos/lib/comctl32/trackbar.c
Normal file
File diff suppressed because it is too large
Load diff
5518
reactos/lib/comctl32/treeview.c
Normal file
5518
reactos/lib/comctl32/treeview.c
Normal file
File diff suppressed because it is too large
Load diff
1005
reactos/lib/comctl32/updown.c
Normal file
1005
reactos/lib/comctl32/updown.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue