Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jcfuller

Pages: [1] 2 3 ... 29
1
Bug Reports / WITH not Fixed
« on: February 26, 2025, 01:03:36 PM »
Kevin,
  We have an issue with your WITH fix.
James
Quote
Function CWindow_RegisterClass( szClassName As const char Ptr,hInstance As HINSTANCE,lpfnWndProc As WNDPROC) As ATOM
   Dim As ATOM wAtom
   Dim As WNDCLASSEXW wcexw
   static As Long nCount = 0

   static  As char m_wszClassName[256]
   If Len( szClassName) Then
      m_wszClassName = szClassName
   Else
      m_wszClassName = "BcxWindowClass"
      m_wszClassName = m_wszClassName & ":" + STR$(nCount)
   EndIf
   ' // Default handler
   If lpfnWndProc = NULL Then
      lpfnWndProc = (WNDPROC)&CWindow_WindowProc
   EndIf

   ' // Fill the WNDCLASSEXW structure
   With wcexw
      .cbSize        = SIZEOF(wcexw)
      .style         = CS_DBLCLKS BOR CS_HREDRAW BOR CS_VREDRAW
      .lpfnWndProc   = lpfnWndProc
      .cbClsExtra    = 0
      .cbWndExtra    = SIZEOF(HANDLE)
      .hInstance     = hInstance
      .hCursor       = LoadCursor(NULL, (LPCWSTR) IDC_ARROW)
      .hbrBackground = (HBRUSH) (COLOR_3DFACE + 1)
      .lpszMenuName  = NULL
      .lpszClassName = (LPCWSTR)&m_wszClassName
      .hIcon         = 0
      .hIconSm       = 0
      
   End With
   '' // Register the class
   wAtom = RegisterClassEx(&wcexw)
   '' // Increment the class counter
   IF wAtom THEN
      nCount = nCount + 1
   'Else
   '   zTrace(L"CRAP")
   EndIf
   '' // Return the atom
   
   Function = wAtom
End Function


Translation
Quote
// *************************************************
//            User's Subs and Functions
// *************************************************

ATOM CWindow_RegisterClass (const char* szClassName,HINSTANCE hInstance,WNDPROC lpfnWndProc)
{
  ATOM     wAtom= {0};
  WNDCLASSEXW  wcexw= {0};
  static long     nCount=0;
  static char     m_wszClassName[256];
  if((int)strlen(szClassName)){
      strcpy(m_wszClassName,szClassName);
    }
  else
    {
      strcpy(m_wszClassName,"BcxWindowClass");
      strcpy(m_wszClassName, join(3,m_wszClassName,":",str(nCount)));
    }
  if(lpfnWndProc==NULL ){
      lpfnWndProc=(WNDPROC)&CWindow_WindowProc;
    }
  wcexw.cbSize=sizeof();
  wcexw.style=CS_DBLCLKS|CS_HREDRAW|CS_VREDRAW;
  wcexw.lpfnWndProc=lpfnWndProc;
  wcexw.cbClsExtra=0;
  wcexw.cbWndExtra=sizeof(HANDLE);
  wcexw.hInstance=hInstance;
  wcexw.hCursor=LoadCursor(NULL,(LPCWSTR)IDC_ARROW);
  wcexw.hbrBackground=(HBRUSH)(COLOR_3DFACE+1);
  wcexw.lpszMenuName=NULL;
  wcexw.lpszClassName=(LPCWSTR)&m_wszClassName;
  wcexw.hIcon=0;
  wcexw.hIconSm=0;
  wAtom=RegisterClassEx(&wcexw);
  if(wAtom ){
      nCount+=1;
    }
  return wAtom;
}

BCX:      .cbSize        = SIZEOF(wcexw)
Translated to                 wcexw.cbSize=sizeof();

James

2
Compiler Related Discussions / clang++ #pragma's
« on: January 28, 2025, 09:06:08 AM »
Kevin,
I get:
Code: [Select]
clang++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
when compiling "c" source.

Shouldn't this
Code: [Select]
#pragma GCC diagnostic ignored "-Wdeprecated"
from the
// *************************************************
//                  GCC and CLANG
// *************************************************
section stop that?

-Wno-deprecated added to my compile line suppress the warning
James

3
Compiler Related Discussions / Re: Mingw dowload
« on: January 26, 2025, 04:16:38 PM »
I'm a MSVC fanboy so I really don't test MinGW that much and when I do I use the NUWEN distro, even though it's a year old.

James


4
Compiler Related Discussions / Mingw dowload
« on: January 26, 2025, 02:16:52 PM »
Anyone using (familar with) this distro?
https://winlibs.com/

I have an older version
"winlibs personal build version gcc-12.1.0-mingw-w64msvcrt-10.0.0-r1"
but had not used it in ages. It seems to work just fine.
They certainly have versions for any matter of taste.

James



5
Compiler Related Discussions / Re: clang download
« on: January 17, 2025, 09:18:04 AM »
Kevin,
  I do know why you used clang++.
I changed from clang-cl to clang++ in my recent testing.
I commented because I don't think I saw any mention of clang++ in Robert's post or links.

James
 

6
Compiler Related Discussions / Re: clang download
« on: January 17, 2025, 04:32:56 AM »
Robert,
  Wow! Information OVERLOAD :)
I am updating my BcxAdp and I think now I'll just leave clang to the user.

I notice the bed clang batch files use clang++ ??

James


7
Compiler Related Discussions / clang download
« on: January 15, 2025, 06:11:51 AM »

8
User Contributions / Re: Bcx EDitor (BED)
« on: January 11, 2025, 06:38:14 AM »
Kevin,
  You might want to note in your instructions.txt file that folders with spaces in the CALL need quotes.
Yours:
CALL C:\VS2022\VC\Auxiliary\Build\vcvarsall.bat  x64
Mine:
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\"vcvarsall.bat  x64

Do NOT put quotes in the @SET MSVCFolder line.

James

9
Announcements / Re: BCX v8.1.8 is available for download
« on: October 11, 2024, 07:42:09 AM »
Kevin,
  The folder in the Bcx818.zip download is Bcx819.
It appears it is just mislabeled as the contents are Bcx818.


James

10
Dim as long fSize = Lof(Fname)

is valid when used inside a SUB or FUNCTION and when the size returned by LOF() fits inside a LONG.

Which is another reason I prefer to define the MAIN function myself....I use a snippet I created in VSCode so I don't have to type it out every time.

AIR.

Armando,
  I too primarily use main/WinMain. The flexibility of BCX is unmatched in my opinion.
With command line option -z along with $PP and BCXLL.dll you can write your own
coding language. $ONEXIT also makes calling different batch files a breeze.

James

11
Questions & Answers / Re: /Tp /TP
« on: August 28, 2024, 05:59:35 PM »
Robert,
 The download in the link is the version I am using.
 I have been away from coding too long.

I tried to compile the code you posted with Pelles to no avail.

Thanks again for trying

I think the only issue is the new bcx chr proto ??

James


 
 

12
Questions & Answers / Re: /Tp /TP
« on: August 28, 2024, 03:05:30 PM »
Robert,
  No I have no examples. Maybe I don't understand the difference between /Tp and /TP ?

With MSVC all I need to do is add /Tp to my compile line but with the Mingw variants I need to use g++ instead of gcc.
I would prefer to use Mikes App
Attached is the version of InsertOptArg I am using.

13
Questions & Answers / /Tp /TP
« on: August 28, 2024, 10:08:52 AM »
Kevin,
  Now that Mike's InsertOptArg App doesn't work I am working on updates to my batch files for "c" source file as you do.
/Tp: Specifies a C++ source

I am wondering why you did not use
/TP: Specifies all source files are C++.

Would you not have issues with including "c" code files with optional arguments where #include is used instead of $INCLUDE. Maybe my memory is failing again but
$INCLUDE adds the source to the base file but #include just adds the #include "file.c"

James


14
Bug Reports / Re: $INCLUDE <filename> issues
« on: August 26, 2024, 06:12:31 AM »
Kevin,
  I decided to take a look at the ULEX code and I found it can only be compiled with Pelles on my setup and batch files. The new chr$ breaks Mike Hennings InsertOptArg app which I use for "c" code.
I did a bit of web surfing this AM and it appears compiling "c" As "c++" is not as horrible as I thought, so I guess I can not considerate  chr$ a BUG. :)

James



15
Bug Reports / Re: $INCLUDE <filename> issues
« on: August 25, 2024, 08:05:24 AM »

With a small tweak to my code all is fine with 8.1.4 in limited testing

James


Pages: [1] 2 3 ... 29