NO

Author Topic: Suggestions, Many Suggestions  (Read 1224 times)

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #15 on: August 16, 2022, 06:13:44 pm »

Seems possible.  It would be several (many) months (at least) of work.  I made a small trial, attached.
The markdown also seems to reference some 'links' like:
    href: /windows/desktop/api/Commctrl/nf-commctrl-animate_close
which don't exist in the github markdown repository, and don't exist on my system, so these would take more time to ferret out. 

Finally just to mention the markdown comprises over 400Megabytes of data.  Just doing the section on Controls - just the A's into .chm resulted in a 110K file.  I don't know the upper limit of a .chm file.  BTW the A's only processed 111 lines out of 6884 lines of the controls TOC.

The Github markdown can be dowloaded and used 'offline' as well.  So I'm not sure if there is enough demand for a .chm version. 

John Z

Note just FYI - you can't open .chm over the network so you must download to look at it.

Update: Just a quick build of the controls section w/o frills resulted in a almost 20Meg chm file before compression then about 4.5Megs final. Approx 1760 HTML files...

I think it would be far easier to create some tool to automate the process. A tool that could batch convert all of it. I was looking on the internet for tools like that. Converting tens of thousands of files individually would be a pain. The github docs are updated regularly so a tool to create updated chm files occasionally would be good.

I have looked around the internet for a tool to either convert github markdown to html or directly to chm. I haven't found any super easy tools to accomplish it yet. How did you convert it? :) The Microsoft CHM creator can import HTML but I doubt it supports markdown.

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #16 on: August 16, 2022, 06:16:53 pm »
I saw information about how to create extensions mentioned. I assume this is related to my suggestion about a memory and resource leak detector.

I do think a resource leak detector would be an easy tool to make. The tool could display the amount of RAM in KB, MB or just bytes (probably should make that adjustable) and the number GDI and USER objects and handles used by the program. The tricky part could be creating a graph to display in the GUI of the tool and you may want to save a log to the disk while the program is running as an option, at least.

Finally this is not a bug, but a fully compliant behavior.  ;)

That would explain this behavior. I'm learning more about the C Standards. I should always be using that define statement when using any C library function with an "_s" at the end, basically? :)
« Last Edit: August 16, 2022, 08:59:29 pm by CandCPlusPlus »

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #17 on: August 16, 2022, 06:46:02 pm »
The Github markdown can be dowloaded and used 'offline' as well.  So I'm not sure if there is enough demand for a .chm version. 

A chm file of all the help content would be nice but I was just thinking that one could completely take out that step entirely by using or creating a good application to view the markdown directly. A github markdown viewer application, basically. I'm making this more complicated than it needs to be. Perhaps even include it with Pelles C? Though, not really that necessary.

One could even create a markdown viewer that looks somewhat like the classic Microsoft CHM help and even move the existing Pelles C help content to that. Maybe even let you copy whatever custom content you want to a specific folder that Pelles C would than recognize. :)
« Last Edit: August 16, 2022, 08:31:48 pm by CandCPlusPlus »

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #18 on: August 16, 2022, 07:28:46 pm »
I'll mention my ARM64 suggestion again. Microsoft partially ported Visual Studio to ARM64, recently. Visual Studio is huge though and Pelles C would be a better fit for ARM64, especially low end ARM64 tablets. An ARM64 build of Pelles C would be great. It would be good to be able compile for ARM64 even on an x64 version of Pelles C as well.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1929
Re: Suggestions, Many Suggestions
« Reply #19 on: August 16, 2022, 08:32:31 pm »
That would explain this behavior. I'm learning more about the C Standards. I should always be using that define statement when using any C library function with an "_s" at the end, basically? :)
Short answer: yes.

About having a local help set this actually is impracticable IMHO, there is so much stuff that would be a very large bulk of storage.
But a simple help of the basic core of WINAPI, the glorious (and no more supported hlp format) win32.hlp, can be found here, translated to chm format by Laurence Jackson, thanks a lot for the conversion. You can add this file in the IDE, on menu click Tools->Customize select tab Help files, then add the file. It will be searched when pressing F1.

You can also use this addin of mine. Don't care to build a local Help2 set (even MS abandoned it), but enable the online query search option. Now pressing F1, if no local entry is found, will be issued a query on microsoft online (maybe it needs some updating, but is still working).
« Last Edit: August 16, 2022, 08:34:53 pm by frankie »

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #20 on: August 16, 2022, 10:01:08 pm »
About having a local help set this actually is impracticable IMHO, there is so much stuff that would be a very large bulk of storage.

All of the huge bulk of Windows API documentation could probably be trimmed down as well.

There are definitely obscure and rarely used parts of the Windows API with even some parts of it which are not really relevant nowadays. If I remember correctly, there are for example palette APIs for optimizing the appearance of applications on 256 color displays and that hasn't really been relevant since the 1990s. You definitely don't need that in the documentation unless you like reading about the history of Windows.
« Last Edit: August 16, 2022, 10:03:18 pm by CandCPlusPlus »

Offline John Z

  • Member
  • *
  • Posts: 484
Re: Suggestions, Many Suggestions
« Reply #21 on: August 16, 2022, 10:24:26 pm »

But a simple help of the basic core of WINAPI, the glorious (and no more supported hlp format) win32.hlp, can be found here, translated to chm format by Laurence Jackson, thanks a lot for the conversion. You can add this file in the IDE, on menu click Tools->Customize select tab Help files, then add the file. It will be searched when pressing F1.
BTW The 'old' .hlp files, of which I have many, are still useful and usable in Windows 10 and 11.  Just download the .exe from here and install.  They work just like before.  Here is the link: https://www.majorgeeks.com/files/details/winhlp32_for_windows_10.html


I think it would be far easier to create some tool to automate the process. A tool that could batch convert all of it. I was looking on the internet for tools like that. Converting tens of thousands of files individually would be a pain. The github docs are updated regularly so a tool to create updated chm files occasionally would be good.
I mentioned converting 1760 files creating .chm file of 4.5 Megs - surely you don't think I did that by hand....

John Z

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #22 on: August 16, 2022, 10:27:49 pm »
I mentioned converting 1760 files creating .chm file of 4.5 Megs - surely you don't think I did that by hand....

How did you do that? I'm curious now. :)

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 100
    • Bcx Basic to C/C++ Translator
Re: Suggestions, Many Suggestions
« Reply #23 on: August 17, 2022, 01:21:18 am »
For most day-to-day offline WinApi lookups, this chm compiled by Lawrence Jackson in 2015 is still the best you'll find on the web.

http://laurencejackson.com/win32/


Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #24 on: August 17, 2022, 02:39:45 am »
I edited my second post to add a suggestion about adding comment and uncomment buttons to the toolbar. Visual Studio has that and I do miss it when using Pelles C.

When you create a new project you have the option of putting it anywhere you want by changing the path in the Location dialog edit box at the bottom of the New Project window.

My suggestion is to add a setting to the options dialog to adjust the default folder that appears in the New Project dialog when you click on New and than Project. Right now it just lists whatever folder was entered for a previous project. In the photo attached, the previous project was created in the Cat folder for example. It's somewhat minor though and not super important.
« Last Edit: August 17, 2022, 02:43:32 am by CandCPlusPlus »

Offline John Z

  • Member
  • *
  • Posts: 484
Re: Suggestions, Many Suggestions
« Reply #25 on: August 17, 2022, 12:18:42 pm »
How did you do that? I'm curious now. :)

https://github.com/kevwan/mdconv

rem batch convert files in directory then delete md files
rem deleting .md because these are a copy, still have originals
rem change path to reflect md2html location
rem put batch file in directory to convert then run it
for %%i in (*.md) do C:\Temp\WinAPI_CHM\md2html -i %%~ni.md -o %%~ni.html
DEL *.md

John Z

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #26 on: August 26, 2022, 08:41:30 pm »
I want to clarify my suggestion about tips, autocomplete and such. I think I'll modify my original post too.

I was basically suggesting an autocomplete for Windows API functions, the C Standard Library and perhaps even functions in a project's code. Autocomplete could in theory be easier to implement in C with mere functions and structures. I have noticed that Pelles C already has autocomplete for structs.
« Last Edit: August 26, 2022, 08:46:52 pm by CandCPlusPlus »

Offline CandCPlusPlus

  • Member
  • *
  • Posts: 39
Re: Suggestions, Many Suggestions
« Reply #27 on: August 29, 2022, 06:49:08 pm »
Another feature would be buffer overflow detection and warnings. I haven't noticed it in Pelles C, if it already exists in Pelles C.

Offline John Z

  • Member
  • *
  • Posts: 484
Re: Suggestsion, Many Suggestions
« Reply #28 on: September 11, 2022, 03:35:30 pm »
12.  Add comment and uncomment code buttons to the toolbar. I'm quite used to this in Visual Studio. I discovered that you can right click in Pelles C to get a context menu with comment and uncomment button but it would be more convenient to have it in the toolbar.

While I don't agree that using a toolbar button instead of the pop-up menu is easier, I do believe in "Each to their own the old lady said as she kissed the cow" so to respond to your request and to demonstrate the easy way this can be done I've created an Add-in to do it.
You can get it here:
https://forum.pellesc.de/index.php?topic=10582.0

It was a nice change after doing all that documentation work....but didn't take long  :)

John Z

Offline John Z

  • Member
  • *
  • Posts: 484
Re: Suggestsion, Many Suggestions
« Reply #29 on: September 11, 2022, 03:43:10 pm »
14. A way to add and modify the properties for a file to be compiled. Windows shows the file version, properties and everything for many files when you click properties and than details. It's useful for tracking which version an executable is when on one of my computers. It's all blank for files compiled with Pelles C.

You just need to add a Version resource.  Open the resource file right click in a open area and select  New then Version, it is all there.
There is also an add-in that would update automatically if you don't want to update yourself.  Called Increment-Build-Number I believe.

John Z