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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:30:48+00:00 2026-05-12T19:30:48+00:00

For example, suppose I’m editing following text (\t is for tabs, it’s not text)

  • 0

For example, suppose I’m editing following text (\t is for tabs, it’s not text)
‘\t\t\tSome text…’
and my input keyboard position is right before ‘S’ (there is no selected text)
and I want to get number of tabs before ‘S’ (in this case it’s 3)

So how to get that number of tabs using Win32 API?

p.s.
Maybe some function to get whole current line (and then parse that text)?

edit:
So I want my program (that is running in background and does not have a GUI) to determine number of tabs from current active line in any text editor that is currently active (that I’m editing in).

  • 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-12T19:30:48+00:00Added an answer on May 12, 2026 at 7:30 pm

    For some applications such as the standard Windows Notepad, it may be possible to do this from another application. Notepad itself is little more than big Win32 “Edit” control inside a resizeable window, so all the regular Win32 Edit control messages can be used to get the actual text and the caret position and so on.

    However, in the general case of any Windows text editor, there is no requirement for applications to use a Win32 Edit control for their text editing needs (and in fact, to do so would be just reinventing Notepad). There is no standard Win32 API method to find out where the caret is pointing, because the application is free to draw text on the screen in any way it sees fit (and will store that text internally inside the application with no corresponding API for you to call).

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

Sidebar

Related Questions

Example: Suppose in the following example I want to match strings that do not
For example suppose I have the following two functions function a(param1) { console.log(param1); }
For example suppose I have the following app.get('/', function(req, res) { var ip; if(req.headers['x-forwarded-for']){
An Example Suppose we have a text to write and could be converted to
Is there a standard function that returns the position (not value) of the maximum
For example suppose I have something like the following http://jsfiddle.net/wxXav/ When a user clicks
For example suppose I have the following within my HTML <script src=/socket.io/socket.io.js></script> The script
For example suppose I have the following string we went to the (big) zoo
I want to get values from two tables like in the following example: Suppose
For example suppose I have 1.csv, 2.csv, ... , 20.csv. Is there a simple

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.