If a window had an ON PAINT action, does this mean that if any Bos Taurus function is called the action will proceed?
Is it just applicable to BT commands?
Sorry if this is too elementary but what is "painting" exactly?
On Paint, define please
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
On Paint, define please
Hil Bill,
On Paint, it means as it draws the canvas. While the screen is built.
ON PAINT (event) has nothing to do with BossTaurus library
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: On Paint, define please
Thanks for the reply.
Does this mean that if I place msgbox("Am I here") inside the ON Paint function, it will pop up for every dot that I draw in a line,
or does it pop up once for each line or other object placed in the form?
Does this mean that if I place msgbox("Am I here") inside the ON Paint function, it will pop up for every dot that I draw in a line,
or does it pop up once for each line or other object placed in the form?
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
On Paint, define please
Hi Bill,
I'm not the best person to clarify how ON PAINT works on HMG, let alone an expert on Windows.
I just decided to clarify your doubts a little more and pass on what I just know.
What I think is that the event "ON PAINT" refers to the construction of the window and this refers to everything to which an image is emitted.
That's why Dr. Claudio has given several examples, because BosTaurus is an image manipulation library.
I have prepared, alias I adapted an example where you can see the difference making a background of screen in "ON PAINT" and out of it:
@ Claudio
En el Demo1 del Bos Taurus SAMPLES hice algunos cambios y si te gustan lo puedes remplazarlos a tu gusto:
Seria bueno conseguir otro ejemplo mejor con respecto al manejo del ancho y altura como tambien incluirla en la documentacion del Bos Taurus. Puede ser ?
I'm not the best person to clarify how ON PAINT works on HMG, let alone an expert on Windows.
I just decided to clarify your doubts a little more and pass on what I just know.
What I think is that the event "ON PAINT" refers to the construction of the window and this refers to everything to which an image is emitted.
That's why Dr. Claudio has given several examples, because BosTaurus is an image manipulation library.
I do not think so. Do you have your own test already to know the result ?
I have prepared, alias I adapted an example where you can see the difference making a background of screen in "ON PAINT" and out of it:
- You can compile this demo and test by:
- Click on new button "Edge" and see a rectangle made around the image.
- Try to minimize and then restore it again the same window/session.
This result is because edge was applied after ON PAINTing process.
- Now you can remove the comment characters (/* and */) at line # 40 where form ON PAINT is, but let the command character.
Save it and re-compile again. You will see with the same procedure of minimizing/restoring as previous instruction that the egde will be displayed forever because now it has constructed at ON PAINT.
@ Claudio
En el Demo1 del Bos Taurus SAMPLES hice algunos cambios y si te gustan lo puedes remplazarlos a tu gusto:
- Alteré las imagenes con el recuadrado en color diferenciado de acuerdo su extension.
- Adicioné en el .RC para que funcione de acuerdo
- Agregué la funcion Proc_ON_CLICK para que cambie los archivos de imagenes
- Agregué parametros, variables y dejé el código un poco más limpio
- Agregué tambien la funcion DrawEdge que llama la funcion BT_DRAWEDGE y tuve dificultad en encontrar los valores nWidth y nHeight ya que no son los mismos que se utilizaron con la funcion BT_DrawBitmap.
Seria bueno conseguir otro ejemplo mejor con respecto al manejo del ancho y altura como tambien incluirla en la documentacion del Bos Taurus. Puede ser ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein