T
T
Themidis Koudes2020-05-22 16:58:21
C++ / C#
Themidis Koudes, 2020-05-22 16:58:21

Why does the program refuse to draw in full screen mode?

I want to draw in a child window, I start drawing when the parent window makes it visible, but it is drawn only when WindowState = Maximaze, I try to make a window of other sizes, but it does not draw anything.

private: System::Void Grf_VisibleChanged(System::Object^  sender, System::EventArgs^  e) {
    int O[2] = { 50,200 };//318,450
    Color ^col = gcnew Color();
    Pen ^pen = gcnew Pen(col->White);
    Graphics ^im = this->CreateGraphics();
    im->FillRectangle(pen->Brush, 0, 0, 950,780 );
    pen->Color = col->Black;
    im->DrawLine(pen, 0, 0, 100, 50);
    im->DrawLine(pen, O[0], O[1], O[0] + 450, O[1]);
    im->DrawLine(pen, O[0], O[1], O[0], O[1] - 450);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question