and i have strange problem with class name ...
here is part of code :D:\FreeBASIC-1.05.0-win32\Aurel_FB_Scintilla\FBSci.bas(75) warning 4(2): Suspicious pointer assignment
D:\FreeBASIC-1.05.0-win32\Aurel_FB_Scintilla\FBSci.bas(83) warning 3(2): Passing different pointer types, at parameter 2 of CREATEWINDOWEX()
Code: Select all
dim classname as zstring Ptr
dim cname as string
cname = "FBWin"
classname = strptr(cname)
function = 0
with wcls
.style = CS_HREDRAW or CS_VREDRAW
.lpfnWndProc = @WndProc
.cbClsExtra = 0
.cbWndExtra = 0
.hInstance = hInstance
.hIcon = LoadIcon( NULL, IDI_APPLICATION )
.hCursor = LoadCursor( NULL, IDC_ARROW )
.hbrBackground = GetStockObject( WHITE_BRUSH )
.lpszMenuName = NULL
.lpszClassName = @classname
end with
if( RegisterClass( @wcls ) = FALSE ) then
MessageBox( null, "Failed to register wcls", "Error", MB_ICONERROR )
exit function
end if
hWnd = CreateWindowEx( 0, @classname, "Aurel_FB_SCi", WS_OVERLAPPEDWINDOW, 100, 100, 800, 600,NULL,NULL,hInstance,NULL)
even in original code complain strptr() can be used and anyway again complain ???
so anyone can explain to me a proper way ?
thanks in advance