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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:04:04+00:00 2026-06-11T10:04:04+00:00

There is an externally running program that i need the capability to resize. The

  • 0

There is an externally running program that i need the capability to resize. The kicker for me is that part of the title is the version and other specific information related to that instance. I know the substring that should be consistent across versions.
I have attempted the Findwindow() function, which works well if you have the exact wording of the title, but not when you only have a portion. I have also tried EnumWindows, but i believe that has the same limitations (i didn’t have much luck with it).
I feel the simplest thing i could do (if possible) would be to get the window handle from the image name in order to do my resizing.
Ideas?

  • 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-06-11T10:04:05+00:00Added an answer on June 11, 2026 at 10:04 am

    Here’s a working piece of code I just tested on MSVS 2010 that works perfectly:

    #include <stdlib.h>
    #include <string.h>
    #include <tchar.h>
    #include <windows.h>
    
    
    BOOL CALLBACK FindWindowBySubstr(HWND hwnd, LPARAM substring)
    {
        const DWORD TITLE_SIZE = 1024;
        TCHAR windowTitle[TITLE_SIZE];
    
        if (GetWindowText(hwnd, windowTitle, TITLE_SIZE))
        {
            //_tprintf(TEXT("%s\n"), windowTitle);
            // Uncomment to print all windows being enumerated
            if (_tcsstr(windowTitle, LPCTSTR(substring)) != NULL)
            {
                // We found the window! Stop enumerating.
                return false;
            }
        }
        return true; // Need to continue enumerating windows
    }
    
    int main() 
    {
        const TCHAR substring[] = TEXT("Substring");
        EnumWindows(FindWindowBySubstr, (LPARAM)substring);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running a C# program with mono under Cent OS. There is a fifo that
I'm writing a program that has to execute other external processes; right now the
Do i need external libraries ? is there any minimalistic example ?
I have a page that loads an external HTML page into an iFrame. There
I have a library that does I/O. There are a couple of external knobs
I need to start 1-3 external programs in my Java application that have paths
I have an java program that runs external programs executing commandline parameters. After making
I've got an Adobe Flash 10 program that freezes in certain cases, however only
Is there a way of formatting text in Vim that respects underlined headings? In
I'm wondering how to call an external program in such a way that allows

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.