• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX:SE [C++] MAKE_STRING with word wrap?

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Hi,
Is it possible to use the MAKE_STRING macro with it automatically using word wrap?

Currently, the macro looks like this:
C++:
MAKE_STRING(
dialog_message,
NULL,
NULL,
IMAGE_USE_ERASE | IMAGE_USE_BRIGHT,
0,
240, 150,
540, 150,
MAX_PATH,
MODULE_VAR_NONE,
MODULE_VAR_NONE,
MODULE_VAR_NONE,
RGB(77,75,148),
RGB(189,189,189),
RGB(128,0,0),
GAUGE_FONT_DEFAULT,
GAUGE_CHARSET,
0,
DT_LEFT,
NULL,
reply_string_cb)

I tried adding DT_WORDBREAK to the formatting parameter, but that doesn't seem to have any impact. Do I have to set up multiple string macros and break the text manually?
 
It is a rather simple and not very useful (my opinion) string display. It doesn't do anything of significant value and isn't very flexible. In short... no it doesn't, and I haven't used a MAKE_STRING in so long I honestly can't recall... simply because it's not a very good display. I use GDI+ for pretty much anything text based.
 
The problem I got with this is that this particular gauge is loading a few bitmaps from the resource file. And referring to our previous conversation, GDI+ doesn't like those bitmaps.
 
Just like WarpD, i didn't use MAKE_STRING for a long time. As far as I know, the only way to answer your question is to have the word wrapping done by your code and use mutliple MAKE_STRING macros, 1 for each line. I'm afraid this is the only solution.
And if you want to use GDI+, you can use a bitmap stored in the resources. GDI+ will not care much if it is a fix background bitmap, it works fine.
 
Thanks for the reply. Man, that really sucks... I was hoping that I wouldn't have to re-write that part of the code. I'll probably opt for the GDI+ variation. Is there anything special about the handling of Bitmaps with GDI+ in the sim? Some funny quirks I need to be aware of? How is transparency handled?
 
Back
Top