bitmap resource

This forum is for eXpress++ general support.
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: bitmap resource

#21 Post by Eugene Lutsenko »

rdonnay wrote:Then simply show me the code that calls DC_SetTimerEvent() and the function that it calls.
Removed from your system, which is not connected with the backgrounds. This is a working example of the source.
http://lc.kubagro.ru/Dima/_AIDOS-R.rar
I would like to once formed new backgrounds in 1.8 mode they immediately displayed without rebooting the system. But this only happens the first time created backgrounds for the first time. And in the previous version after the creation of backgrounds they immediately appear, but when you upgrade the open windows backgrounds faded into the background. And now that's all right (but in this case, I do not show). Checksums backgrounds created after the image files, and are used to verify their identity before being displayed, so they can not be replaced from the outside of the program.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: bitmap resource

#22 Post by Eugene Lutsenko »

While not necessary to deal with it. Looks like there's usually a stupid mistake. Now I will try to find it

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: bitmap resource

#23 Post by Eugene Lutsenko »

Became almost like he wanted to. _AIDOS-R - full version, _AIDOS-R2 - a simplified version (without checks and checksums of files backgrounds).

Unfortunately it is impossible to make the background to be displayed after it is created. It turns out for some reason only the first time. And then the backgrounds are not updated after their formation and take effect only when you exit the program and re-launch. Maybe someone will tell you how to fix it?

http://lc.kubagro.ru/Dima/_AIDOS-R.rar

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: bitmap resource

#24 Post by rdonnay »

Eugene -

I am sorry, but I will not have time to help you on this for almost 1 month.
I am leaving tomorrow morning for a 3 week motorcycle trip.

If you can give me a sample program that does not work, then I may have time to help you.

Roger
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: bitmap resource

#25 Post by Eugene Lutsenko »

I wish you a happy journey!

A program will generally work. Not quite as much as I would like, but does not produce runtime errors. I just would like to see the background image are updated immediately after creation. It would be the best option. But it would be acceptable if it is updated after closing the windows modes of their creation. Update after restarting the program - it's certainly not sovem what we would like. But try to understand itself over time.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: bitmap resource

#26 Post by rdonnay »

Try the following:

DCGETOPTIONS BITMAP aBitmaps[1,1]
DCREAD GUI .. OPTIONS GetOptions

This will display the first bitmap immediately when the dialog window is created.
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: bitmap resource

#27 Post by Eugene Lutsenko »

It is clear that it works. I understood from the first example in this topic. But then the question arises as to make the process of execution of the program was not stopping after

DCREAD GUI .. OPTIONS GetOptions

Something like this ...

Code: Select all

            oDlgBmp:drawingArea:bitmap := oBitmap
            oDlgBmp:drawingArea:sizeRedraw := .t.
            oDlgBmp:drawingArea:setSize(oDlgBmp:drawingArea:currentSize())
            oDlgBmp:drawingArea:configure()

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: bitmap resource

#28 Post by bwolfsohn »

I've been playing around with changing backgrounds, and have a repainting problem.
mainwindow() returns the drawing area of the main window.
if i minimize them restore the app from the taskbar, the correct bitmap is displayed. But, it does not repaint the background unless i do that.
if i just drag the app to another window without minimizing it repaints.
i'm sure i'm missing something very simple, but what ??? :(

**********************
function setbackground()
**********************
#include "..\common\windows.ch"
local oDlg:=mainwindow(),oBitmap
IF !empty(CUSAUC_PATH) .AND. fexists(AUC_FILES+"archivebg.bmp")
oBitmap:=dc_getbitmap(AUC_FILES+"archivebg.bmp")
else
oBitmap:=IIF( STA_COOLSCRN,CUS_BITMAP_LOGO_BACKGROUND,nil )
ENDIF
oDlg:lockUpdate(.t.)
oDlg:bitmap := oBitmap
oDlg:sizeRedraw := .t.
oDlg:setSize(oDlg:currentSize())
oDlg:configure()
oDlg:lockUpdate(.f.)
return(nil)
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: bitmap resource

#29 Post by Eugene Lutsenko »

May be useful to you ... I have everything working the way I want to, and perfectly normal and when you resize the window, and when folding and unfolding, and displacements:

http://lc.kubagro.ru/Dima/a.doc

Watch features:
F1_8()
GradFonStart(Par)
ChangeBackground(@oDlgBmp, Par)
DeleleGradFon()

Function F1_8() here:
http://lc.kubagro.ru/Install_Aidos-X/_1_8.exe

Ignore the warning about the dangers of downloading files _1_8.exe. This house Windows warning before downloading executable files.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: bitmap resource

#30 Post by rdonnay »

But, it does not repaint the background unless i do that
oDlg:invalidateRect() should force a repaint.
The eXpress train is coming - and it has more cars.

Post Reply