Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.01.08;
Скачать: [xml.tar.bz2];

Вниз

Появление формы   Найти похожие ветки 

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

Можно ли заставить форму сначала обрисоваться, а потом появиться? А то картинка моргает, пробовал BitBlt - не помогло.


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

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


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

А можно конкретнее? Мне, например, однажды нужно было сделать красивое появление формы (выезд с бока экрана). Я тогда столкнулся с проблемой прорисовки компонент на форме (они моргали). Выход был простой: создается битмап с внешним видом формы, он вылетает как угодно, не моргая, хоть крутясь по трем осям, а потом, в финише движения, появляется под ним неактивная форма, битмар уничтожается, форма активизируется.


 
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]

Спасибо всем за помощь!

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

Parameters

hdc - Value of wParam. Identifies the device context.

Return Values

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 вся ветка

Форум: "Основная";
Текущий архив: 2002.01.08;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.47 MB
Время: 0.009 c
4-22454
Ewgeniy
2001-10-31 07:40
2002.01.08
Отображение на форме графики из памяти


7-22437
Paradox
2001-09-25 18:48
2002.01.08
wav


1-22259
Крыс
2001-12-12 17:55
2002.01.08
Дорисовка кривых (дубль 2)


1-22073
HydraMarat
2001-12-19 00:22
2002.01.08
DLL или BPL


1-22013
Curious
2001-12-17 12:53
2002.01.08
Запуск EXE из текущей программы.





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский