Tag Archive for 'Code'

TeXlipse, die TeXnicCenter-Alternative.

Justus hat mir heute einen prima Tipp gegeben: Das Eclipse-Plugin namens TeXlipse, das die beliebte Entwicklungsumgebung um einen LaTeX-Editor erweitert. Bisher habe ich für meine Dokumente TeXnicCenter unter Windows bzw. TeXShop auf dem Mac verwendet. Eigentlich war ich mit TeXnicCenter bisher zufrieden, gefehlt hat mir allerdings schon immer eine SVN-Integration, mit der Dateien direkt aus dem LaTeX-Editor ein- und ausgecheckt werden können. Dies ist jetzt mit Eclipse und dem Subclipse-Plugin ohne Probleme möglich!

Des Weiteren bin ich vom DVI-Viewer des MiKTeX-Pakets auf den SumatraPDF-Reader umgestiegen. Dieser hat gegenüber anderen Readern den Vorteil, dass er PDF-Dateien nicht sperrt, sondern die Anzeige permanent aktualisiert, sobald die Datei überschrieben wurde.

Eine tolle Sache! Probiert’s aus.

HowTo Rename Windows’ Start Button

First of all, the following HowTo article doesn’t make sense. Justus and I just found out how you can rename the Start Button of Windows (XP, 2000 etc.). :-)

(1) In the main function determine the handle of the Desktop Windows (see GetDesktopWindow). (2) Then enumerate all Child Windows of the Desktop (see EnumChildWindows) ’til you find the Start Button (by comparing the buttons Class and Name). (3) If you found the Start Button, just pass its handle to the well-known SetWindowText function. That’s it!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
int _tmain(int argc, _TCHAR* argv[])
{
	HWND lhStartButton = NULL;
 
	// get desktop window and enum child windows
	HWND lhDesktopWindow = GetDesktopWindow();
	EnumChildWindows(lhDesktopWindow, EnumChildProc, (LPARAM)&lhStartButton);
 
	// set the start button's text
	SetWindowText(lhStartButton, TEXT("Stop"));
 
	return 0;
}
 
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam)
{
	int liLength = 255;
	BOOL lbResult = TRUE;
 
	TCHAR *lpszClass = new TCHAR[liLength + 1];
	TCHAR *lpszText = new TCHAR[liLength + 1];
 
	// get window class name and text
	GetClassName(hwnd, lpszClass, liLength);
	GetWindowText(hwnd, lpszText, liLength);
 
	// compare class name and text
	if ( 0 == wcscmp(TEXT("Button"), lpszClass) &&
             0 == wcscmp(TEXT("Start"), lpszText) )
	{
		lbResult = FALSE;
		(*(HWND*)lParam) = hwnd;
	}
 
	delete[] lpszClass;
	delete[] lpszText;
 
	return lbResult;
}

Anyways. Why not blogging senseless things? ;-)