|
pool
May 22, 2021 15:59:50 GMT -5
Post by spindrift on May 22, 2021 15:59:50 GMT -5
Bplus has a nice pool game already on QB64. Here is another free table. pool.bas (50.21 KB)
|
|
|
pool
May 22, 2021 17:06:25 GMT -5
Post by bplus on May 22, 2021 17:06:25 GMT -5
Man I am going to have to get FB now! ;-))
|
|
johnno56
Junior Member
Logic is the beginning of wisdom.
Posts: 85
|
pool
May 23, 2021 0:09:38 GMT -5
Post by johnno56 on May 23, 2021 0:09:38 GMT -5
"Spindrift".... Now there's a long lost reference to "Land of the Giants" if ever I heard one... Cool.
|
|
aurel
Full Member
Posts: 234
|
pool
May 27, 2021 2:43:21 GMT -5
Post by aurel on May 27, 2021 2:43:21 GMT -5
is Fb forum down? is that because i posted bitmap editor
|
|
|
pool
May 27, 2021 6:28:24 GMT -5
Post by spindrift on May 27, 2021 6:28:24 GMT -5
Maybe because you posted something, that forum is deader than Morecambe promenade in January.
|
|
|
pool
May 27, 2021 11:56:33 GMT -5
Post by bplus on May 27, 2021 11:56:33 GMT -5
Well yesterday I look up Heath Robinson today it's Morecambe: You chaps across the lake have me Google eyed :-)) Well I guess Aurel did break the forum LOL
|
|
aurel
Full Member
Posts: 234
|
pool
May 27, 2021 14:54:58 GMT -5
Post by aurel on May 27, 2021 14:54:58 GMT -5
yo must be me
|
|
|
pool
May 29, 2021 13:47:00 GMT -5
Post by spindrift on May 29, 2021 13:47:00 GMT -5
Hello aurel To answer your question in the freebasic forum regarding a pointer to a window, here is how to get it, with an example in Win 10
screen 19,32
Declare Function SetWindowTheme Lib "UxTheme.dll" Alias "SetWindowTheme"(As Any Ptr,As string Ptr=@" ",As zstring Ptr=@" ") As Long
Dim Win As Any Ptr '<< -- handle
Screencontrol 2, *Cptr(Integer Ptr,@Win )
SetWindowTheme(win)
sleep
|
|
aurel
Full Member
Posts: 234
|
pool
May 30, 2021 2:43:05 GMT -5
Post by aurel on May 30, 2021 2:43:05 GMT -5
Ok thanks spindrift and what this already do? also ...can i ask you more here ? it looks to me that there (on FB forum ) there is no interest in such a small utility programs ? or i am wrong ?
|
|
aurel
Full Member
Posts: 234
|
pool
May 30, 2021 2:47:59 GMT -5
Post by aurel on May 30, 2021 2:47:59 GMT -5
by the way if you see example i posted there and basicCoder present ... I just want to add two buttons , one for OpenFile(bmp) and second SaveFile() to get ordinary FileDialog and save /open that small bitmaps ? nothing ultra spacial ...i don't know where to look ..
where is documentation for such a things ? It is unknown? What kind of window is that ? I see that opened window is standard with i guess double-buffered graphic hidden inside some include or built in somewhere ...? can you explain that ?
thanks
|
|
aurel
Full Member
Posts: 234
|
pool
May 30, 2021 5:59:03 GMT -5
Post by aurel on May 30, 2021 5:59:03 GMT -5
Well combination of this two types of programs not work well at all my question is can i make it as child window ..but then again there is no handler crap
|
|
|
pool
May 30, 2021 6:59:14 GMT -5
Post by spindrift on May 30, 2021 6:59:14 GMT -5
Regarding the open and save dialogs in fb, these should do. You just have to call one of these functions at an open or save button. But they will work without buttons as a test:
#include "windows.bi" #include "win\commdlg.bi"
#define nul chr(0) Dim Shared As String requiredlist requiredlist="pictures (.bmp) files"+NUL+"*.BMP"+NUL+"others(.png,.jpeg) files"+NUL+"*.PNG;*.JPEG"+NUL+"All files (*.*)"+NUL+"*.*"+NUL+NUL
function OpenFileName( byval hwndOwner as HWND, _ byval FileName as zstring ptr, _ byval nMaxFile as integer=MAX_PATH) as integer
dim as OPENFILENAME FName with fname .lStructSize = sizeof(OPENFILENAME) .hWndOwner = hwndOwner .lpstrFilter = strptr(requiredlist) .lpstrFile = FileName .nMaxFile = nMaxFile .Flags = OFN_FILEMUSTEXIST or OFN_LONGNAMES end with return GetOpenFileName( @FName )
end function
function SaveFileName( byval hwndOwner as HWND, _ byval FileName as zstring ptr, _ byval nMaxFile as integer=MAX_PATH) as integer
dim as OPENFILENAME FName with FName .lStructSize = sizeof(OPENFILENAME) .hWndOwner = hwndOwner .lpstrFile = FileName .nMaxFile = nMaxFile .Flags = OFN_LONGNAMES end with
return GetSaveFileName( @FName )
end function
'===================
dim as zstring * MAX_PATH file
print OpenFileName( 0, @file ) print file
print SaveFileName( 0, @file ) print file
sleep
|
|
aurel
Full Member
Posts: 234
|
pool
May 30, 2021 9:22:56 GMT -5
Post by aurel on May 30, 2021 9:22:56 GMT -5
yes of course..they work without buttons ..they need just to be called pressing keyobard keys "S" and "L"
but ..can you answer on this :
where is documentation for such a things ?
It is unknown?
What kind of window is that ?
I see that opened window is standard with i guess double-buffered graphic
hidden inside some include or built in somewhere ...?
can you explain that ?
|
|
|
pool
May 30, 2021 10:44:31 GMT -5
Post by spindrift on May 30, 2021 10:44:31 GMT -5
It is Win api stuff. Windows itself is Win api, freebasic can only access the various functions. The include files for these projects are in the win folder of the inc folder. the main calling include is #include "windows.bi". Sometimes you need to dig out others as #include "win\commdlg.bi" The freebasic forum platform/windows mainly deals with Win api stuff, although many of the win api coders are gone now. The freebasic help does not cover Win api. If you google say createwindowexe then you will get help from microsoft docs docs.microsoft.com/en-us/previous-versions/ms960010(v=msdn.10)You can also download windows help.(win32.chm) sourceforge.net/projects/win32-help-chm/
|
|
aurel
Full Member
Posts: 234
|
pool
May 30, 2021 12:54:22 GMT -5
Post by aurel on May 30, 2021 12:54:22 GMT -5
yes i found in docs it is winapi packed into Libgfx i will leave it as is because i already spend to much time on that and beck to my standard coding on my interpreter . If i found something similar in C/C++ i will try to compile and use it . In fact i have one written for or re-used from somewhere and inputed into XBlite package but is to old and respond ver slow.
|
|