AfxWin Start o2

Started by Frank Brübach, January 20, 2025, 03:24:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frank Brübach

hello charles, hello jose...

my question belongs to an old example with o2 AfxWin folder some years ago.
what happened with this afxWin start? anybody has followed this project?

thanks, frank

'
' example from around 9. october 2018 original setup by jose roca with three include files
' added an asm output and three new messageboxes, frank bruebach,20-01-2025
'
uses AfxWin
uses wTypes

typedef sys HWND
typedef char* LPCSTR
typedef wchar* LPCWSTR
typedef dword uint

extern lib "user32.dll"
int MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
int MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
end extern

MessageBoxA 0, "Hello my new World", " declare", 0
MessageBoxW 0, "Hello programming World", " declare2", 0

'----------------------- changed to... -------------------------------- //
extern lib "user32.dll"
int MessageBoxA(sys hWnd, char* lpText, char* lpCaption, uint uType)
int MessageBoxA(sys sys, char* lpText, char* lpCaption, uint uType)
end extern

MessageBoxA 0, "Hello World3", "declare3", 0
MessageBoxA 0, "Hello World4", "declare4", 0


' asm output
'
double x
#show x=cos(pi)

'displays a messagebox containing:

'fldpi
'fcos
'fstp qword [ebx+8316] '4096


Frank Brübach

A simple example how to use ...
I have changed only string2 to bstring in AfxWin.inc Folder for running

' simple example how to use..
'
uses afxWin
print AfxGetExeFullPath() 'shows path with folder ...\oxygenbasic\co2.exe
print "ok"

José Roca

Some tests that I did in my attempt to learn O2. They haven't any importance.