Questions from a "dummy" - page 114

 

I want to use Comment() to draw a normal table.

The tab output - CharToString(9) in Comment() unfortunately doesn't work.

Can I change the terminal font to a font that always has the same character width - Courier

I can change the colour using ChartSetInteger(zChartFirst, CHART_COLOR_FOREGROUND, clrYellow );

But how can I change the default font?

 
awkozlov:

...

How do I change the default font?

Don't you want to try doing that? There's a very large selection of fonts and colours.
 
awkozlov:

I want to use Comment() to draw a normal table.

The tab output - CharToString(9) in Comment(), unfortunately, doesn't work.

Can I change the terminal font to a font that always has the same character width - Courier

I can change the colour using ChartSetInteger(zChartFirst, CHART_COLOR_FOREGROUND, clrYellow );

But how can I change the default font?

tol64:
Don't you want to try it? There's a very large selection of fonts and colours.

Like this, for example.

Files:
 
Urain:

Like this, for example.

Or, for example, like this. You can even mark (and delete) with the mouse.
Files:
 
MetaDriver:
Or, for example, like this. You can even mark up (and delete) with the mouse. Nice...

Beauty is a mighty thing. Well done. The code is worth studying. Do you have Need_for_Speed.mq5 :)

I understand that you can only set fonts in objects with OBJPROP_FONT?

I would like it to be simpler - with one line, without specifying of coordinates of cells... Although, in 5 years we'll make comments in code as objects )

 
awkozlov:

... Although in 5 years we will make comments in the code as objects)

Comments will be all around us. In space. )))
 
awkozlov:

1. beauty is a terrible thing. Nicely done. The code is worthy of study.

2) Have you got Need_for_Speed.mq5 :)

3. I see that only in objects you can set fonts through OBJPROP_FONT?

4... I'd like it to be simpler - with one line, without setting cell coordinates...

1. I only added a couple of lines (literally - 2). As Repin used to say - "A little bit is art..."

;-P

2. What's up with that?

3. Yeah. What's the point of the kaments? They're as primitive as Print(). They are good for debugging.

If I want to print text all the time, they are too dumb to be redundant.

In such a case, you can reduce everything to one-line control on objects. You just put everything inside, leave a couple of strings on the outside and pull it when needed... :)

 
MetaDriver:

1. it was all Nicholas. I only added a couple of lines (literally - 2). Although... As Repin used to say - "A little bit is art..."

;-P

2. What's up with that?

3. Yeah. What's the point of the kaments? They're as primitive as Print(). They are good for debugging.

If I want to print text all the time, they are too dumb to be redundant.

In such a case, you can reduce everything to one-line control on objects. You just put everything inside, leave a couple of strings on the outside and pull it when needed... :)

Actually I've made a lot of overloads for nothing, for class of table comment it's better to accept data in string (because native Comment accepts string parameters), and type conversion pass to programmer control. This will complicate the call a bit, but simplify the class and understanding of what is written (especially when the class is inlined).

As they say, the class is a base class, so it is desirable not to overload it with unnecessary automation. If the automation is needed, it should be described either in the descendant or in the function-binding. All the indents and field sizes are already prescribed there, you can also automate consecutive stacking (you call the same function, and it each time writes a comment in a new field).

 

please tell me why the following code does not find the corresponding window (I checked, the window with this class exists)

#import "user32.dll"
   int FindWindowA(string &lpClassName, string &lpWindowName);
#import

string FormClass="TMyMainForm";
string FormName="";
int hnd = FindWindowA(FormClass,FormName);
if (hnd==0) printf("not found");
else printf("found");
 
I am not a programmer by training, please tell me what |= operator means and what is the form of number recording - 0x10 0x20 ? Thanks in advance.