Search found 483 matches

by Josep Roca
Oct 14, 2020 0:25
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 755

Re: Function String don't work if unicode BOM

Code: Select all

#INCLUDE ONCE "Afx/AfxStr.inc"
print AfxStrRepeat(3, "текст ")
by Josep Roca
Oct 13, 2020 21:03
Forum: General
Topic: Function String don't work if unicode BOM
Replies: 26
Views: 755

Re: Function String don't work if unicode BOM

> In contrast, MasmBasic Print String$(3, "текст ") would output текст текст текст And WinFBX Print AfxStrRepeat(3, "текст ") will output текст текст текст ' ======================================================================================== ' Returns a string consisting of ...
by Josep Roca
Sep 28, 2020 13:21
Forum: Windows
Topic: Simple template with menu, edit control, listbox and statusbar
Replies: 11
Views: 377

Re: Simple template with menu, edit control, listbox and statusbar

I use WinFBE and it compiles using
#Include "win\commctrl.bi" ' for CreateStatusWindow
and it does not compile using
#Include "inc\win\commctrl.bi" ' for CreateStatusWindow

So maybe your setup is wrong.
by Josep Roca
Sep 28, 2020 8:11
Forum: Documentation
Topic: Compiler option: -w
Replies: 36
Views: 6930

Re: Compiler option: -w

We have been reminded that we are off topic, so if you want to continue the disussion please open a new topic in the Windows section. Maybe we can find an acceptable solution.
by Josep Roca
Sep 27, 2020 17:50
Forum: Documentation
Topic: Compiler option: -w
Replies: 36
Views: 6930

Re: Compiler option: -w

First you complain about... Btw, FB requires some acrobatics for simple tasks like: Code: Select all Dim As String hw="Hello World" SendMessage(hEdit, WM_SETTEXT, 0, @hw[0]) Same in Assembly: Code: Select all SetGlobals hEdit:HANDLE, hw$="Hello World" invoke SendMessage, hEdit, W...
by Josep Roca
Sep 27, 2020 14:34
Forum: Documentation
Topic: Compiler option: -w
Replies: 36
Views: 6930

Re: Compiler option: -w

> #Include "inc\win\windowsx.bi" ' you must be a very advanced user to find this...! C++ programmers use it all the time. > error 42: Variable not declared, SNDMSG in 'listbox_addstring(hList, "just a test") You must include "windows.bi" first. > The Utf16$(ansi$) macro...
by Josep Roca
Sep 27, 2020 9:29
Forum: Documentation
Topic: Compiler option: -w
Replies: 36
Views: 6930

Re: Compiler option: -w

(and the FB manual has never heard of ListBox_AddString) And also of the many other thousands of the Windows API functions. Btw in Assembly I can write invoke SendMessageW, hList, LB_ADDSTRING, 0, Utf16$(someAnsi$) And in FreeBasic I can do SendMessageW hListBox, LB_ADDSTRING, 0, *CWSTR(someAnsi) I...
by Josep Roca
Sep 27, 2020 8:42
Forum: Documentation
Topic: Compiler option: -w
Replies: 36
Views: 6930

Re: Compiler option: -w

Not many people uses SendMessage as often as you. It is easier to use the available macros or wrapper functions such ListBox_AddString, ListBox_GetText, ListBox_GetCurSel, ListBox_SetCurSel, etc.
by Josep Roca
Aug 12, 2020 19:08
Forum: Tips and Tricks
Topic: Byref in return function
Replies: 18
Views: 880

Re: Byref in return function

To clone an IPicture object you have to: 1.- As IPicture supports the IPersistStream interface, get a pointer to it with QueryInterface. 1.- Create an Stream in memory. 3.- Save the contents in the Stream using the Save method of the IPersistStream interface. 4. Create a new IPicture object with the...
by Josep Roca
Jul 01, 2020 11:12
Forum: Windows
Topic: SOLVED - MPEG2 Play Code and Win10
Replies: 67
Views: 3530

Re: SOLVED - MPEG2 Play Code and Win10

> I put his .bas file into the WinFBE_Suite\WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\inc folder

If you have WinFBE installed, the full example, complete with a manifest and other resources is provided in the WinFBE\Sample_Projects\DShow_PlayClip subfolder.
by Josep Roca
Jun 26, 2020 16:17
Forum: Windows
Topic: SOLVED - MPEG2 Play Code and Win10
Replies: 67
Views: 3530

Re: MPEG2 Play Code and Win10

> have you just got the bare bones of this code that just plays a vid? The main code is in the sub PlayMovieInWindow and in the processing of the WM_GRAPHNOTIFY message. In Windows we need a GUI to be able to process the WM_GRAPHNOTIFY (*) message in the callback procedure of the window. CWindow.inc...
by Josep Roca
Jun 26, 2020 3:55
Forum: Windows
Topic: SOLVED - MPEG2 Play Code and Win10
Replies: 67
Views: 3530

Re: MPEG2 Play Code and Win10

I have one that works, but haven't posted it here because I use my own framework.
See: https://github.com/JoseRoca/WinFBX/blob ... ayClip.bas
by Josep Roca
Jun 20, 2020 9:58
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V2.1.8 November 19, 2020)
Replies: 722
Views: 139703

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V2.1.7 May 31, 2020)

> No variable on next statement

FreeBasic does not use a variable in the next statement. That is an obsolete syntax. It won't complain if you put one, but it is ignored.
by Josep Roca
Jun 12, 2020 15:45
Forum: Windows
Topic: how to use FreeBASIC\Examples\windows\variants ?
Replies: 10
Views: 7419

Re: how to use FreeBASIC\Examples\windows\variants ?

If you're using WinFBE, you already have my WinFBX framework with it, so maybe you will find useful to look at the CVAR class. See: https://github.com/JoseRoca/WinFBX/blob/master/docs/COM/CVAR%20Class.md It is easy to use, e.g. '#CONSOLE ON #INCLUDE ONCE "Afx/CVar.inc" USING Afx DIM s AS S...
by Josep Roca
May 31, 2020 22:13
Forum: Windows
Topic: How to deal with COM objects?
Replies: 6
Views: 509

Re: How to deal with COM objects?

My next step will be to find the CLSID of WASAPI and try to figure out how to run its functions, now that the COM link is done! I'll try and post feedback then. Thanks again :) WASAPI has not a CLSID. WASAPI consists of several interfaces. The first of these is the IAudioClient interface. To access...

Go to advanced search