Excluded: 3rd-party code (incl. wine) and most of the win32ss.
# [MODULE] A short but descriptive summary (#pr-num)
#
# A comprehensible description of WHY you did this work. Do not limit
-# yourself here.
-# The width of the description is arbitary, but it is a good idea to
-# wrap the text by 72 chars.
+# yourself here.
+# The width of the description is arbitary, but it is a good idea to
+# wrap the text by 72 chars.
#
# CORE-XXXX CIDXXXXX
# ----------------------
# * Description of a commit should explain WHY a change was made.
# * JIRA, Coverity ID references should be placed at the bottom row.
# * There must be a newline between summary, description and bug IDs.
-# * GitHub Pull Request ID should be referenced in the summary in
-# parens. If the resulting summary is longer than 70 chars it may
+# * GitHub Pull Request ID should be referenced in the summary in
+# parens. If the resulting summary is longer than 70 chars it may
# be placed last in the ID row to prevent hard wrapping on GitHub.
FROM gitpod/workspace-full-vnc
-
+
USER gitpod
# Install custom tools, runtime, etc. using apt-get
-Copyright 2008 ReactOS Portable Systems Group. All rights reserved.
+Copyright 2008 ReactOS Portable Systems Group. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided
-that the following conditions are met:
+that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and
- the following disclaimer.
+ the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
- and the following disclaimer in the documentation and/or other materials provided with the
- distribution.
+ and the following disclaimer in the documentation and/or other materials provided with the
+ distribution.
THIS SOFTWARE IS PROVIDED BY THE REACTOS PORTABLE SYSTEMS GROUP ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
1 chang = 20 tamlung
1 tamlung = 4 baht
1 baht = 4 saloung
-1 saloung =
+1 saloung =
1 chang = 6/5 kg = 1200 g
1 tamlung = 1/20 chang = 60 g
{
// must be x>=1, if not return Nan (Not a Number)
if(!(x>=1.0)) return sqrt(-1.0);
-
+
// return only the positive result (as sqrt does).
return log(x+sqrt(x*x-1.0));
}
{
// must be x>-1, x<1, if not return Nan (Not a Number)
if(!(x>-1.0 && x<1.0)) return sqrt(-1.0);
-
+
return log((1.0+x)/(1.0-x))/2.0;
}
s = 60;
y = 0;
- while(s >= 0) {
+ while(s >= 0) {
y = 2*y;
b = (3*y*(y + 1) + 1) << s;
s = s - 3;
* "DOT" function can be used for starting a number (integer part will be zero).
* Added repeat function.
* If the number is greater than maximum resolution, it will be displayed with exponential notation.
-* Removed mouse and keyboard focuses from displayed buttons.
+* Removed mouse and keyboard focuses from displayed buttons.
* Added normal and small icons.
1.00 (20070323)
static void update_n_stats_items(HWND hWnd, TCHAR *buffer)
{
- unsigned int n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0);
+ unsigned int n = SendDlgItemMessage(hWnd, IDC_LIST_STAT, LB_GETCOUNT, 0, 0);
_stprintf(buffer, _T("n=%u"), n);
SetDlgItemText(hWnd, IDC_TEXT_NITEMS, buffer);
#else
(void)idm;
#endif
-}
+}
static void run_canc(calc_number_t *c)
{
if (GetCPInfoExW(codePages[i], 0, &cpInfo))
{
trimmedName = wcschr(cpInfo.CodePageName, L'(');
- if (!trimmedName)
+ if (!trimmedName)
trimmedName = cpInfo.CodePageName;
SendMessageW(hwndCombo,
MSG Msg;
hInstance = hInst;
-
+
/* Mirroring code for the titlebar */
switch (GetUserDefaultUILanguage())
{
NULL,
TRUE);
- if (infoPtr->pActiveCell)
+ if (infoPtr->pActiveCell)
infoPtr->pActiveCell->bActive = FALSE;
infoPtr->pActiveCell = &infoPtr->Cells[0][0];
infoPtr->pActiveCell->bActive = TRUE;
* Find the cell the mouse pointer is over.
* Since each cell is the same size, this can be done quickly using CellSize.
* Clamp to XCELLS - 1 and YCELLS - 1 because the map can sometimes be slightly
- * larger than infoPtr.CellSize * XCELLS , due to the map size being a non integer
+ * larger than infoPtr.CellSize * XCELLS , due to the map size being a non integer
* multiple of infoPtr.CellSize .
*/
x = min(XCELLS - 1, ptx / max(1, infoPtr->CellSize.cx));
i = XCELLS * infoPtr->iYStart + y * XCELLS + x;
if (i >= infoPtr->NumValidGlyphs)
{
- if (infoPtr->pActiveCell)
+ if (infoPtr->pActiveCell)
infoPtr->pActiveCell->bActive = FALSE;
infoPtr->pActiveCell = NULL;
return;
/* Invalidate the rect around the active cell since a new cell will become active */
if (infoPtr->pActiveCell && infoPtr->pActiveCell->bActive)
{
- InvalidateRect(infoPtr->hMapWnd,
- &infoPtr->pActiveCell->CellExt,
+ InvalidateRect(infoPtr->hMapWnd,
+ &infoPtr->pActiveCell->CellExt,
TRUE);
}
-
+
GetClientRect(infoPtr->hMapWnd, &rect);
rect.top += 2;
rect.bottom -= 2;
case WM_LBUTTONDBLCLK:
{
- if (!infoPtr->pActiveCell)
+ if (!infoPtr->pActiveCell)
break;
NotifyParentOfSelection(infoPtr,
#define FM_SETCHARMAP (WM_USER + 5)
// the code pages to display in the advanced 'character set' combobox
-static const UINT codePages[] = {
+static const UINT codePages[] = {
864, 775, 863, 855, 737, 856, 862, 861, 852, 869, 850, 858, 865, 860, 866, 857, 437, // OEM code pages
1256, 1257, 1250, 1251, 1253, 1255, 932, 949, 1252, 936, 874, 950, 1254, 1258 // ANSI code pages
};
)
{
// Go through all the cells and calculate
- // their coordinates within the grid
+ // their coordinates within the grid
for (int y = 0; y < m_yNumCells; y++)
for (int x = 0; x < m_xNumCells; x++)
{
CGridView::OnVScroll(_In_ INT Value,
_In_ INT Pos)
{
-
INT PrevScrollPosition = m_ScrollPosition;
switch (Value)
{
MSG Msg;
- // Pump the message queue
+ // Pump the message queue
while (GetMessageW(&Msg, NULL, 0, 0) != 0)
{
TranslateMessage(&Msg);
}
}
- // Add all the fonts to the
+ // Add all the fonts to the list
if (!CreateFontComboBox())
return FALSE;
GetLocalTime(&Time);
- JobTime = (DWORD_PTR)Time.wHour * 3600000 +
+ JobTime = (DWORD_PTR)Time.wHour * 3600000 +
(DWORD_PTR)Time.wMinute * 60000;
return JobTime;
ULONG ulJobId = 0;
NET_API_STATUS Status;
- InfoBuffer.JobTime = (DWORD_PTR)ulJobHour * 3600000 +
+ InfoBuffer.JobTime = (DWORD_PTR)ulJobHour * 3600000 +
(DWORD_PTR)ulJobMinute * 60000;
InfoBuffer.DaysOfMonth = ulDaysOfMonth;
InfoBuffer.DaysOfWeek = ucDaysOfWeek;
* PURPOSE: Comparing text files
* COPYRIGHT: Copyright 2021 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
+
#include "fc.h"
#define IS_SPACE(ch) ((ch) == TEXT(' ') || (ch) == TEXT('\t'))
return FCRET_DIFFERENT;
}
-static FCRET
+static FCRET
Finalize(FILECOMPARE* pFC, struct list *ptr0, struct list* ptr1, BOOL fDifferent)
{
if (!ptr0 && !ptr1)
IS_TEXT_UNICODE_REVERSE_MASK | IS_TEXT_UNICODE_UNICODE_MASK)
& ~IS_TEXT_UNKNOWN_FLAGS_MASK;
INT Results;
-
+
IsTextUnicode(Buffer, BufferSize, &Tests);
Results = Tests;
continue;
GetFullPathNameW(argv[i], ARRAYSIZE(szFullPath), szFullPath, NULL);
- hFile = CreateFileW(szFullPath,
+ hFile = CreateFileW(szFullPath,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
{
if (!hInstance)
return;
-
+
WCHAR StringBuffer[RES_STR_MAXLEN];
LoadStringW(hInstance, uID, StringBuffer, _countof(StringBuffer));
PrintString(StringBuffer, MaxWidth, bAlignLeft);
*pNumberStr = L'0' + (MemorySize / Mod);
MemorySize %= Mod;
pNumberStr++;
-
+
if (i != 1 && i % 3 == 1)
{
*pNumberStr = L',';
/**
* @name: HasSubFolder
*
-* @param strPath
+* @param strPath
* Must specify folder name
*
* @return
/**
* @name: GetDirectoryStructure
- *
+ *
* @param strPath
* Must specify folder name
*
wcscat(tmp, strPath);
wcscat(tmp, L"\\*.*");
hFind = FindFirstFileW(tmp, &FindFileData);
- //err = GetLastError();
+ //err = GetLastError();
}
if (hFind == INVALID_HANDLE_VALUE)
WhoamiFree(pTable->Content[i * pTable->Cols + j]);
WhoamiFree(pTable);
-
+
if (PrintFormat != csv)
HeapFree(GetProcessHeap(), 0, ColLength);
}
VOID DDRedrawFrame(LPDIRECTDRAWSURFACE lpDDSurface);
VOID DDUpdateFrame(LPDIRECTDRAWSURFACE lpDDPrimarySurface ,LPDIRECTDRAWSURFACE lpDDBackBuffer, BOOL Fullscreen, INT *posX, INT *posY, INT *gainX, INT *gainY, RECT *rectDD);
-#define TEST_DURATION 10000
+#define TEST_DURATION 10000
#define DD_TEST_WIDTH 640
#define DD_TEST_HEIGHT 480
#define DD_TEST_STEP 5
{
if (msg.message == WM_TIMER)
{
- if(msg.wParam == TimerID)
+ if(msg.wParam == TimerID)
{
break;
}
SendMessageW(hDlgCtrls[1], WM_SETTEXT, 0, (LPARAM)szText);
/* FIXME
- * we currently enumerate only the first adapter
+ * we currently enumerate only the first adapter
*/
EnumerateDrivers(&hDlgCtrls[2], hInfo, &InfoData);
break;
{
RECT rect;
PDXDIAG_CONTEXT pContext = (PDXDIAG_CONTEXT)GetWindowLongPtr(hDlg, DWLP_USER);
- switch (message)
+ switch (message)
{
case WM_INITDIALOG:
{
// http://www.catch22.net/software/winspy
// Copyright (c) 2002 by J Brown
//
-
+
//
// Copied from uxtheme.h
// If you have this new header, then delete these and
#define ETDT_USETABTEXTURE 0x00000004
#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
-//
+//
typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD);
//
if(hUXTheme)
{
- fnEnableThemeDialogTexture =
+ fnEnableThemeDialogTexture =
(ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture");
if(fnEnableThemeDialogTexture)
CurSel++;
/* enable/disable next button */
- EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEXT),
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEXT),
(CurSel != TabCtrl_GetItemCount(hTabCtrlWnd) - 1));
-
+
/* switch to next tab */
SendMessageW(hTabCtrlWnd, TCM_SETCURSEL, CurSel, 0L);
INT CurSel = TabCtrl_GetCurSel(hTabCtrlWnd);
/* enable/disable next button */
- EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEXT),
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEXT),
(CurSel != TabCtrl_GetItemCount(hTabCtrlWnd) - 1));
TabCtrl_OnSelChange(pContext);
InitCommonControlsEx(&InitControls);
hInst = hInstance;
-
+
DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_DIALOG), NULL, DxDiagWndProc);
-
+
return 0;
}
}
};
-static DIRECTPLAY_GUID DirectPlaySP[] =
+static DIRECTPLAY_GUID DirectPlaySP[] =
{
{
L"{36E95EE0-8577-11cf-960C-0080C7534E82}",
Item.iItem = ListView_GetItemCount(hDlgCtrl);
/* FIXME
- * on Windows Vista we need to use RegLoadMUIString which is not available for older systems
+ * on Windows Vista we need to use RegLoadMUIString which is not available for older systems
*/
if (!GetRegValue(hKey, szName, L"Friendly Name", REG_SZ, szResult, sizeof(szResult)))
if (!GetRegValue(hKey, szName, L"DescriptionW", REG_SZ, szResult, sizeof(szResult)))
SendDlgItemMessageW(hwndDlg, IDC_STATIC_ADAPTER_PROVIDER, WM_SETTEXT, 0, (LPARAM)szText);
/* FIXME
- * we currently enumerate only the first adapter
+ * we currently enumerate only the first adapter
*/
hDlgCtrls[0] = GetDlgItem(hwndDlg, IDC_STATIC_DSOUND_DRIVER);
hDlgCtrls[1] = GetDlgItem(hwndDlg, IDC_STATIC_DSOUND_VERSION);
INT_PTR CALLBACK
SoundPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
- switch (message)
+ switch (message)
{
case WM_INITDIALOG:
{
}
-static
+static
BOOL
GetDirectXVersion(WCHAR * szBuffer)
{
the program is not running in WOW64. */
fnIsWow64Process = (ISWOW64PROC)GetProcAddress(
GetModuleHandleW(L"kernel32"), "IsWow64Process");
-
+
if (fnIsWow64Process != NULL)
fnIsWow64Process(GetCurrentProcess(), &isWow64);
case 'B': /* Matches pattern if at the beginning of a line */
at_start = 1;
break;
-
+
//case 'c':
//case 'C': /* Literal? */
// literal_search = 1;
case 'E': /* matches pattern if at end of line */
at_end = 1;
break;
-
+
case 'i':
case 'I': /* Ignore */
ignore_case = 1;
case 'm':
case 'M': /* only filename */
only_fname = 1;
- break;
-
+ break;
+
case 'n':
case 'N': /* Number */
number_output = 1;
break;
-
+
case 'r':
case 'R': /* search strings as regular expressions */
reg_express = 1;
- break;
+ break;
case 's':
case 'S': /* search files in child directory too*/
sub_dirs = 1;
- break;
+ break;
case 'v':
case 'V': /* Not with */
case 'x':
case 'X': /* exact match */
exact_match = 1;
- break;
-
+ break;
+
default:
usage ();
exit (2); /* syntax error .. return error 2 */
Solitaire for ReactOS
/*****************************************
-A complete working example of the CardLib
+A complete working example of the CardLib
card-game library.
Freeware
lScore = lScore - 52;
else
lScore = -52;
-
+
if (dwOptions & OPTION_THREE_CARDS)
dwWasteTreshold = 2;
else
dwWasteTreshold = 0;
-
+
}
else
{
{
lScore = lScore + 10;
}
-
+
UpdateStatusBar();
}
}
else
EnableWindow(hCtrl, FALSE);
return TRUE;
-
+
case IDOK:
dwOptions &= ~OPTION_THREE_CARDS;
if (IsDlgButtonChecked(hDlg, IDC_OPT_DRAWTHREE) == BST_CHECKED)
// For now, the Help dialog item is disabled because of lacking of HTML Help support
EnableMenuItem(GetMenu(hwnd), IDM_HELP_CONTENTS, MF_BYCOMMAND | MF_GRAYED);
-
+
hwndStatus = CreateStatusWindow(WS_CHILD | WS_VISIBLE | CCS_BOTTOM | SBARS_SIZEGRIP, _T("Ready"), hwnd, 0);
//SendMessage(hwndStatus, SB_SIMPLE, (WPARAM)TRUE, 0);
{
CardStack newStack;
int i, colors = 1, num = 0;
-
+
switch (dwDifficulty)
{
case IDC_DIF_ONECOLOR:
{
int i, j;
/* First four stack with five, all other with 4 */
- int covCards = 5;
+ int covCards = 5;
CardStack fakeDeck, temp;
SpiderWnd.EmptyStacks();
deck.Shuffle();
fakeDeck.NewDeck();
fakeDeck.Shuffle();
-
+
/* Reset progress value */
cardsFinished = 0;
/* Deal to each stack */
for (i = 0; i < NUM_STACKS; i++)
{
- temp.Clear();
+ temp.Clear();
if (i == NUM_SMALLER_STACKS)
{
covCards--;
pStack[i]->SetCardStack(temp);
}
/* Deal five fake cards to the deck */
- pDeck->SetCardStack(fakeDeck.Pop(5));
+ pDeck->SetCardStack(fakeDeck.Pop(5));
SpiderWnd.Redraw();
fGameStarted = false;
if (mystack[i].Suit() != mystack[i + 1].Suit())
{
return false;
- }
+ }
}
return true;
}
stackobj.GetFaceDirection(&numfacedown);
numcards = stackobj.NumCards();
-
- /* Only cards facing up */
+
+ /* Only cards facing up */
if (numDragCards <= numcards - numfacedown)
{
const CardStack &mystack = stackobj.GetCardStack();
{
return false;
}
-
+
/* If stack is empty, everything can be dropped */
if (stackobj.NumCards() != 0)
{
faceup = stackobj.NumCards() - facedown;
if (faceup + dragcards.NumCards() >= NUM_ONECOLOR_CARDS)
- {
+ {
int i, max = NUM_ONECOLOR_CARDS - dragcards.NumCards() - 1;
/* Dragged cards have been checked to be in order, check stack cards */
if (mystack[0].Suit() == dragcard.Suit() &&
- stackLookingGood(mystack, max))
+ stackLookingGood(mystack, max))
{
CardStack s = stackobj.GetCardStack();
CardStack f;
HANDLE hAccel;
hInstance = hInst;
-
+
switch (GetUserDefaultUILanguage())
{
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
hr = StringCbCatW(szBuffer, sizeof(szBuffer), L"boot.ini");
if (FAILED(hr))
return FALSE;
-
+
file = _wfopen(szBuffer, L"rt");
if (!file)
return FALSE;
- }
+ }
hDlgCtrl = GetDlgItem(hDlg, IDC_LIST_BOX);
// http://www.catch22.net/software/winspy
// Copyright (c) 2002 by J Brown
//
-
+
//
// Copied from uxtheme.h
// If you have this new header, then delete these and
#define ETDT_USETABTEXTURE 0x00000004
#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
-//
+//
typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD);
//
if(hUXTheme)
{
- fnEnableThemeDialogTexture =
+ fnEnableThemeDialogTexture =
(ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture");
if(fnEnableThemeDialogTexture)
case WM_COMMAND:
- if (LOWORD(wParam) == IDOK)
+ if (LOWORD(wParam) == IDOK)
{
//MsConfig_OnSaveChanges();
}
InitCommonControlsEx(&InitControls);
hInst = hInstance;
-
+
DialogBox(hInst, (LPCTSTR)IDD_MSCONFIG_DIALOG, NULL, MsConfigWndProc);
-
+
return 0;
}
{
if (SHGetSpecialFolderPath(NULL, szTemp, ListItems_Locations[ListView_GetSelectionMark(hToolsListCtrl)], FALSE))
Ptr = PathAddBackslash(szTemp);
-
+
if (!Ptr)
Ptr = szTemp;
{
if (SHGetSpecialFolderPath(NULL, szTemp, ListItems_Locations[ListView_GetSelectionMark(hToolsListCtrl)], FALSE))
Ptr = PathAddBackslash(szTemp);
-
+
if (!Ptr)
Ptr = szTemp;
ListView_GetItemText(pSort->hList, iItem1, pSort->nClickedColumn, strItem1, MAX_VALUE_NAME);
ListView_GetItemText(pSort->hList, iItem2, pSort->nClickedColumn, strItem2, MAX_VALUE_NAME);
- // StrCmpLogicalW helps in comparing numbers intelligently, 10 is greater that 2, other
+ // StrCmpLogicalW helps in comparing numbers intelligently, 10 is greater that 2, other
// wise string comparison will always return 2 is greater that 10...
return ( pSort->bSortAsc ? StrCmpLogicalW(strItem1, strItem2) : StrCmpLogicalW(strItem2, strItem1) );
}
tvis.itemex.pszText = label;
tvis.itemex.cchTextMax = MAX_VALUE_NAME;
TreeView_GetItem(hTree, &tvis.itemex);
-
+
// 2- Now, copy to destination.
tvis.hParent = hParent;
tvis.hInsertAfter = hInsertAfter;
lpsz1 = szLine;
while (*lpsz1 == L' ' || *lpsz1 == L'\r' || *lpsz1 == L'\n')
++lpsz1;
-
+
/* Skip empty lines */
if (!*lpsz1)
continue;
MessageBox(hDlg, _T("Help not implemented yet!"), _T("Help"), MB_ICONINFORMATION | MB_OK);
return TRUE;
}
-
+
case PSN_KILLACTIVE: // Is going to lose activation.
{
// Changes are always valid of course.
SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
static LPCWSTR lpszIniFile = NULL;
-
+
if (message == WM_INITDIALOG)
lpszIniFile = (LPCWSTR)((LPPROPSHEETPAGE)lParam)->lParam;
{
bIsWindowsOS = TRUE;
}
-
+
return bIsWindowsOS;
}
<h1>Werkzeuge in Paint</h1>
<p>
-<b>Paint für ReactOS</b> stellt ihnen zum Bearbeiten ihrer Bilder zahlreiche <i>Werkzeuge</i> zur Verfügung. Um eines der
+<b>Paint für ReactOS</b> stellt ihnen zum Bearbeiten ihrer Bilder zahlreiche <i>Werkzeuge</i> zur Verfügung. Um eines der
-Werkzeuge auszuwählen, klicken Sie bitte auf das entsprechende Symbol im <i>Werkzeugkasten</i>, der sich üblicherweise
+Werkzeuge auszuwählen, klicken Sie bitte auf das entsprechende Symbol im <i>Werkzeugkasten</i>, der sich üblicherweise
-auf der linken Seite des Fensters befindet. Es folgt eine Auflistung der Ihnen zur Verfügung stehenden
+auf der linken Seite des Fensters befindet. Es folgt eine Auflistung der Ihnen zur Verfügung stehenden
Werkzeuge mit jeweils einer kurzen Beschreibung.
</p>
<th>Beschreibung</th></tr>
<tr><td align="center"><img src="freesel.png" alt=""></td>
-<td>Die <i>freie Auswahl</i> ermöglicht es Ihnen, einen beliebigen Bereich des Bildes auszuwählen. Drücken Sie
+<td>Die <i>freie Auswahl</i> ermöglicht es Ihnen, einen beliebigen Bereich des Bildes auszuwählen. Drücken Sie
-dazu im Bild die linke Maustaste und umfahren Sie mit der gedrückten Maustaste den Bereich, den Sie auswählen
+dazu im Bild die linke Maustaste und umfahren Sie mit der gedrückten Maustaste den Bereich, den Sie auswählen
-möchten. Wenn Sie die Maustaste nun loslassen wird der Bereich automatisch in eine geschlossene Auswahl
+möchten. Wenn Sie die Maustaste nun loslassen wird der Bereich automatisch in eine geschlossene Auswahl
umgewandelt.</td></tr>
<tr><td align="center"><img src="rectsel.png" alt=""></td>
-<td>Die <i>rechteckige Auswahl</i> ermöglicht es Ihnen, im Bild einen beliebigen rechteckigen Bereich
+<td>Die <i>rechteckige Auswahl</i> ermöglicht es Ihnen, im Bild einen beliebigen rechteckigen Bereich
-auszuwählen. Drücken Sie dazu im Bild die linke Maustaste und ziehen Sie die Maus zur diagonal
+auszuwählen. Drücken Sie dazu im Bild die linke Maustaste und ziehen Sie die Maus zur diagonal
-gegenüberliegenden Seite des gewünschten Rechtecks. Wenn Sie die Maustaste loslassen, erscheint sie soeben
+gegenüberliegenden Seite des gewünschten Rechtecks. Wenn Sie die Maustaste loslassen, erscheint sie soeben
erstellte Auswahl.</td></tr>
<tr><td align="center"><img src="rubber.png" alt=""></td>
-<td>Der <i>Radierer</i> erlaubt es Ihnen, mit der Hintergrundfarbe zu Malen, um Teile des Bildes zu löschen.
+<td>Der <i>Radierer</i> erlaubt es Ihnen, mit der Hintergrundfarbe zu Malen, um Teile des Bildes zu löschen.
-Möchten Sie das gesamte Bild löschen, verwenden Sie bitte den Menüeintrag <i>Bild löschen</i> im Menü
+Möchten Sie das gesamte Bild löschen, verwenden Sie bitte den Menüeintrag <i>Bild löschen</i> im Menü
<i>Bild</i>.*</td></tr>
ThumbYPos = 200;
UnitSetting = 0;
const WINDOWPLACEMENT DefaultWindowPlacement = {
- sizeof(WINDOWPLACEMENT),
+ sizeof(WINDOWPLACEMENT),
0,
SW_SHOWNORMAL,
{0, 0},
void CMainWindow::InsertSelectionFromHBITMAP(HBITMAP bitmap, HWND window)
{
- int width = GetDIBWidth(bitmap);
- int height = GetDIBHeight(bitmap);
+ int width = GetDIBWidth(bitmap);
+ int height = GetDIBHeight(bitmap);
int curWidth = imageModel.GetWidth();
int curHeight = imageModel.GetHeight();
shouldEnlarge = FALSE;
break;
case IDCANCEL:
- return;
+ return;
}
}
return 0;
}
- res = LoadString(hInst, uID, szTmp, byteSize);
+ res = LoadString(hInst, uID, szTmp, byteSize);
CharToOem(szTmp, szNode);
HeapFree(ProcessHeap, 0, szTmp);
return res;
if (ConTypeTmp == NULL)
return NULL;
-
+
ConType = (LPTSTR)HeapAlloc(ProcessHeap,
0,
dwDataSize);
/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS net command
+ * PROJECT: ReactOS net command
* PROGRAMMERS: Magnus Olsen (greatlord@reactos.org)
*/
case CLASS_ANY:
return ClassAny;
-
+
default:
return "Unknown";
}
}
LRESULT CALLBACK EDIT_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
+{
switch (msg)
{
case WM_KEYDOWN:
NULL);
SendMessageW(WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), 0);
-
+
for (int i = 0; i < (int)_countof(m_TypeStringID); i++)
{
ATL::CStringW szBuf;
szBuf.LoadStringW(m_TypeStringID[i]);
SendMessageW(CB_ADDSTRING, 0, (LPARAM)(LPCWSTR)szBuf);
}
-
+
SendMessageW(CB_SETCURSEL, m_DefaultSelectType, 0); // select the first item
return m_hWnd;
return FALSE;
}
-BOOL CApplicationView::CreateToolbar()
+BOOL CApplicationView::CreateToolbar()
{
m_Toolbar = new CMainToolbar();
m_Toolbar->m_VerticalAlignment = UiAlign_LeftTop;
return TRUE;
}
}
-
+
return FALSE;
}
bResult = TRUE;
}
// otherwise (AsyncInet->bCleanUp == TRUE)
- // AsyncInetAcquire will return FALSE.
+ // AsyncInetAcquire will return FALSE.
// In this case, any thread should no longer use this AsyncInet
LeaveCriticalSection(&(AsyncInet->CriticalSection));
{
bCleanUp = TRUE;
}
-
+
LeaveCriticalSection(&(AsyncInet->CriticalSection));
if (bCleanUp)
DownloadApplicationsDB(SettingsInfo.bUseSource ? SettingsInfo.szSourceURL : APPLICATION_DATABASE_URL,
!SettingsInfo.bUseSource);
-
- if (!ExtractFilesFromCab(m_Strings.szCabName,
+
+ if (!ExtractFilesFromCab(m_Strings.szCabName,
m_Strings.szCabDir,
m_Strings.szAppsPath))
{
* PROJECT: ReactOS Applications Manager
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Cabinet extraction using FDI API
- * COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez@reactos.org)
+ * COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez@reactos.org)
*/
#include "rapps.h"
#include <debug.h>
/*
* HACK: treat any input strings as Unicode (UTF-8)
- * cabinet.dll lacks any sort of a Unicode API, but FCI/FDI
+ * cabinet.dll lacks any sort of a Unicode API, but FCI/FDI
* provide an ability to use user-defined callbacks for any file or memory
* operations. This flexibility and the magic power of C/C++ casting allows
* us to treat input as we please.
NULL);
if (!sz)
return FALSE;
-
+
// do the actual conversion
sz = MultiByteToWideChar(CP_UTF8,
0,
WideToMultiByte(szNewFileName, szFilePathUTF8, CP_UTF8);
// Open the file
- iResult = fnFileOpen((LPSTR) szFilePathUTF8.GetString(),
+ iResult = fnFileOpen((LPSTR) szFilePathUTF8.GetString(),
_O_WRONLY | _O_CREAT,
0);
}
/* cabinet.dll FDI function pointers */
-typedef HFDI(*fnFDICreate)(PFNALLOC,
- PFNFREE,
- PFNOPEN,
- PFNREAD,
+typedef HFDI(*fnFDICreate)(PFNALLOC,
+ PFNFREE,
+ PFNOPEN,
+ PFNREAD,
PFNWRITE,
- PFNCLOSE,
- PFNSEEK,
- int,
+ PFNCLOSE,
+ PFNSEEK,
+ int,
PERF);
typedef BOOL(*fnFDICopy)(HFDI,
typedef BOOL(*fnFDIDestroy)(HFDI);
-/*
- * Extraction function
+/*
+ * Extraction function
* TODO: require only a full path to the cab as an argument
*/
-BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName,
- const ATL::CStringW& szCabDir,
+BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName,
+ const ATL::CStringW& szCabDir,
const ATL::CStringW& szOutputDir)
{
HINSTANCE hCabinetDll;
fnFDIDestroy pfnFDIDestroy;
BOOL bResult;
- // Load cabinet.dll and extract needed functions
+ // Load cabinet.dll and extract needed functions
hCabinetDll = LoadLibraryW(L"cabinet.dll");
if (!hCabinetDll)
// Create output dir
bResult = CreateDirectoryW(szOutputDir, NULL);
-
+
if (bResult || GetLastError() == ERROR_ALREADY_EXISTS)
{
// Convert wide strings to UTF-8
CInstalledApplicationInfo *InstalledApp = (CInstalledApplicationInfo *)m_ApplicationView->GetFocusedItemData();
if (!InstalledApp)
return FALSE;
-
+
LSTATUS Result = InstalledApp->RemoveFromRegistry();
if (Result != ERROR_SUCCESS)
{
if (wParam == SEARCH_TIMER_ID)
{
::KillTimer(hwnd, SEARCH_TIMER_ID);
-
+
UpdateApplicationsList(-1);
}
break;
// set the display type of application-view. this will remove all the item in application-view too.
m_ApplicationView->SetDisplayAppType(AppViewTypeInstalledApps);
- // enum installed softwares
+ // enum installed softwares
m_InstalledApps.Enum(EnumType, s_EnumInstalledAppProc, this);
}
else if (IsAvailableEnum(EnumType))
// set the display type of application-view. this will remove all the item in application-view too.
m_ApplicationView->SetDisplayAppType(AppViewTypeAvailableApps);
- // enum available softwares
+ // enum available softwares
m_AvailableApps.Enum(EnumType, s_EnumAvailableAppProc, this);
}
m_ApplicationView->SetRedraw(TRUE);
m_TreeView->AppendTabOrderWindow(direction, TabOrderHwndList);
m_ApplicationView->AppendTabOrderWindow(direction, TabOrderHwndList);
-
+
if (TabOrderHwndList.GetSize() == 0)
{
// in case the list is empty
ASYNCINET_CANCELLED, // wParam and lParam are not used.
// when receiving this, AsyncInet will be free soon and should not used anymore
- ASYNCINET_ERROR // wParam is not used. lParam specify the error code (if there is one).
+ ASYNCINET_ERROR // wParam is not used. lParam specify the error code (if there is one).
// when receiving this, AsyncInet will be free soon and should not used anymore
};
ATL::CSimpleArray<LCID> m_LanguageLCIDs;
ATL::CSimpleArray<ATL::CStringW> m_szScrnshotLocation;
ATL::CStringW m_szIconLocation;
- ATL::CStringW m_szPkgName; // software's package name.
+ ATL::CStringW m_szPkgName; // software's package name.
ULONG m_SizeBytes;
szKeyName.ReleaseBuffer();
RegCloseKey(hKey);
}
-
return TRUE;
}
URL_COMPONENTSW UrlComponmentInfo = { 0 };
UrlComponmentInfo.dwStructSize = sizeof(UrlComponmentInfo);
UrlComponmentInfo.dwSchemeLength = 1;
-
+
BOOL bSuccess = InternetCrackUrlW(Url, wcslen(Url), 0, &UrlComponmentInfo);
if(!bSuccess)
{
return FALSE;
}
-
+
switch(UrlComponmentInfo.nScheme)
{
case INTERNET_SCHEME_HTTP:
case INTERNET_SCHEME_FILE:
// supported
return TRUE;
-
+
default:
return FALSE;
}
EnableWindow(GetDlgItem(hDlg, IDC_PROXY_SERVER), FALSE);
EnableWindow(GetDlgItem(hDlg, IDC_NO_PROXY_FOR), FALSE);
}
-
+
CheckRadioButton(hDlg, IDC_SOURCE_DEFAULT, IDC_USE_SOURCE, Info->bUseSource ? IDC_USE_SOURCE : IDC_SOURCE_DEFAULT);
-
+
EnableWindow(GetDlgItem(hDlg, IDC_SOURCE_URL), Info->bUseSource);
SetWindowTextW(GetDlgItem(hDlg, IDC_SOURCE_URL), Info->szSourceURL);
NewSettingsInfo.bUseSource = FALSE;
EnableWindow(GetDlgItem(hDlg, IDC_SOURCE_URL), NewSettingsInfo.bUseSource);
break;
-
+
case IDC_USE_SOURCE:
NewSettingsInfo.bUseSource = TRUE;
EnableWindow(GetDlgItem(hDlg, IDC_SOURCE_URL), NewSettingsInfo.bUseSource);
break;
-
+
case IDC_PROXY_DEFAULT:
NewSettingsInfo.Proxy = 0;
EnableWindow(GetDlgItem(hDlg, IDC_PROXY_SERVER), FALSE);
break;
}
}
-
-
+
+
if(NewSettingsInfo.bUseSource && !IsUrlValid(szSource.GetString()))
{
ATL::CStringW szMsgText;
szMsgText.LoadStringW(IDS_URL_INVALID);
-
+
MessageBoxW(hDlg, szMsgText.GetString(), NULL, 0);
SetFocus(GetDlgItem(hDlg, IDC_SOURCE_URL));
break;
INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nShowCmd)
{
BOOL bIsFirstLaunch;
-
+
InitializeAtlModule(hInstance, TRUE);
InitializeGDIPlus(TRUE);
// parse cmd-line and perform the corresponding operation
BOOL bSuccess = ParseCmdAndExecute(GetCommandLineW(), bIsFirstLaunch, SW_SHOWNORMAL);
-
+
InitializeGDIPlus(FALSE);
InitializeAtlModule(GetModuleHandle(NULL), FALSE);
swprintf(fullPath, L"%s%s%s", rootName, keyPath[0]==L'\\'?L"":L"\\", keyPath);
else
fullPath = wcscpy(fullPath, rootName);
-
+
SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath);
SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)fullPath);
HeapFree(GetProcessHeap(), 0, fullPath);
case WM_NOTIFY:
if (g_pChildWnd == NULL) break;
-
+
if (((LPNMHDR)lParam)->idFrom == TREE_WINDOW)
{
if (!TreeWndNotifyProc(g_pChildWnd->hListWnd, wParam, lParam, &Result))
{
goto def;
}
-
+
return Result;
}
else
{
goto def;
}
- }
+ }
break;
case WM_CONTEXTMENU:
}
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
-{
+{
UNREFERENCED_PARAMETER(wParam);
*Result = TRUE;
-
+
switch (((LPNMHDR)lParam)->code)
{
case TVN_ITEMEXPANDING:
*Result = !OnTreeExpanding(g_pChildWnd->hTreeWnd, (NMTREEVIEW*)lParam);
return TRUE;
- case TVN_SELCHANGED:
+ case TVN_SELCHANGED:
{
NMTREEVIEW* pnmtv = (NMTREEVIEW*)lParam;
/* Get the parent of the current item */
EnableMenuItem(hMenuFrame , ID_EDIT_DELETE, MF_BYCOMMAND | MF_GRAYED);
EnableMenuItem(hMenuFrame , ID_EDIT_RENAME, MF_BYCOMMAND | MF_GRAYED);
EnableMenuItem(hPopupMenus, ID_TREE_DELETE, MF_BYCOMMAND | MF_GRAYED);
- EnableMenuItem(hPopupMenus, ID_TREE_RENAME, MF_BYCOMMAND | MF_GRAYED);
+ EnableMenuItem(hPopupMenus, ID_TREE_RENAME, MF_BYCOMMAND | MF_GRAYED);
}
else
{
return TRUE;
}
case TVN_ENDLABELEDIT:
- {
+ {
LPCWSTR keyPath;
HKEY hRootKey;
HKEY hKey = NULL;
0, 0, rcClient.right, rcClient.bottom,
hwndParent, id, hInst, NULL);
if (!hwndTV) return NULL;
-
+
/* Initialize the image list, and add items to the control. */
if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName))
{
* PROJECT: ReactOS Services
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/applications/sc/depend.c
- * PURPOSE:
+ * PURPOSE:
* COPYRIGHT: Copyright 2016 Eric Kohl
*
*/
* PROJECT: ReactOS Services
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/applications/sc/name.c
- * PURPOSE:
+ * PURPOSE:
* COPYRIGHT: Copyright 2016 Eric Kohl
*
*/
}
// Handles Window Resizing
-GLvoid ReSizeGLScene(GLsizei Width, GLsizei Height)
+GLvoid ReSizeGLScene(GLsizei Width, GLsizei Height)
{
// Is Window Too Small (Divide By Zero Error)
if (Height == 0)
}
case WM_PAINT:
{
- BITMAP bm; /* Bitmap structure as seen in bmWidth & bmHeight */
- PAINTSTRUCT ps;
+ BITMAP bm; /* Bitmap structure as seen in bmWidth & bmHeight */
+ PAINTSTRUCT ps;
HDC hdc;
HDC hdcMem;
HBITMAP hbmOld;
// Obtain window coordinates.
GetClientRect (hWnd, &rect);
- hdc = BeginPaint(hWnd, &ps);
- hdcMem = CreateCompatibleDC(hdc);
- hbmOld = SelectObject(hdcMem, bitmap);
+ hdc = BeginPaint(hWnd, &ps);
+ hdcMem = CreateCompatibleDC(hdc);
+ hbmOld = SelectObject(hdcMem, bitmap);
GetObject(bitmap, sizeof(bm), &bm);
else
{
BitBlt(
- hdc,
+ hdc,
RANDOM (0, rect.right - bm.bmWidth),
RANDOM (0, rect.bottom - bm.bmHeight),
- bm.bmWidth,
- bm.bmHeight,
- hdcMem,
- 0,
- 0,
- SRCCOPY);
+ bm.bmWidth,
+ bm.bmHeight,
+ hdcMem,
+ 0,
+ 0,
+ SRCCOPY);
}
- SelectObject(hdcMem, hbmOld);
- DeleteDC(hdcMem);
+ SelectObject(hdcMem, hbmOld);
+ DeleteDC(hdcMem);
EndPaint(hWnd, &ps);
break;
goto end;
}
}
-
+
// Full path to sdbinst.exe
hres = StringCchCatW(sdbinstPath, MAX_PATH, L"System32\\sdbinst.exe");
if (FAILED(hres))
goto end;
}
- // Uninstall full string
+ // Uninstall full string
hres = StringCchPrintfW(uninstString, MAX_PATH, L"%ls -u \"%ls\"", sdbinstPath, sdbInstalledPath);
if (FAILED(hres))
{
TAGID prevTagLayer = 0;
TAGID tagLayer = SdbFindFirstTag(pdb, tagDb, TAG_LAYER);
-
+
// Add all layers to registry (AppCompatFlags)
while (tagLayer && (tagLayer != prevTagLayer))
{
}
// Get database GUID
- if (!GetSdbGuid(pdb, tagDb, &dbGuid))
+ if (!GetSdbGuid(pdb, tagDb, &dbGuid))
{
wprintf(L"GetSdbGuid error\n");
goto end;
wprintf(L"Can't get tag name\n");
goto end;
}
-
+
LPWSTR dbName = SdbGetStringTagPtr(pdb, tagDbName);
wprintf(L"Database name %ls\n", dbName);
}
res = SdbUninstall(dbPath);
-
+
end:
if (hKey)
{
LSTATUS status;
HKEY hKey = NULL;
HKEY subKey = NULL;
- DWORD index = 0;
+ DWORD index = 0;
WCHAR keyName[MAX_PATH];
DWORD keyNameLen = ARRAYSIZE(keyName);
DWORD keyValSize;
++index;
keyNameLen = ARRAYSIZE(keyName);
- status = RegEnumKeyExW(hKey, index, keyName, &keyNameLen, NULL, NULL, NULL, NULL);
+ status = RegEnumKeyExW(hKey, index, keyName, &keyNameLen, NULL, NULL, NULL, NULL);
}
RegCloseKey(hKey);
ShowHelp();
}
- for (int i = 1; i < argc; ++i)
+ for (int i = 1; i < argc; ++i)
{
if (argv[i][0] != L'-')
{
default:
return FALSE;
}
-
+
return TRUE;
}
if (index+1 >= argc)
return ERROR_INVALID_DATA;
pOpts->shutdown_delay = _wtoi(argv[index+1]);
- if (pOpts->shutdown_delay > 0)
+ if (pOpts->shutdown_delay > 0)
pOpts->force = TRUE;
index++;
break;
/*
* If the user wants to hibernate the computer. Assume
- * that the user wants to wake the computer up from
+ * that the user wants to wake the computer up from
* hibernation and it should not force it on the system.
*/
if (opts.hibernate)
if (IsPwrHibernateAllowed())
{
EnablePrivilege(SE_SHUTDOWN_NAME, TRUE);
-
+
/* The shutdown utility cannot hibernate remote systems */
if (opts.remote_system != NULL)
{
return EXIT_FAILURE;
}
-
+
if (!SetSuspendState(TRUE, FALSE, FALSE))
{
ConResPuts(StdErr, IDS_ERROR_HIBERNATE);
ConResPuts(StdErr, IDS_ERROR_RESTART);
else
ConResPuts(StdErr, IDS_ERROR_SHUTDOWN);
-
+
DisplayError(GetLastError());
return EXIT_FAILURE;
}
/* Protected Functions */
-void
+void
audio_membuffer::alloc_mem_(unsigned int bytes)
{
/* Some checking */
buffer_resized(new_size);
}
-void
+void
audio_membuffer::truncate_(void)
{
/* If `buf_size' is already = to the `bytes_received' of audio data,
bytes_received = 0;
}
-void
+void
audio_membuffer::reset(void)
{
/* Frees memory and reset to initial state */
alloc_mem_(init_size);
}
-void
+void
audio_membuffer::alloc_bytes(unsigned int bytes)
{
alloc_mem_(bytes);
}
-void
+void
audio_membuffer::alloc_seconds(unsigned int secs)
{
alloc_mem_(aud_info.byte_rate() * secs);
}
-void
+void
audio_membuffer::alloc_seconds(float secs)
{
alloc_mem_((unsigned int)((float)aud_info.byte_rate() * secs));
}
-void
+void
audio_membuffer::resize_bytes(unsigned int bytes)
{
resize_mem_(bytes);
}
-void
+void
audio_membuffer::resize_seconds(unsigned int secs)
{
resize_mem_(aud_info.byte_rate() * secs);
}
-void
+void
audio_membuffer::resize_seconds(float secs)
{
resize_mem_((unsigned int)((float)aud_info.byte_rate() * secs));
/* Inherited Functions */
-void
+void
audio_membuffer::audio_receive(unsigned char *data, unsigned int size)
{
/* If there isn't a buffer, allocs memory for it of size*2, and copies audio data arrival */
audio_arrival(aud_info.samples_in_bytes(size));
}
-unsigned int
+unsigned int
audio_membuffer::read(BYTE *out_buf, unsigned int bytes)
{
/* Some checking */
wformat_src.cbSize = sizeof(WAVEFORMATEX);
wformat_dst.cbSize = sizeof(WAVEFORMATEX);
- /* Setting WAVEFORMATEX structure parameters
+ /* Setting WAVEFORMATEX structure parameters
according to `audio_format' in/out classes */
wformat_src.wFormatTag = WAVE_FORMAT_PCM;
/* ACM sream successfully closed */
}
-void
+void
audio_resampler_acm::audio_receive(unsigned char *data, unsigned int size)
{
MMRESULT err;
mb_size = tot_size;
}
-void
+void
audio_wavein::free_buffers_mem_(void)
{
/* Frees memory */
wave_headers = 0;
}
-void
+void
audio_wavein::init_headers_(void)
{
/* If there is no memory for memory or headers, simply return */
}
}
-void
+void
audio_wavein::prep_headers_(void)
{
MMRESULT err;
MessageBox(0, TEXT("waveInPrepareHeader Error."), 0, 0);
}
-void
+void
audio_wavein::unprep_headers_(void)
{
MMRESULT err;
MessageBox(0, TEXT("waveInUnPrepareHeader Error."), 0, 0);
}
-void
+void
audio_wavein::add_buffers_to_driver_(void)
{
MMRESULT err;
}
void
-audio_wavein::close(void)
+audio_wavein::close(void)
{
/* If wavein object is already in the status NOTREADY, nothing to do */
if (status == WAVEIN_NOTREADY)
status = WAVEIN_STOP;
}
-DWORD WINAPI
+DWORD WINAPI
audio_wavein::recording_procedure(LPVOID arg)
{
MSG msg;
return;
/* Set seconds length for each buffer */
- buf_secs = bsecs;
+ buf_secs = bsecs;
}
unsigned int total_buffers(void) const
svalue = (unsigned int)abs(*((short *)(main_buffer + aud_info.bytes_in_samples(nsamp))));
else if (aud_info.bits() == 8)
svalue = (unsigned int)((ptrdiff_t) *(main_buffer + aud_info.bytes_in_samples(nsamp)));
- else
+ else
svalue = 0;
return svalue;
status = WAVEOUT_NOTREADY;
}
-void
+void
audio_waveout::alloc_buffers_mem_(unsigned int buffs, float secs)
{
unsigned int onebuf_size = 0, tot_size = 0;
delete[] wave_headers;
/* Calcs size of the buffers */
- onebuf_size = (unsigned int)((float)aud_info.byte_rate() * secs);
+ onebuf_size = (unsigned int)((float)aud_info.byte_rate() * secs);
tot_size = onebuf_size * buffs;
/* Allocs memory for the audio buffers */
main_buffer = new BYTE[tot_size];
mb_size = tot_size;
}
-void
+void
audio_waveout::init_headers_(void)
{
/* If there is no memory for memory or headers, simply return */
}
}
-void
+void
audio_waveout::prep_headers_(void)
{
MMRESULT err;
}
}
-void
+void
audio_waveout::unprep_headers_(void)
{
MMRESULT err;
}
}
-void
+void
audio_waveout::free_buffers_mem_(void)
{
/* Frees memory */
wave_headers = 0;
}
-void
+void
audio_waveout::open(void)
{
MMRESULT err;
status = WAVEOUT_READY;
}
-void
+void
audio_waveout::play(void)
{
MMRESULT err;
}
}
-void
+void
audio_waveout::pause(void)
{
MMRESULT err;
}
}
-void
+void
audio_waveout::stop(void)
{
MMRESULT err;
free_buffers_mem_();
}
-DWORD WINAPI
+DWORD WINAPI
audio_waveout::playing_procedure(LPVOID arg)
{
MSG msg;
return (unsigned int)65535;
else if (aud_info.bits() == 8)
return (unsigned int)255;
- else
+ else
return 0;
}
svalue = (unsigned int)abs(*((short *)(main_buffer + aud_info.bytes_in_samples(nsamp))));
else if (aud_info.bits() == 8)
svalue = (unsigned int)((ptrdiff_t) *(main_buffer + aud_info.bytes_in_samples(nsamp)));
- else
+ else
svalue = 0;
return svalue;
/* Cache the Y coordinate point */
PrefContext->MixerWindow->WndPosY = dwData;
-
+
RegCloseKey(hKey);
return TRUE;
}
LONG lResult;
TCHAR DeviceMixerSettings[256];
WINDOWPLACEMENT wp;
-
+
/* Get the placement coordinate data from the window */
wp.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(hWnd, &wp);
}
}
-static
+static
VOID
WriteLineSettings(PPREFERENCES_CONTEXT Context, HWND hwndDlg)
{
IDCANCEL);
break;
}
-
+
case WM_SYSCOLORCHANGE:
{
HWND hwndControls;
-
+
/* Forward WM_SYSCOLORCHANGE */
hwndControls = GetDlgItem(hwndDlg, IDC_CONTROLS);
SendMessage(hwndControls, WM_SYSCOLORCHANGE, 0, 0);
hWnd = CreateWindowEx(WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT,
SZ_APP_CLASS,
lpAppTitle,
- WS_DLGFRAME | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE,
+ WS_DLGFRAME | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE,
0, 0, 300, 315,
NULL,
LoadMenu(hAppInstance,
}
/* Select first item if any */
- if ((ListView_GetNextItem(hApplicationPageListCtrl, -1, LVNI_FOCUSED | LVNI_SELECTED) == -1) &&
+ if ((ListView_GetNextItem(hApplicationPageListCtrl, -1, LVNI_FOCUSED | LVNI_SELECTED) == -1) &&
(ListView_GetItemCount(hApplicationPageListCtrl) > 0) && !bApplicationPageSelectionMade)
{
ListView_SetItemState(hApplicationPageListCtrl, 0, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
SendMessage(hProcessPageListCtrl, WM_SETREDRAW, TRUE, 0);
/* Select first item if any */
- if ((ListView_GetNextItem(hProcessPageListCtrl, -1, LVNI_FOCUSED | LVNI_SELECTED) == -1) &&
+ if ((ListView_GetNextItem(hProcessPageListCtrl, -1, LVNI_FOCUSED | LVNI_SELECTED) == -1) &&
(ListView_GetItemCount(hProcessPageListCtrl) > 0) && !bProcessPageSelectionMade)
{
ListView_SetItemState(hProcessPageListCtrl, 0, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
*/
}
-BOOL ProcessRunning(ULONG ProcessId)
+BOOL ProcessRunning(ULONG ProcessId)
{
HANDLE hProcess;
DWORD exitCode;
// http://www.catch22.net/software/winspy
// Copyright (c) 2002 by J Brown
//
-
+
//
// Copied from uxtheme.h
// If you have this new header, then delete these and
#define ETDT_USETABTEXTURE 0x00000004
#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
-//
+//
typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD);
//
if(hUXTheme)
{
- fnEnableThemeDialogTexture =
+ fnEnableThemeDialogTexture =
(ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture");
if(fnEnableThemeDialogTexture)
/* Refresh the list */
ListBoxRefreshContents();
-
+
/* Create a timer, we'll use it to control the state of our items in the listbox */
Globals.iTimer = SetTimer(hDlg, 0, 400, NULL);
'T','A','B','L','E','\0'};
InitCommonControlsEx(&classes);
-
+
switch (GetUserDefaultUILanguage())
{
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
This file appears to contain a list of devices that WinMM accesses and
subsequently passes to wdmaud.drv
-It is not necessary to duplicate the exact structure of this mapped
+It is not necessary to duplicate the exact structure of this mapped
file, since it appears to only be used internally by Windows components.
-The ROS Audio Service (AudioSrv) is intended to be able to run
-alongside the Windows Audio Service on XP/Vista, so it should be
+The ROS Audio Service (AudioSrv) is intended to be able to run
+alongside the Windows Audio Service on XP/Vista, so it should be
possible to test in a "known working environment" ;)
It will create a mutex, to:
1) Allow synchronization when accessing the device list
2) Provide a simple method of identifying if AudioSrv is running
-(It might be worth using an event to notify WinMM when things are
+(It might be worth using an event to notify WinMM when things are
happening?)
-The intention is to make AudioSrv receive PnP notifications for
-relevant audio devices, and also let AudioSrv in Windows do this. Then
-it should be possible to create a small application that imitates
+The intention is to make AudioSrv receive PnP notifications for
+relevant audio devices, and also let AudioSrv in Windows do this. Then
+it should be possible to create a small application that imitates
WinMM's actions :)
if (audio_device_list->size + device_info_size > audio_device_list->max_size)
{
/*printf("max_size would be exceeded! Failing...\n");*/
-
+
UnlockAudioDeviceList();
-
+
return FALSE;
}
include_directories(include)
spec2def(dhcpcsvc.dll dhcpcsvc.spec ADD_IMPORTLIB)
-list(APPEND SOURCE
+list(APPEND SOURCE
dhcp/adapter.c
dhcp/alloc.c
dhcp/api.c
{
/* DHCP enabled by default */
DhcpEnabled = 1;
- }
+ }
if( !DhcpEnabled ) {
/* Non-automatic case */
if (Adapter->DhclientInfo.client->state != S_BOUND &&
Adapter->DhclientInfo.client->state != S_STATIC)
return FALSE;
-
+
ApiUnlock();
Orig = AdapterInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(IP_ADAPTER_INFO));
socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
if (DhcpSocket != INVALID_SOCKET) {
-
+
/* Allow broadcast on this socket */
Broadcast = 1;
setsockopt(DhcpSocket,
SO_BROADCAST,
(const char *)&Broadcast,
sizeof(Broadcast));
-
+
Adapter->ListenAddr.sin_family = AF_INET;
Adapter->ListenAddr.sin_port = htons(LOCAL_PORT);
Adapter->BindStatus =
DeleteIpForwardEntry( &Adapter->RouterMib );
Adapter->RouterMib.dwForwardNextHop = 0;
}
-
+
Adapter->DhclientState.state = S_STATIC;
proto = find_protocol_by_adapter( &Adapter->DhclientInfo );
if (proto)
}
/* Change the pipe into message mode */
- PipeMode = PIPE_READMODE_MESSAGE;
+ PipeMode = PIPE_READMODE_MESSAGE;
if (!SetNamedPipeHandleState(PipeHandle, &PipeMode, NULL, NULL))
{
/* Mode change failed */
DeleteCriticalSection(&DnsCache.Lock);
DnsCacheInitialized = FALSE;
}
-
+
VOID
DnsIntCacheRemoveEntryItem(PRESOLVER_CACHE_ENTRY CacheEntry)
{
/* Remove the entry from the list */
RemoveEntryList(&CacheEntry->CacheLink);
-
+
/* Free record */
DnsRecordListFree(CacheEntry->Record, DnsFreeRecordList);
add_rpc_files(server
${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine/epm.idl
${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine/irot.idl)
-
+
list(APPEND SOURCE
epmp.c
* PROGRAMMER: Giannis Adamopoulos
*/
-/*
- * NOTE:
- * ThemeWaitForServiceReady and ThemeWatchForStart are called from msgina
+/*
+ * NOTE:
+ * ThemeWaitForServiceReady and ThemeWatchForStart are called from msgina
* so all the functions in this file run in the context of winlogon
*/
/* FUNCTIONS *****************************************************************/
-static
+static
HANDLE
GetThemeServiceProcessHandle(VOID)
{
break;
}
- if (GetTickCount() - start_time > dwTimeout)
+ if (GetTickCount() - start_time > dwTimeout)
{
break;
}
/* Allocate an SD large enough to hold the SIDs for the above */
dwAlignLength = ALIGN_UP(dwUserLength, ULONG);
pSd = (PISECURITY_DESCRIPTOR)MemAlloc(0,
- dwAlignLength +
+ dwAlignLength +
dwGroupLength +
sizeof(*pSd));
if (pSd == NULL) return ERROR_OUTOFMEMORY;
INT readBytes;
INT retVal;
- do
+ do
{
readBytes = recv(sock, readBuffer, RECV_BUF, 0);
if (readBytes > 0)
{
DWORD dwSize = GetFileSize(hFile, NULL);
lpQuotes = (LPSTR)HeapAlloc(GetProcessHeap(), 0, dwSize + 1);
- if (!lpQuotes)
+ if (!lpQuotes)
{
CloseHandle(hFile);
return FALSE;
0);
if (ret != CR_SUCCESS)
ulCapabilities = 0;
-
+
if (ulCapabilities & CM_DEVCAP_REMOVABLE)
*pulStatus |= DN_REMOVABLE;
RPC_STATUS Status;
InitializeListHead(&WlanSvcHandleListHead);
-
+
Status = RpcServerUseProtseqEpW(L"ncalrpc", 20, L"wlansvc", NULL);
if (Status != RPC_S_OK)
{
if (dwClientVersion > 2)
dwClientVersion = 2;
-
+
if (dwClientVersion < 1)
dwClientVersion = 1;
-
+
lpWlanSvcHandle->dwClientVersion = dwClientVersion;
*pdwNegotiatedVersion = dwClientVersion;
-
+
InsertTailList(&WlanSvcHandleListHead, &lpWlanSvcHandle->WlanSvcHandleListEntry);
*phClientHandle = lpWlanSvcHandle;
{
return ERROR_INVALID_HANDLE;
}
-
+
/*
DWORD dwBytesReturned;
HANDLE hDevice;
UNREFERENCED_PARAMETER(argv);
DPRINT("WU ServiceMain() called\n");
-
+
ServiceStatusHandle = RegisterServiceCtrlHandlerExW(ServiceName,
ServiceControlHandler,
NULL);
{
6,
12,
- "Zuzentzaile funtzioak ez daude artean ezarrita.",
+ "Zuzentzaile funtzioak ez daude artean ezarrita.",
TEXT_STYLE_NORMAL,
TEXT_ID_STATIC
},
CONSOLE_NormalTextXY(8, Line, 60, 1);
Line = 15;
-
+
CONSOLE_InvertTextXY(8, Line, 60, 1);
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
* Calls InstallVBRToPartition() if VBR installation is chosen.
* Otherwise both InstallVBRToPartition() and InstallMbrBootCodeToDisk()
* are called if both MBR and VBR installation is chosen.
- *
+ *
* RETURNS
* Number of the next page.
*/
char *mem; /* batchfile content in memory */
DWORD memsize; /* size of batchfile */
DWORD mempos; /* current position to read from */
- BOOL memfree; /* true if it need to be freed when exitbatch is called */
+ BOOL memfree; /* true if it need to be freed when exitbatch is called */
TCHAR BatchFilePath[MAX_PATH];
LPTSTR params;
LPTSTR raw_params; /* Holds the raw params given by the input */
}
else
if ( _wcsnicmp(DeviceName, DosLPTDevice, 3) == 0 ||
- _wcsnicmp(DeviceName, DosCOMDevice, 3) == 0 ||
+ _wcsnicmp(DeviceName, DosCOMDevice, 3) == 0 ||
_wcsnicmp(DeviceName, DosPRNDevice, 3) == 0 ||
_wcsnicmp(DeviceName, DosAUXDevice, 3) == 0 ||
_wcsnicmp(DeviceName, DosNULDevice, 3) == 0 )
General Overview of How Things Work
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-First it comes into _main in cmd.c(1811). The command line params are taking in and if it is unicode it uses CommandLineToArgvW.
-This can cause a problem on older machines and that is why we have our own custom _CommandLineToArgvW to help this along.
-We pull in the launch directory as the initial dir and set that in _tchdir. We make a handle to the default console out using CreateFile.
+First it comes into _main in cmd.c(1811). The command line params are taking in and if it is unicode it uses CommandLineToArgvW.
+This can cause a problem on older machines and that is why we have our own custom _CommandLineToArgvW to help this along.
+We pull in the launch directory as the initial dir and set that in _tchdir. We make a handle to the default console out using CreateFile.
-Then we call Initialize(). Here we need to load ntdll.dll if it isn't loaded (windows 9x machines).
-We also setup some global vars like default io handles and nErrorLevel and set %prompt% to $P$G.
+Then we call Initialize(). Here we need to load ntdll.dll if it isn't loaded (windows 9x machines).
+We also setup some global vars like default io handles and nErrorLevel and set %prompt% to $P$G.
This is where all command lines switches given to cmd on startup are done.
-From here main calls ProcessInput(). This is where cmd loops for getting input and doing the commands.
-First it checks to see if there is a batch file(note: there is a global struct "bc" which is NULL when not processing a batch file)
-and if there is it will pull a new line from that file. If not, then it will wait for input.
-Currently there is some stuff for set /a in there, which might stay there or see if we can find a better spot.
-
-Once there is input taken in from the command line it is sent into ParseCommandLine().
-In here we fist check for aliases and convert if need be.
-Then we look for redirections using GetRedirection() which will remove any redirection symbols.
-and pass back info about where to redirect.
-from this info it will do some switching around with the handles for where things go and send them as need be.
-personally i dont like this code and i tried to change it before but failed.
+From here main calls ProcessInput(). This is where cmd loops for getting input and doing the commands.
+First it checks to see if there is a batch file(note: there is a global struct "bc" which is NULL when not processing a batch file)
+and if there is it will pull a new line from that file. If not, then it will wait for input.
+Currently there is some stuff for set /a in there, which might stay there or see if we can find a better spot.
+
+Once there is input taken in from the command line it is sent into ParseCommandLine().
+In here we fist check for aliases and convert if need be.
+Then we look for redirections using GetRedirection() which will remove any redirection symbols.
+and pass back info about where to redirect.
+from this info it will do some switching around with the handles for where things go and send them as need be.
+personally i dont like this code and i tried to change it before but failed.
it is confusing to me and i dont understand why a lot of it is there but apparently it is needed.
-It sends the new string without any redirection info into DoCommand(). In this function we just look to see what should be done.
-There is one of 2 things that could happen.
-1) we fnd the matching command and send it off to that commands little section.
+It sends the new string without any redirection info into DoCommand(). In this function we just look to see what should be done.
+There is one of 2 things that could happen.
+1) we fnd the matching command and send it off to that commands little section.
2) we dont find it so we send it to Execute() and see if it is a file that we can do something.
-Execute will try to launch the file using createprocess and falls back on shellexecute.
+Execute will try to launch the file using createprocess and falls back on shellexecute.
It calls a function called SearchForExecutable() to find the full path name and looks in all the correct locations like PATH,
current folder, windows folder. If it cant find it, just fails and prints out a message.
Made by Vicmarcal 23/11/08
-THIS FILE HELPS TO EXPLAIN HOW REN IS NOW IMPLEMENTED.
+THIS FILE HELPS TO EXPLAIN HOW REN IS NOW IMPLEMENTED.
****************************************************************
(Please change or add latest modifications)
****************************************************************
rename command will change the name of hello.txt->hi.txt. We have to be sure that both paths(c:\ie\ ) be the same.Since rename cant move files within Directories (MSDN).
WAY #2:Semi Path Way:
-ren c:\ie\hello.txt hi.txt
+ren c:\ie\hello.txt hi.txt
This is a special feature,since this does the same as Way #1 but without telling the Destiny path.So this feature must be implemented also.
Explaining code:
-srcPattern: here is stored Source Argument (C:\ie\hello.txt)
+srcPattern: here is stored Source Argument (C:\ie\hello.txt)
srcPath: here is stored Source Path(C:\ie)
srcFILE: here is stored FILE name(hello.txt)
dstPath: here is stored Destiny Path(C:\i)
dstFILE: here is stored FILE re-name(hi.txt)
-1)We begin retrieving arguments from command line and fulfilling dstPattern and srcPattern
+1)We begin retrieving arguments from command line and fulfilling dstPattern and srcPattern
2)If srcPattern contains "\" then:
switch(Message)
{
case WM_INITDIALOG:
-
+
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam))
* explorer.c
*/
-static inline
+static inline
LONG
SetWindowStyle(IN HWND hWnd,
IN LONG dwStyleMask,
/*
* startmnucust.cpp
*/
-VOID
+VOID
ShowCustomizeClassic(HINSTANCE, HWND);
/*
* startmnusite.cpp
*/
-HRESULT
+HRESULT
CStartMenuSite_CreateInstance(IN OUT ITrayWindow *Tray, const IID & riid, PVOID * ppv);
/*
/* Customize Notifications Dialog */
#define IDC_TASKBARPROP_NOTIREST 1402
-#define IDC_NOTIFICATION_LIST 1005
+#define IDC_NOTIFICATION_LIST 1005
#define IDC_NOTIFICATION_BEHAVIOUR 1006
/* Customize classic start menu dialog */
cbSize = sizeof(dwValue);
dwRet = SHGetValueW(hkExplorer, L"Advanced", L"TaskbarSizeMove", NULL, &dwValue, &cbSize);
bLock = (dwRet == ERROR_SUCCESS) ? (dwValue == 0) : TRUE;
-
+
dwRet = SHGetValueW(hkExplorer, L"Advanced", L"ShowSeconds", NULL, &dwValue, &cbSize);
bShowSeconds = (dwRet == ERROR_SUCCESS) ? (dwValue != 0) : FALSE;
return S_OK;
}
- virtual HRESULT STDMETHODCALLTYPE
+ virtual HRESULT STDMETHODCALLTYPE
GetCommandString(UINT_PTR idCmd,
UINT uType,
UINT *pwReserved,
bool CIconWatcher::RemoveIconFromWatcher(_In_ CONST NOTIFYICONDATA *iconData)
{
EnterCriticalSection(&m_ListLock);
-
+
IconWatcherData *Icon;
Icon = GetListEntry(iconData, NULL, true);
InternalIconData * notifyItem;
WCHAR text[] = L"";
- TRACE("Adding icon %d from hWnd %08x flags%s%s state%s%s",
+ TRACE("Adding icon %d from hWnd %08x flags%s%s state%s%s",
iconData->uID, iconData->hWnd,
(iconData->uFlags & NIF_ICON) ? " ICON" : "",
(iconData->uFlags & NIF_STATE) ? " STATE" : "",
SetWindowTheme(m_hWnd, L"TrayNotify", NULL);
- m_ImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 1000);
+ m_ImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 1000);
SetImageList(m_ImageList);
TBMETRICS tbm = {sizeof(tbm)};
HWND hWndTop = GetAncestor(m_hWnd, GA_ROOT);
m_Balloons.Create(hWndTop, TTS_NOPREFIX | TTS_BALLOON | TTS_CLOSE);
-
+
TOOLINFOW ti = { 0 };
ti.cbSize = TTTOOLINFOW_V1_SIZE;
ti.uFlags = TTF_TRACK | TTF_IDISHWND;
void CSysPagerWnd::GetSize(IN BOOL IsHorizontal, IN PSIZE size)
{
/* Get the ideal height or width */
-#if 0
+#if 0
/* Unfortunately this doens't work correctly in ros */
Toolbar.GetIdealSize(!IsHorizontal, size);
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(
LPCRECT prcBorder,
IUnknown *punkToolbarSite,
- BOOL fReserved)
+ BOOL fReserved)
{
/* No need to implement this method */
return E_NOTIMPL;
}
/*****************************************************************************/
-
+
virtual HRESULT STDMETHODCALLTYPE SetClient(
IN IUnknown *punkClient)
{
}
else
{
- /* We don't need to set a font here, our parent will use
+ /* We don't need to set a font here, our parent will use
* WM_SETFONT to set the right one when themes are not enabled. */
textColor = RGB(0, 0, 0);
}
class CTaskBarSettingsPage : public CPropertyPageImpl<CTaskBarSettingsPage>
{
-private:
+private:
HBITMAP m_hbmpTaskbar;
HBITMAP m_hbmpTray;
HWND m_hwndTaskbar;
uImageId = IDB_TASKBARPROP_NOLOCK_NOGROUP_QL;
else if (!bLock && bGroup && bShowQL)
uImageId = IDB_TASKBARPROP_NOLOCK_GROUP_QL;
- else
+ else
ASSERT(FALSE);
SetBitmap(hwndTaskbarBitmap, &m_hbmpTaskbar, uImageId);
uImageId = IDB_SYSTRAYPROP_SHOW_CLOCK;
else if (!bHideInactive && !bShowClock)
uImageId = IDB_SYSTRAYPROP_SHOW_NOCLOCK;
- else
+ else
ASSERT(FALSE);
SetBitmap(hwndTrayBitmap, &m_hbmpTray, uImageId);
m_hwndTaskbar(hwnd)
{
}
-
+
~CTaskBarSettingsPage()
{
if (m_hbmpTaskbar)
class CStartMenuSettingsPage : public CPropertyPageImpl<CStartMenuSettingsPage>
{
-private:
+private:
HBITMAP m_hbmpStartBitmap;
void UpdateDialog()
// fix me: start menu style (classic/modern) should be read somewhere from the registry.
CheckDlgButton(IDC_TASKBARPROP_STARTMENUCLASSIC, BST_CHECKED); // HACK: This has to be read from registry!!!!!!!
UpdateDialog();
-
+
return TRUE;
}
CTaskBarSettingsPage tbSettingsPage(hwndTaskbar);
CStartMenuSettingsPage smSettingsPage;
CStringW caption;
-
+
caption.LoadStringW(IDS_TASKBAR_STARTMENU_PROP_CAPTION);
-
+
hpsp[0] = tbSettingsPage.Create();
hpsp[1] = smSettingsPage.Create();
if (SUCCEEDED(hr))
{
CATID catid = CATID_DeskBand;
- hr = pcr->RegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid);
+ hr = pcr->RegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid);
}
return hr;
}
if (SUCCEEDED(hr))
{
CATID catid = CATID_DeskBand;
- hr = pcr->UnRegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid);
+ hr = pcr->UnRegisterClassImplCategories(CLSID_QuickLaunchBand, 1, &catid);
}
return hr;
}
LPITEMIDLIST PidlBrowse(HWND hwnd, int nCSIDL)
{
CComHeapPtr<ITEMIDLIST> pidlRoot;
-
+
WCHAR path[MAX_PATH];
if (nCSIDL)
{
SHGetSpecialFolderLocation(hwnd, nCSIDL, &pidlRoot);
- }
+ }
BROWSEINFO bi = { hwnd, pidlRoot, path, L"Choose a folder", 0, NULL, 0, 0 };
- LPITEMIDLIST pidlSelected = SHBrowseForFolder(&bi);
+ LPITEMIDLIST pidlSelected = SHBrowseForFolder(&bi);
return pidlSelected;
}
if (pidl == NULL)
return E_FAIL;
pISFB->InitializeSFB(pISF, pidl);
-
+
return hr;
}
// IObjectWithSite
STDMETHODIMP CQuickLaunchBand::SetSite(IUnknown *pUnkSite)
- {
+ {
// Internal CISFBand Calls
CComPtr<IObjectWithSite> pIOWS;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pIOWS));
if (FAILED(hr))
- return hr;
+ return hr;
return pIOWS->SetSite(pUnkSite);
}
STDMETHODIMP CQuickLaunchBand::GetSite(IN REFIID riid, OUT VOID **ppvSite)
- {
+ {
CComPtr<IObjectWithSite> pIOWS;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IObjectWithSite, &pIOWS));
if (FAILED(hr))
// Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IDeskBand, &pIDB));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pIDB->GetWindow(phwnd);
}
STDMETHODIMP CQuickLaunchBand::ShowDW(IN BOOL bShow)
- {
+ {
// Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IDeskBand, &pIDB));
if (FAILED(hr))
return hr;
- return pIDB->ShowDW(bShow);
+ return pIDB->ShowDW(bShow);
}
STDMETHODIMP CQuickLaunchBand::CloseDW(IN DWORD dwReserved)
- {
+ {
// Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IDeskBand, &pIDB));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pIDB->CloseDW(dwReserved);
}
- STDMETHODIMP CQuickLaunchBand::ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
- {
+ STDMETHODIMP CQuickLaunchBand::ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
+ {
// Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IDeskBand, &pIDB));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pIDB->ResizeBorderDW(prcBorder, punkToolbarSite, fReserved);
}
STDMETHODIMP CQuickLaunchBand::GetBandInfo(IN DWORD dwBandID, IN DWORD dwViewMode, IN OUT DESKBANDINFO *pdbi)
- {
+ {
// Internal CISFBand Calls
CComPtr<IDeskBand> pIDB;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IDeskBand, &pIDB));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pIDB->GetBandInfo(dwBandID, dwViewMode, pdbi);
- }
-
+ }
+
/*****************************************************************************/
// IPersistStream
STDMETHODIMP CQuickLaunchBand::GetClassID(OUT CLSID *pClassID)
- {
+ {
// Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IPersistStream, &pIPS));
}
STDMETHODIMP CQuickLaunchBand::IsDirty()
- {
+ {
// Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IPersistStream, &pIPS));
}
STDMETHODIMP CQuickLaunchBand::Save(IN IStream *pStm, IN BOOL fClearDirty)
- {
+ {
// Internal CISFBand Calls
CComPtr<IPersistStream> pIPS;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IPersistStream, &pIPS));
return pIPS->GetSizeMax(pcbSize);
}
-
+
/*****************************************************************************/
// IWinEventHandler
}
STDMETHODIMP CQuickLaunchBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
- {
+ {
// Internal CISFBand Calls
CComPtr<IWinEventHandler> pWEH;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IWinEventHandler, &pWEH));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pWEH->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
}
STDMETHODIMP CQuickLaunchBand::IsWindowOwner(HWND hWnd)
- {
+ {
// Internal CISFBand Calls
CComPtr<IWinEventHandler> pWEH;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IWinEventHandler, &pWEH));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pWEH->IsWindowOwner(hWnd);
}
-
+
/*****************************************************************************/
// *** IOleCommandTarget methods ***
STDMETHODIMP CQuickLaunchBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
- {
+ {
// Internal CISFBand Calls
CComPtr<IOleCommandTarget> pOCT;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IOleCommandTarget, &pOCT));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pOCT->QueryStatus(pguidCmdGroup, cCmds, prgCmds, pCmdText);
}
STDMETHODIMP CQuickLaunchBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
- {
+ {
// Internal CISFBand Calls
CComPtr<IOleCommandTarget> pOCT;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IOleCommandTarget, &pOCT));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pOCT->Exec(pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
- }
+ }
/*****************************************************************************/
// *** IContextMenu ***
// Internal CISFBand Calls
CComPtr<IContextMenu> pICM;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IContextMenu, &pICM));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pICM->GetCommandString(idCmd, uFlags, pwReserved, pszName, cchMax);
// Internal CISFBand Calls
CComPtr<IContextMenu> pICM;
HRESULT hr = m_punkISFB->QueryInterface(IID_PPV_ARG(IContextMenu, &pICM));
- if (FAILED(hr))
+ if (FAILED(hr))
return hr;
return pICM->InvokeCommand(pici);
public CComCoClass<CQuickLaunchBand, &CLSID_QuickLaunchBand>,
public CComObjectRootEx<CComMultiThreadModelNoCS>,
public IObjectWithSite,
- public IDeskBand,
+ public IDeskBand,
public IPersistStream,
public IWinEventHandler,
public IOleCommandTarget,
public IContextMenu
{
HWND m_hWndBro;
- CComPtr<IUnknown> m_punkISFB;
+ CComPtr<IUnknown> m_punkISFB;
public:
virtual STDMETHODIMP SetSite(
IN IUnknown *pUnkSite
);
-
+
// IDeskBand
virtual STDMETHODIMP GetWindow(
OUT HWND *phwnd
- );
+ );
virtual STDMETHODIMP ContextSensitiveHelp(
IN BOOL fEnterMode
- );
+ );
virtual STDMETHODIMP ShowDW(
IN BOOL bShow
- );
+ );
virtual STDMETHODIMP CloseDW(
IN DWORD dwReserved
- );
+ );
virtual STDMETHODIMP ResizeBorderDW(
LPCRECT prcBorder,
IUnknown *punkToolbarSite,
BOOL fReserved
- );
+ );
virtual STDMETHODIMP GetBandInfo(
IN DWORD dwBandID,
IN DWORD dwViewMode,
IN OUT DESKBANDINFO *pdbi
- );
+ );
// IPersistStream
IN BOOL fClearDirty
);
-// IWinEventHandler
+// IWinEventHandler
virtual STDMETHODIMP ContainsWindow(
IN HWND hWnd
);
virtual STDMETHODIMP OnWinEvent(
- HWND hWnd,
- UINT uMsg,
- WPARAM wParam,
- LPARAM lParam,
+ HWND hWnd,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam,
LRESULT *theResult
);
COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
- END_COM_MAP()
+ END_COM_MAP()
};
\ No newline at end of file
if (IsEqualCLSID(m_Clsid, CLSID_StartMenu))
return RSHELL_CStartMenu_CreateInstance(riid, ppvObject);
-
+
if (IsEqualCLSID(m_Clsid, CLSID_MenuDeskBar))
return RSHELL_CMenuDeskBar_CreateInstance(riid, ppvObject);
{
DiskEntry = CONTAINING_RECORD(Entry, DISKENTRY, ListEntry);
- DiskSize = DiskEntry->SectorCount.QuadPart *
+ DiskSize = DiskEntry->SectorCount.QuadPart *
(ULONGLONG)DiskEntry->BytesPerSector;
if (DiskSize >= 10737418240) /* 10 GB */
FoundDuplicate = TRUE;
break;
}
-
+
/* Keep going */
NextEntry = NextEntry->Flink;
}