home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April
/
Chip_1997-04_cd.bin
/
tema
/
602propc
/
disk12
/
data.12
/
WINTEXT
/
MAKRA
/
SOURCES
/
_UPCASE.TXT
< prev
next >
Wrap
Text File
|
1995-02-13
|
937b
|
41 lines
program UPCASE;
// Makro prevede oznaceny text do velkych pismen
// s tim, ze pocatky slov budou mit o const vetsi
// velikost, nez zbytek slova
const
rozdil = 2;
aux_size = 12;
var
startsel, endsel, vel : integer;
begin
if not IsBlockSelected then
begin
Info_Box("Zprßva", "Nenφ oznaΦen blok");
halt;
end;
if GetSelEndPos = GetCaretPos then
ChangeSelRanges;
startsel := GetSelStartPos;
endsel := GetSelEndPos;
UnselectBlock;
vel := GetFormatFont(kCHPSize);
{ casti oznaceneho textu mohou mit ruzne velikosti pisma : }
if vel = kAmbiguous then
vel := aux_size;
while GetSelStartPos < endsel do
begin
CharRight(1, TRUE);
SetFormatFont(kCHPsize, vel);
SetFormatFont(kCHPcaps, kOn);
UnselectBlock;
RightOfWord(TRUE);
SetFormatFont(kCHPsize, vel - rozdil);
SetFormatFont(kCHPcaps, kOn);
WordRight;
end;
end.