Dialog boxes in PureBasic

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Just replace the '!db' with Data.b and it will be full basic :)

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Yes, pusztry - no problem.

I´ll write an Editor for it which generates a .dlg file
you can simply IncludeBinary.

I have to work the next 2 days before i have 5 weeks holidays.
The Dialog Editor should be done very fast (max. 1 day),
so please wait for weekend.

thanks,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Justin.

Danilo, an editor will be really cool thanks a lot :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Joseph.

Danilo
thank you, your snippet is excellent
thanks in advance for the planned dlg editor too
and maybe is there any chance to get all the good stuff about dialog boxes 'packed' by you in a library or hopefully integrated directly in a next compiler release? :)

best regards
Joseph

(PureBasic Registered User)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Takes some more time...

Sorry, only 960 LoC / 50k .EXE
done so far... :)

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pusztry.

Thanks Danilo I can't wait. You take your time.

Ryan

- Ryan


WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.
Originally posted by PB

> God gave rock`roll to you :)

A fellow KISS fan!


PB - Registered PureBasic Coder
Add me, my daughter and my brother to that!! (Detroit Rock City rules!!)

Fangles
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by pusztry.

Danilo,
I Can't get the example to work after I comple it. I don't know why. It works great out of the IDE. Also How is the DLG editor coming. ( You are awsome ) can't wait.


- Ryan


WinXP, PIII 800 MHz, 512MB RAM, SB Live 5.1, NVidia TNT 2 Ultra
bizdon
User
User
Posts: 12
Joined: Wed Jun 22, 2011 6:49 pm

Re: Dialog boxes in PureBasic

Post by bizdon »

Hi All!
sorry for my english..

Help to use "winapi DialogBoxParam" with .rc file

Code: Select all

Procedure.l dlg(Wnd, Message, wParam, lParam)
  www.l=1
 If Message=#WM_INITDIALOG
   ShowWindow_(Wnd, #SW_SHOWNORMAL) 
    ElseIf Message=#WM_CLOSE
      EndDialog_(Wnd,0)
   EndIf
ProcedureReturn www
EndProcedure

hinst=GetModuleHandle_(0)
DialogBoxParam_(hinst,0,@"caption",@dlg(),0)
 

; this is name.rc file, including in"compiller\options\resource"

; #define IDD_DLG1 1000
; #define IDC_STC 1001
; IDD_DLG1 DIALOGEX 6,6,222,50
; CAPTION "IDD_DLG"
; FONT 8,"MS Sans Serif"
; STYLE 0x10030000
; EXSTYLE 0x00000000
; BEGIN
;   CONTROL "Links! Links!  Links zwo drei vier",IDC_STC,"Static",0x50000201,52,16,124,17,0x00000000
; End
it's do not work
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Dialog boxes in PureBasic

Post by ts-soft »

here is a complete example
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
USCode
Addict
Addict
Posts: 924
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: Dialog boxes in PureBasic

Post by USCode »

I can't necessarily help you with your given code sample but if you're asking about modal dialog boxes in general, a lot has changed since 2002.
You can simulate modal dialog boxes in PureBasic using StickyWindow() and DisableWindow(), which will allow your application to stay cross-platform ... if you're interested in that.
There's probably many posts on this forum showing how to use those 2 together to create a modal dialog.
Last edited by USCode on Wed Jun 22, 2011 10:49 pm, edited 2 times in total.
bizdon
User
User
Posts: 12
Joined: Wed Jun 22, 2011 6:49 pm

Re: Dialog boxes in PureBasic

Post by bizdon »

Thanks! ts-soft, USCode
Post Reply