Search found 491 matches
- Jan 07, 2021 15:59
- Forum: Tips and Tricks
- Topic: Example using WinHTTP API to read out web page's code [Windows only]
- Replies: 15
- Views: 425
Re: Example using WinHTTP API to read out web page's code [Windows only]
You can change the value in WaitForResponse if needed. -1 is infinite time-out.
- Jan 07, 2021 15:26
- Forum: Tips and Tricks
- Topic: Example using WinHTTP API to read out web page's code [Windows only]
- Replies: 15
- Views: 425
Re: Example using WinHTTP API to read out web page's code [Windows only]
It works correctly using the WinFBE editor and the files that come with it. I don't know how you have compilet it.
- Jan 07, 2021 15:06
- Forum: Tips and Tricks
- Topic: Example using WinHTTP API to read out web page's code [Windows only]
- Replies: 15
- Views: 425
Re: Example using WinHTTP API to read out web page's code [Windows only]
If I may, an example using my WinFBX framework: '#CONSOLE ON #include once "Afx/CWinHttpRequest.inc" using Afx ' // Create an instance of the CWinHttp class DIM pWHttp AS CWinHttpRequest ' // Open an HTTP connection to an HTTP resource pWHttp.Open "GET", "http://forum.qbasic...
- Dec 12, 2020 21:49
- Forum: General
- Topic: @Josep Roca, about Afx/CVar.inc
- Replies: 16
- Views: 667
Re: @Josep Roca, about Afx/CVar.inc
These API functions that deal with variants do a lot of work. For example, this is the C++ code for VarSub as implemented in ReactOS: HRESULT WINAPI VarSub ( LPVARIANT left, LPVARIANT right, LPVARIANT result ) { HRESULT hres = S_OK; VARTYPE resvt = VT_EMPTY; VARTYPE leftvt,rightvt; VARTYPE rightExtr...
- Dec 12, 2020 21:33
- Forum: General
- Topic: @Josep Roca, about Afx/CVar.inc
- Replies: 16
- Views: 667
Re: @Josep Roca, about Afx/CVar.inc
It is ignored since "1" is not a number, but a string. Ok but how to explain that in the variation by srvaldez : v1 = v1 - "1" gives the right value ? Because in the operator - , I call the API function VarSub without checking the type of the passed variants ' ==================...
- Dec 12, 2020 21:04
- Forum: General
- Topic: @Josep Roca, about Afx/CVar.inc
- Replies: 16
- Views: 667
Re: @Josep Roca, about Afx/CVar.inc
> Shouldn't it throw an error instead of ignoring the "1"? How? It is an operator, not a function that can return a value. Anyway, I have found the problem: the constructor CONSTRUCTOR CVar (BYVAL _value AS DOUBLE) conflicts with the constructor CONSTRUCTOR CVar (BYVAL _value AS DOUBLE, BY...
- Dec 12, 2020 14:44
- Forum: General
- Topic: @Josep Roca, about Afx/CVar.inc
- Replies: 16
- Views: 667
Re: @Josep Roca, about Afx/CVar.inc
> Unless I don't understand but v1 -="1" also doesn't work as the value of v1 is still 2. Shouldn't it be 1 ?
It is ignored since "1" is not a number, but a string.
It is ignored since "1" is not a number, but a string.
- Dec 11, 2020 1:32
- Forum: General
- Topic: @Josep Roca, about Afx/CVar.inc
- Replies: 16
- Views: 667
Re: @Josep Roca, about Afx/CVar.inc
For some reason unknown to me, when passing a float value to a CVAR constructor, the compiler complains about an ambiguous call error, and when using v1 += 1.2345 it doesn't call the += operator, but does a cast to a WSTRING!
This works: v1 += CVAR(1.2345, "DOUBLE")
This works: v1 += CVAR(1.2345, "DOUBLE")
- Oct 14, 2020 0:25
- Forum: General
- Topic: Function String don't work if unicode BOM
- Replies: 26
- Views: 1051
Re: Function String don't work if unicode BOM
Code: Select all
#INCLUDE ONCE "Afx/AfxStr.inc"
print AfxStrRepeat(3, "текст ")
- Oct 13, 2020 21:03
- Forum: General
- Topic: Function String don't work if unicode BOM
- Replies: 26
- Views: 1051
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 ...
- Sep 28, 2020 13:21
- Forum: Windows
- Topic: Simple template with menu, edit control, listbox and statusbar
- Replies: 11
- Views: 486
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.
#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.
- Sep 28, 2020 8:11
- Forum: Documentation
- Topic: Compiler option: -w
- Replies: 36
- Views: 7196
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.
- Sep 27, 2020 17:50
- Forum: Documentation
- Topic: Compiler option: -w
- Replies: 36
- Views: 7196
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...
- Sep 27, 2020 14:34
- Forum: Documentation
- Topic: Compiler option: -w
- Replies: 36
- Views: 7196
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...
- Sep 27, 2020 9:29
- Forum: Documentation
- Topic: Compiler option: -w
- Replies: 36
- Views: 7196
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...