News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Offline GitHub MS Documents

Started by John Z, November 09, 2025, 05:21:33 PM

Previous topic - Next topic

TimoVJL

Quote from: MrBcx on November 03, 2026, 12:07:26 AMThanks Timo,  it's working for me now.  The pages render sufficiently quick.

I'm still confused over what the main difference is between

WHViewMD_WS_a1

and

WHViewMD_WS_a2
WHViewMD_WS_a2 don't need MiniUnZ as unpacking code is include project.
May the source be with you

MrBcx

Thanks for putting up with my questions :-)

I understand now ... I successfully rebuilt WHViewMD_WS_a2

If you're planning on embellishing the UI, I would start by adding a Search to
the Listbox, followed by changing to a larger font in the Listbox.  Those 2 things
would make this a useful offline tool.

Bcx Basic to C/C++ Translator
https://www.bcxbasiccoders.com

John Z

Quote from: TimoVJL on November 02, 2026, 08:08:34 PMThis very slow example make filename list from win32-docs zip
....

In WHViewMD_WS_a2.zip MiniUnZ code is included to project.
In WHViewMD_c_a3.zip RichEdit control is cleared before inserting new rtf page.


Very nice Timo!  BTW slow is the reason I created a db for my version getting API functions.
It is not unbearable though.

I'll also mention that wordpad still works in Windows 25H2 for those interested.  :)

John Z

John Z

It seems the .md to .rtf converter is incomplete.
Checking the web/AI this .md snippet is convertible to .rtf syntax -
<dl> <dt>
<span id="CFSTR_DSOBJECTNAMES"></span><span id="cfstr_dsobjectnames"></span>CFSTR_DSOBJECTNAMES </dt> <dd> <dl> <dt>
"DsObjectNames" </dt> <dt>
The CFSTR_DSOBJECTNAMES clipboard format is supported by the IDataObject provided by the ICommonQuery::OpenQueryWindow method. The CFSTR_DSOBJECTNAMES clipboard format provides a global memory handle (HGLOBAL) that contains DSOBJECTNAMES structure.
</dt> </dl> </dd> </dl>

is converted to this .rtf snippet
{\rtf1\ansi\deff0
{\bkmkstart CFSTR_DSOBJECTNAMES}{\bkmkend CFSTR_DSOBJECTNAMES}CFSTR_DSOBJECTNAMES\par
\par
\li360 "DsObjectNames"\par
The CFSTR_DSOBJECTNAMES clipboard format is supported by the IDataObject provided by the ICommonQuery::OpenQueryWindow method. The CFSTR_DSOBJECTNAMES clipboard format provides a global memory handle (HGLOBAL) that contains DSOBJECTNAMES structure.\par
}

is it worthwhile to convert and get rid of all the loose <dt,dd,dl> tags?  Probably more readable...

John Z

MrBcx

Quote from: John Z on November 03, 2026, 12:25:47 PMIt seems the .md to .rtf converter is incomplete.
is it worthwhile to convert and get rid of all the loose <dt,dd,dl> tags?  Probably more readable...


I worked a bit more with AI on the converter and mostly? got rid of those errant tags.  It also converts internally
linked *.md into *.rtf, enabling some hyperlinking, which even when it works, mostly sucks on *.rtf files.

I converted the entire win32-docs github repo to RTF and zipped it up.  I removed the *.md to cut
down on zip filesize ( even so, it is still 373MB because RTF is rather bloaty )

https://bcxbasiccoders.com/bcxusers/mrbcx/win32-docs-RTF.zip

It might be useful to someone.

Bcx Basic to C/C++ Translator
https://www.bcxbasiccoders.com

John Z

MrBcx, this is incredible!  A huge task even if scripted.  Also very nice of you to host such a large file.

I see the converter output is much improved.  Hopefully your work will be widely useful.

John Z

TimoVJL

#21
Thanks MrBcx

A tool adapted to view RTF-files with msftedit.dll.

Now a current filename is in editbox for collecting info for files for testing, like with WordPad or MS Winword.
May the source be with you

MrBcx

#22
Quote from: MrBcx on November 04, 2026, 03:02:17 AM
Quote from: John Z on November 03, 2026, 12:25:47 PMIt seems the .md to .rtf converter is incomplete.
is it worthwhile to convert and get rid of all the loose <dt,dd,dl> tags?  Probably more readable...


I worked a bit more with AI on the converter and mostly? got rid of those errant tags.  It also converts internally
linked *.md into *.rtf, enabling some hyperlinking, which even when it works, mostly sucks on *.rtf files.

I converted the entire win32-docs github repo to RTF and zipped it up.  I removed the *.md to cut
down on zip filesize ( even so, it is still 373MB because RTF is rather bloaty )

https://bcxbasiccoders.com/bcxusers/mrbcx/win32-docs-RTF.zip

It might be useful to someone.

FYI -- Attached are my updated MD2RTF files that I used to create "win32-docs-RTF"

Bcx Basic to C/C++ Translator
https://www.bcxbasiccoders.com

Robert

Quote from: MrBcx on November 04, 2026, 03:02:17 AM
Quote from: John Z on November 03, 2026, 12:25:47 PMIt seems the .md to .rtf converter is incomplete.
is it worthwhile to convert and get rid of all the loose <dt,dd,dl> tags?  Probably more readable...


I worked a bit more with AI on the converter and mostly? got rid of those errant tags.  It also converts internally
linked *.md into *.rtf, enabling some hyperlinking, which even when it works, mostly sucks on *.rtf files.

I converted the entire win32-docs github repo to RTF and zipped it up.  I removed the *.md to cut
down on zip filesize ( even so, it is still 373MB because RTF is rather bloaty )

https://bcxbasiccoders.com/bcxusers/mrbcx/win32-docs-RTF.zip

It might be useful to someone.



I suspect that in the .rtf files most of the 84000 plus broken hyperlinks to the Microsoft docs can be fixed by changing instances of

HYPERLINK "/windows
to

HYPERLINK "https://learn.microsoft.com/en-us/windows

John Z

Quote from: Robert on Today at 07:32:31 AMI suspect that in the .rtf files most of the 84000 plus broken hyperlinks to the Microsoft docs can be fixed by changing instances of

HYPERLINK "/windows
to

HYPERLINK "https://learn.microsoft.com/en-us/windows


A while back I converted the entire 'controls' section of the GitHub docs into a .chm file, and a .cab file.

It is mentioned somewhere in the forum but hosted mainly at:
https://sourceforge.net/projects/windows-controls-api-docs/
because of the forums prior lower upload limit - but I attached the .chm version here now.

When doing that, for just that small section of the documents, there were 23,313 links and only 6138 were external HTTPS links. Only a few of the external ones didn't go to the MS Doc site.

John Z

John Z

#25
Quote from: MrBcx on Yesterday at 10:24:22 PMFYI -- Attached are my updated MD2RTF files that I used to create "win32-docs-RTF"


Thanks very much MrBcx!  I'm thinking of using this to update my MDFILES3 project to use actual RTF. Currently it shows the output in HTML and .MD (in an RTF control).

Thanks again for sharing,

John Z

https://forum.pellesc.de/index.php?topic=11608.msg41572#msg41572

John Z

Quote from: TimoVJL on November 04, 2026, 11:18:39 AMA tool adapted to view RTF-files with msftedit.dll.

Hi Timo,
I tried to build this but got this error:
Building WHViewRTF64.exe.
POLINK: fatal error: File not found: 'nocrt.lib'.

Is there a download for this?

Thanks,

John Z

TimoVJL

#27
Just take take of Omit default library name in objects and remove nocrt.lib from linker settings.

NoCrt libs aren't updated  lately.

I try to scan a that win32-docs zip a some way:// keywords topic_type api_name: api_type: api_location:
static int ParseMemFile(char *pMem, int nSize, char *szFile)
{
char *pPtr, *pPtr1, *pPtr2, *pPtr3;

pPtr = strstr(pMem, "keywords:");
if (!pPtr) return 1; // no keywords
pPtr = strstr(pMem, "topic_type:");
if (!pPtr) return 2; // no topics

pPtr = strstr(pMem, "api_name:"); // CRT
//pPtr = StrStr(pMem, "api_name:"); // shlwapi.dll
if (pPtr) {
pPtr3 = strstr(pPtr, "api_type:"); // end of names
printf("%s\t", szFile);
pPtr += 9; // pass
while (*pPtr != 10) pPtr++;
pPtr++;
pPtr1 = pPtr;
pPtr2 = pPtr;
//*(pPtr+10) = 0;
if (pPtr2 < pPtr3) { // avoid empty string
do {
while (*pPtr2 != 10) pPtr2++;
*pPtr2 = 0; // cut to newline
printf("%s ", pPtr1);
pPtr2++;
pPtr1 = pPtr2;
if (pPtr2 > pPtr3) break;
} while (*pPtr2 == '-');
}
printf("\n");
} //else printf("%s\n", szFile);
return 0;
}
May the source be with you

John Z

Thanks Timo,  will do.

John Z