Oxygen Basic
Programming => Problems & Solutions => Topic started by: chrisc on March 18, 2018, 06:29:24 PM
-
Hello
when i try compiling a program with the below code
the compiler display an error message (shown in the atteched image)
IF GetDlgCtrlID(lParam) = LabelFN THEN
'wPARAM id device context DC
SetTextColor(wPARAM, RGB(0,0,250))
SetBkMode(wPARAM, TRANSPARENT)
FUNCTION = GetStockObject(NULL_BRUSH)
EXIT FUNCTION
END IF
the compiler found 2 unidentified objects NULL_BRUSH and TRANSPARENT
this must be caused by a missing include file
i have use CoreWin what other include file shall i use?
-
Hi Chris,
% NULL_BRUSH=5
% TRANSPARENT=1
in OxygenBasic only the most used WinApi constants are defined. I use a small helper file, constructed of some C header files, but I think in Powerbasic these constants are defined somewhere too.
BTW: Dialogs.inc uses only the constants to run Dialogs.inc itself. So extra constants or types must be defined separately, if this is not already done somewhere else.
Roland
-
Thanxx a lot Arnold, this problem is now rectified
can you show me where to find the web links to these API constants? i have been searching for it yesterday
-
Hello Aurel and thanxx
yes i found some constants in ur awinh.inc, is this the most correct one that contains all the API constants
can it be replacement of Corewin.inc ?
or can itwork with corewin.inc without duplicating each other?
-
hi chrisc
yes you can find many constants inside awinh.inc or awinh035.inc.
well for coremin.inc i am not sure , I use mine and what i found on web
sometimes i use MinWin.inc .
Also you can use both but for sure most constants are same...
You must know that I use awinh.inc for windows not for dialogs.
sorry i don't build Dialog Apps. ::)
-
I'll add this set to WinData.inc (which is included in MinWin and CoreWin)
% WHITE_BRUSH 0
% LTGRAY_BRUSH 1
% GRAY_BRUSH 2
% DKGRAY_BRUSH 3
% BLACK_BRUSH 4
% HOLLOW_BRUSH 5
% NULL_BRUSH 5
% WHITE_PEN 6
% BLACK_PEN 7
% NULL_PEN 8
-
thanxx Aurel and Charles
more enhancement to O2 the better, i quite like O2 now