News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

vkdebug - maximum characters in debug window issue

Started by bsdsource, October 05, 2015, 01:08:23 PM

Previous topic - Next topic

bsdsource

When using vkdebug PrintString to print out my buffer the debug window doesn't show the entire string. There appears to be a character size limitation of around 30,000 bytes in the editbox that the debug window shows. Is this a limitation of an editbox or a limitation of vkdebug's editbox? If it's a vkdebug limitation does anyone know how I can increase the maximum size of characters permitted? Seems i would need to adjust allocated memory in vkdebug source code as well as rebuilding the vkdebug library.

jj2007

Simple edit controls are indeed limited to 32767 bytes afaik.

Redesign your program; for example, if you want to find something inside these >32k bytes, use InString of find$() to isolate it, and display only the part you are interested in.

Besides, deb is often a better choice, as you can see your stuff in the console.

GoneFishing

Here I wrote about this limitation though I didn't bother to check if it's possible to change the upper limit.
Today I made quick search'n'read and found something interesting and hopefully helpful for you :
How do I put more than 32,000 characters into a rich text control? - a small note in The Old New Thing by Raymond Chen
EM_EXLIMITTEXT message :
Quote
Sets an upper limit to the amount of text the user can type or paste into a rich edit control.
Parameters

wParam

    This parameter is not used; it must be zero.
lParam

   Specifies the maximum amount of text that can be entered. If this parameter is zero, the default maximum is used, which is 64K characters. A COM object counts as a single character.

Return value

This message does not return a value.
Remarks

The text limit set by the EM_EXLIMITTEXT message does not limit the amount of text that you can stream into a rich edit control using the EM_STREAMIN message with lParam set to SF_TEXT. However, it does limit the amount of text that you can stream into a rich edit control using the EM_STREAMIN message with lParam set to SF_RTF.

Before EM_EXLIMITTEXT is called, the default limit to the amount of text a user can enter is 32,767 characters.

EDIT: All info above is for richedit control and Minimum supported client = Windows Vista [desktop apps only] ! 

jj2007

Quote from: GoneFishing on October 05, 2015, 07:33:56 PMEDIT: All info above is for richedit control and Minimum supported client = Windows Vista [desktop apps only] !

M$ speak for "did XP ever exist?". Of course it works with Win XP, too, and probably for earlier versions.
In RichMasm, SendMessage hRE, EM_EXLIMITTEXT, 0, -1 never gave any problems.

bsdsource

Thanks. I guess a simple google search would have answered my question.