Here is the splash code. I had a .PBR file and image. But if I
flip that on I get an error, without I do get a blank grey box.
#COMPILE EXE
$INCLUDE "WIN32API.INC
'$RESOURCE "splash.PBR"
GLOBAL sDlg AS LONG
DECLARE FUNCTION SplashProc() AS LONG
DECLARE CALLBACK FUNCTION SplashScreen() AS LONG
FUNCTION PBMAIN() AS LONG
LOCAL sName AS STRING, sMailClient AS STRING
'get config info
DIM li$(100), ki$(1000), hold$(10000)
CALL SplashProc
LOCAL stat AS LONG
LOCAL fir AS INTEGER
LOCAL go AS INTEGER
LOCAL ba AS INTEGER
LOCAL Buffer AS STRING
IF debug% THEN
'smtp the file and kill it
' IF debug% THEN SHELL "Notepad.exe " & "tm.tmp" ' synch
END IF
done:
EXIT FUNCTION
END FUNCTION
'------------------------------------------------------------------------------
FUNCTION SplashProc() AS LONG
MOUSEPTR 13 'Working in BG
DIALOG NEW 0, "",,, 305, 158,%WS_POPUP OR %WS_DLGFRAME TO sDlg
CONTROL ADD IMAGE, sDlg, -1,"#1028",1,1,305,158
DIALOG SHOW MODAL sDlg CALL SplashScreen
END FUNCTION
'------------------------------------------------------------------------------
CALLBACK FUNCTION SplashScreen() AS LONG
LOCAL hInst AS LONG
LOCAL wMsg AS LONG
LOCAL wParam AS LONG
LOCAL lParam AS LONG
LOCAL sTimer AS LONG
wMsg = CBMSG
lParam = CBLPARAM
wparam = CBWPARAM
'hInst = 1
SELECT CASE wMsg
CASE %WM_INITDIALOG
' Set for 2.5 seconds
sTimer = SetTimer(sDlg, &HDABEDABE, 1000, %NULL)
CASE %WM_DESTROY
SendDlgItemMessage sDlg, sTimer, %WM_DESTROY, wParam, lParam
CASE %WM_TIMER
DIALOG END sDlg, 1
MOUSEPTR 0
END SELECT
END FUNCTION
------------------
Announcement
Collapse
No announcement yet.
Output windows and Splash box
Collapse
X
-
Larry, to solve these kinds of problems you are going to need to post the code you are using - it is just too difficult to diagnose your modified splash example from just a brief description.
However, I would first suggest (well, recommend) that you get one of the Windows programming books detailed in the FAQ forum (See "WIN32 Reference Books"). The Petzold one would be good for you, since it includes an example that does almost the exact thing you require.
In the DOWNLOADS section of this web site, you'll find a file called PETZOLD.ZIP which contain many of the examples converted to PowerBASIC. However, without an understanding of the concepts involved in Windows GUI programming, the code will probably not teach you much by itself.
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment:
-
Output windows and Splash box
I have PBDLL and need to make a dialog box, that I can pop up
and write messages to and they scroll, and when done with my
program running, close it. Can anyone help. Basically, PBCC
but looks like a real Windows window. I have CC and Contools,
I do not want the headache of the DLL and license part and
hacking the DOS box that opens when PBCC fires up.
So I guess I am going to DLL now.
Also, I pulled a splash program from here, and I can get it
to run without the .PBR file (empty grey windows box), I add the
BMP and the API file died and a VerQuery.. I am not at work,
but I will get the exact message.
------------------
Tags: None
Leave a comment: