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 7683961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:54:58+00:00 2026-05-31T18:54:58+00:00

TL;DR I need to know which characters are deleted with Win32. Basically, I need

  • 0

TL;DR I need to know which characters are deleted with Win32.

Basically, I need to know what characters are deleted, each time they are. Considering that there are three methods to delete, (Backspace, delete, and Right click>Delete) I’m not sure if I’ll just be re-using the same code or what. There’s also the option of multiple characters being selected, as well as the option for undo/redo. There’s probably something else I’m missing.

As I said above, I need to know which characters are deleted, and how to use undo/redo and how to tell if when using those if characters were added or deleted. (If that’s something easily Google, tell me, I just thought of them as I’ve been writting this post)

  • 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-31T18:54:59+00:00Added an answer on May 31, 2026 at 6:54 pm

    What exactly are you talking about? The win32 default control windows? You can subclass them to do that…
    http://msdn.microsoft.com/en-us/library/bb773183%28v=vs.85%29.aspx

    Well, if you come up with something specific code-wise and don’t quite know what to do, just ask here and see if someone can’t help you.

    With regard to undo/redo, I believe it all depends on the size of the focus area, and I’m not sure how MS does it for, say, Word, or Excel, etc.

    But for short stuff, what I posted above should work in a universal sense, but apparently not in your case.

    Nevertheless, if anyone wanted to shorten the iteration in the above, they could replace the loop above by starting right at the end of shorter string, like this —

    for(int i = iLen2, x=0; i < iLen1; i++, x++)
     szAnswer[x]=str1[i];
    

    This simply confines the interation to the missing characters.

    Here is a small Win32 Console application that will demonstrate a very simple way to determine which characters have been deleted. You can easily adapt this to a Win32 App, add iterations to it, and so on

    #include <iostream>
    #include <string>
    
    using namespace std;
    
    #ifndef MAX_PATH
    #define MAX_PATH 256
    #endif
    
    int main()
    {
           int iLen1, iLen2, iResult;
           char str1[]="The old red box.";
           char str2[]="The old red";
           char szAnswer[MAX_PATH]="";
    
           // strcmp() will be greather than 0
           // if str1 is longer than str2
           if(strcmp(str1, str2) > 0)
           {
        iLen1=strlen(str1);
        iLen2=strlen(str2);
        iResult=iLen1-iLen2;
    
        cout << "The number of missing characters is " << iResult << endl << endl;
    
        // now lets see which characters are missing
        // we iterate through the entire length
        // of str1, which is the full text, but
        // we only start puting characters into our
        // result when we get to the end of str2
        for(int i=0, x=0; i < iLen1; i++)
        {
                        if(i >= iLen2)
            {
                szAnswer[x++]=str1[i];
            }
        }
    
           cout << endl << "The missing characters are --" << endl << endl << szAnswer << endl << endl;
          }
    
          return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI, i need a XML parser. i want to know that which one is
I want to detect words in text, i.e. I need to know which characters
I need to know which stored procedures are running. It's not an option to
I need to know which views does a user have which privileges on. I'm
I need to know which physical column is associated to a persistent's attribute. e.g.
I'm writing code on the master page, and I need to know which child
I need to use method like: DoSomething<(T)>(); But i don't know which Type i
I am doing a project, for which I need to know all the wikipedia
Need to know this so that i could send DTMF and that is going
Which characters need to be escaped before being inserted into a JET Engine data

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.