Casa
Top.Mail.Ru Yandeks.Metrika
Fórum: "Principal";
Arquivo atual: 2002.01.08;
Download: [xml.tar.bz2];

Para baixo

Formulário de aparência Encontre agências semelhantes


Leviathan   (2001-12-13 23:05) [0]

É possível fazer o formulário primeiro delineado e depois aparecer? E então a imagem pisca, tentou BitBlt - não ajudou.



Builder   (2001-12-14 00:43) [1]

Интересно, что ты такое рисуешь, что BitBlt не помогло?
Может просто ты это очень часто рисуешь?



KilkennyCat   (2001-12-14 02:50) [2]

E pode ser mais específico? Por exemplo, uma vez eu precisei fazer uma bela aparência de um formulário (deixando o lado da tela). Eu então me deparei com o problema de desenhar componentes em um formulário (eles piscaram). A saída foi simples: um bitmap com a aparência do formulário é criado, ele voa como quiser, sem piscar, embora girando ao longo de três eixos e, no final do movimento, uma forma inativa aparece abaixo dele, o bitmar é destruído, a forma é ativada.



Leviathan   (2001-12-14 17:38) [3]

Рисую я .jpg картинку, размером примерно с дельфовскую заставку, только один раз. В OnShow формы я использую BitBlt с имаджа на канвас формы. Улучшение есть, но слабенькое, может надо делать это не в OnShow?



Polevi   (2001-12-14 17:57) [4]

Onpaint
WM_ERASEBKGND



Leviathan   (2001-12-14 20:02) [5]

Obrigado a todos pela ajuda!

Polevi:
Извини, если торможу. Этот параметр нужно передать как последний параметр BitBln? Если да, то это ничего не дало :-(



Leviathan   (2001-12-14 20:14) [6]

Упс... ошибся, забыл имедж спрятать, битблт вообще не работает. Что не так?
BitBlt(SplashForm.Canvas.Handle, 0, 0, Image1.Width,
Image1.Height, Image1.Canvas.Handle, 0, 0, 0);



KilkennyCat   (2001-12-15 00:50) [7]

Так для чего это нужно? чтобы заставку сделать?



Leviathan   (2001-12-16 16:35) [8]

Почти. Экран обновления. На нем заставка и прогрессбар.



KilkennyCat   (2001-12-17 01:35) [9]

И моргание происходит при обновлении прогрессбара, что ли?



Polevi   (2001-12-17 08:42) [10]

Leviathan ©
1. BitBlt надо вызывать в он Paint
2. Посмотреть help на BitBlt

dwRop

Specifies a raster-operation code. These codes define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color.
The following list shows some common raster operation codes:

Value Description
BLACKNESS Fills the destination rectangle using the color associated with index 0 in the physical palette. (This color is black for the default physical palette.)
DSTINVERT Inverts the destination rectangle.
MERGECOPY Merges the colors of the source rectangle with the specified pattern by using the Boolean AND operator.
MERGEPAINT Merges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.
NOTSRCCOPY Copies the inverted source rectangle to the destination.
NOTSRCERASE Combines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.
PATCOPY Copies the specified pattern into the destination bitmap.
PATINVERT Combines the colors of the specified pattern with the colors of the destination rectangle by using the Boolean XOR operator.
PATPAINT Combines the colors of the pattern with the colors of the inverted source rectangle by using the Boolean OR operator. The result of this operation is combined with the colors of the destination rectangle by using the Boolean OR operator.
SRCAND Combines the colors of the source and destination rectangles by using the Boolean AND operator.
SRCCOPY Copies the source rectangle directly to the destination rectangle.
SRCERASE Combines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.
SRCINVERT Combines the colors of the source and destination rectangles by using the Boolean XOR operator.
SRCPAINT Combines the colors of the source and destination rectangles by using the Boolean OR operator.
WHITENESS Fills the destination rectangle using the color associated with index 1 in the physical palette. (This color is white for the default

3. Посмотреть help на WM_ERASEBGND

An application sends the WM_ERASEBKGND message when the window background must be erased (for example, when a window is resized). The message is sent to prepare an invalidated portion of a window for painting.

WM_ERASEBKGND
hdc = (HDC) wParam; // handle of device context

parâmetros

hdc - Value of wParam. Identifies the device context.

Valores de retorno

An application should return nonzero if it erases the background; otherwise, it should return zero.

То есть поскольку ты все равно затираешь изображение с помощью BitBlt - otherwise, it should return zero



Sergey_n   (2001-12-18 00:19) [11]

Зачем такие сложности??? Пихаешь на форму TImage в него свой рисунок прямо в конструкторе. Или я в чем то не прав?????



Страницы: 1 filial inteira

Fórum: "Principal";
Arquivo atual: 2002.01.08;
Download: [xml.tar.bz2];

em cima









Memória: 0.85 MB
Hora: 0.045 c
1-22097
Serjik
2001-12-19 15:45
2002.01.08
Quais são os dois botões para anexar, de modo que eles estejam no centro da parte inferior?


1-22072
Garik
2001-12-19 11:08
2002.01.08
Como criar dinamicamente uma instância filho do TFrame


1-22217
Greenrul
2001-12-16 02:13
2002.01.08
TreeView - um par de perguntas


1-22198
T2
2001-12-16 07:23
2002.01.08
Um processamento para vários botões


3-21938
gordon
2001-12-04 18:19
2002.01.08
Como configurar o IB5 com o Win2000 Server





afrikaans albanês Arabic armênio azerbaijano basco belarusian Bulgarian catalão Chinês simplificado) Chinês tradicional) croata checo dinamarquês Dutch Inglês estoniano filipino Finnish French
Galego georgiano German grego crioulo haitiano hebraico hindi húngaro islandês Indonesian irlandês Italian Japanese Korean letão lituano macedónio Malay maltês Norwegian
persa polonês Portuguese romeno Russa sérvio Slovak esloveno espanhol swahili sueco tailandês turco ucraniano urdu vietnamita galês ídiche bengali bósnio
cebuano esperanto gujarati hausa hmong igbo javanês kannada khmer lao latino maori marata mongol Nepali punjabi somali tâmil telugu yoruba
zulu
Английский francês Alemão Italiano Португальский russo Espanhol