Search found 1735 matches

by deltarho[1859]
Jul 18, 2019 20:54
Forum: Game Dev
Topic: Physics question
Replies: 26
Views: 505

Re: Physics question

With sin(0) = 0, cos(0) = 1, sin(90) = 1 and cos(90) = 0 From second post with beta = 0 we have towards centre = F angular momentum = 0 This corresponds to BasicCoder2's fig. 5 With beta = 90 we have towards centre = 0 angular momentum = F This corresponds to BsicCoder2's fig. 4 fig. 3 corresponds w...
by deltarho[1859]
Jul 16, 2019 17:16
Forum: Game Dev
Topic: Physics question
Replies: 26
Views: 505

Re: Physics question

The 'towards centre' force can be broken into x-y components, and we get:

dx = - F * Sin(beta) * Cos(beta) and dy = F * Cos(beta) * Cos(beta)

I reckon. <smile>
by deltarho[1859]
Jul 16, 2019 16:46
Forum: Game Dev
Topic: Physics question
Replies: 26
Views: 505

Re: Physics question

No response so far, 40 views, so I will take a wild guess. http://deltarho.org.uk/Downloads/badidea.jpg Thrust will be split into two forces; One toward the centre of the saucer; the other as angular momentum - he says with such confidence. <laugh> We have Sin(90-beta) = (towards centre)/F So, towar...
by deltarho[1859]
Jul 16, 2019 12:23
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

@dodicat I am going to be really pedantic. <smile> Drop 'Setfocus( EditBox )' just after 'createmessagewindow(textmessage)'. I hate GUIs which don't pass the see-saw pivot test (Not always possible) so centre EditBox and the three buttons. The EditBox needs some 'breathing space' above it, so use a ...
by deltarho[1859]
Jul 16, 2019 8:14
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

I use AfxOpenFileDialog in Encrypternet. I have just done a quick search and found that 10 different Afx* are used in that application; If I had to rely on my knowledge of the SDK I would probably still be writing it. <smile>
by deltarho[1859]
Jul 16, 2019 2:29
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

If you want a themed AfxInputBox, compatible with your console window, create this file: MyProgs.rc 1 24 "Theme.xml" where Theme.xml is <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifes...
by deltarho[1859]
Jul 15, 2019 22:26
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

I should have mentioned that in the above example code I am using 'Dim S As String'. Strictly speaking AfxInputBox returns a CWSTR which is José's dynamic unicode string which works transparently with literals and FreeBASIC native strings. I think I am right in saying that WinFBX is 'wall to wall' u...
by deltarho[1859]
Jul 15, 2019 22:06
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

Josep Roca wrote:You must be using an old version.

Just got the latest version ( https://github.com/JoseRoca/WinFBX ).

Thanks, José.
by deltarho[1859]
Jul 15, 2019 21:52
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

srvaldez wrote:if you want fix the suspicious pointer warnings in AfxWin.inc, just change LPWSTR = RT_RCDATA to LPWSTR = Cptr(LPWSTR, RT_RCDATA) in functions AfxExtractResourceToFile and AfxExtractResource

Done!

Thank you. <smile>
by deltarho[1859]
Jul 15, 2019 20:11
Forum: Windows
Topic: InputBox() in console program
Replies: 34
Views: 641

Re: InputBox() in console program

Using José Roca's WinFBX, wrappers for Windows SDK. We get a couple of warnings with gcc 9.1 but works, nonetheless. OK with 32 or 64 bit. #Include once "Afx/CWindow.inc" Dim S as String S = AfxInputBox( 0, 100, 100, "Input Test", "Optional prompt" ) If Len( S ) = 0 The...
by deltarho[1859]
Jul 12, 2019 22:19
Forum: Windows
Topic: file requester for console program
Replies: 30
Views: 430

Re: file requester for console program

We are no longer using Wstring for Title and Filter. We spotted the 'garbage' some posts back.

Nice one, dodicat.
by deltarho[1859]
Jul 12, 2019 21:19
Forum: Windows
Topic: file requester for console program
Replies: 30
Views: 430

Re: file requester for console program

srvaldez wrote:if I change the filter to @!"Text Files\0*.bas\0\0" it will show folders and basic files, even though the list only shows Text Files

*.bas is the filter. 'Text Files' is simply a description.

Try @!"BASIC Source Files\0*.bas\0\0"
by deltarho[1859]
Jul 12, 2019 21:12
Forum: Windows
Topic: file requester for console program
Replies: 30
Views: 430

Re: file requester for console program

@José

The nulls are escaped - srvaldez's last code is working with only TXT files being displayed. Change *.txt to *.exe and only applications are displayed.
by deltarho[1859]
Jul 12, 2019 20:57
Forum: Windows
Topic: file requester for console program
Replies: 30
Views: 430

Re: file requester for console program

srvaldez wrote:but it fails when using Paul's WinFBE

In the statusbar you should see 'ANSI'. Click on that and choose 'UTF-8 (BOM)'. Job done! <smile>

I was looking at changing ofn.lpstrFilter and ofn.lpstrTitle from Wstring back to ANSI but did not quite get there.

Go to advanced search