Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4003082
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:06:33+00:00 2026-05-20T08:06:33+00:00

Guys i am writing a simple graphic program to create a polygon of n

  • 0

Guys i am writing a simple graphic program to create a polygon of n sides by taking input from the user.After obtaining co-ordinates of vertices i would ask user to enter the vertex pairs between which he wants an edge.

To make this more interactive i thought i would gradually start drawing the polygon in graphic mode simulatneously i.e i would gradually add the edges and would display it to the user .Now i would again switch to the text mode to obtain further set of vertices between which he wants to insert edges.But what i found that as i switch between graphics and text mode everything which i draw in graphics mode is erased .

Guys is there any way or any function in turbo C compiler so that i could switch between text and graphic mode and at the same time restoring the contents of graphic mode.Should i use different compiler??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:06:34+00:00Added an answer on May 20, 2026 at 8:06 am

    Switching between modes makes the video adapter lose all retained graphics. A workaround for this is to use a ‘canvas’, an in-memory bitmap that stores the pixels. You’d make modifications to this bitmap and blit it to the video adapter to make it visible. Not supported by this ancient graphics library you use. Review the CreateCompatibleDC() winapi function in you plan to get ahead.

    This is hardly a problem. Simply re-render the graphics when you switch back to graphics mode. You do have to store a ‘model’ of the polygon so you can render it. Just store the vertex points.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys I'm writing a simple web program to get my feet wet in
Hey guys, Im working with wpf 3d, im currently writing a program that will
Hello guys I'm writing a test file for a program. where all the possible
Guys, I’ve been writing code for 15+ years, but managed to avoid Web Development
Hey guys, I'm writing a word wrap function to format console text in C++.
Guys, what is function called after my class loaded, where i can call self
I'm writing a simple nD-vector class, but am encountering a strange bug. I've stripped
Morning/Afternoon guys. Writing some JQuery AJAX shizz and getting a bit stuck. I've got
I'm writing up custom code for a CMS for a website. When a user
I am writing a simple flash game which requires an angle to be calculated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.