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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:54:57+00:00 2026-05-13T17:54:57+00:00

This is my first my MFC application, and unfortunately i don’t understand, how it

  • 0

This is my first my MFC application, and unfortunately i don’t understand, how it works. I found a simple MFC application, which gets the file list of a given path. I modifyed this code for my needs, but now i have one problem. What my application should do is the following. It reads two drive letters from a file. Then gets the file list for both drives, and then compares them. If the primary drive has files which aren’t on the secondary drive then it copies it automatically. I did all this, but now i want my application to run without user interacting.It should just show the data. Unfortunately, the original MFC application started when i pressed a button. I want to takes this out, that i shouldn’t press any buttons, it just copies the new files automatically. So my problem is the following. Where should i call my function, so i don’t need to press a button. I think i should call it in here:

BEGIN_MESSAGE_MAP(CGetFileListDlg, CDialog)  
ON_WM_PAINT()  
ON_WM_QUERYDRAGICON()  
//}}AFX_MSG_MAP  
ON_BN_CLICKED(IDC_BUTTON_GET_FILE_LIST, &CGetFileListDlg::OnBnClickedButtonGetFileList)  //this is the original  
//call my function here
END_MESSAGE_MAP() 

But i don’t know, which event i should use. I made all my changes what i needed in CGetFileListDlg::OnBnClickedButtonGetFileList() function, so this is why i want to call it. I don’t know if this is important or not, but during the copying i want to show which file am i currently copying.

Please someone help me!

Thanks in advance!

kampi

  • 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-13T17:54:57+00:00Added an answer on May 13, 2026 at 5:54 pm

    You can simulate a button click for your button within the OnInitDialog() function (just before return TRUE;):

    PostMessage(WM_COMMAND, MAKEWPARAM(IDC_BUTTON_GET_FILE_LIST, BN_CLICKED), 0);
    

    Note: You may need to call UpdateWindow() on your button handler in order to have the window refreshed.

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

Sidebar

Related Questions

problem euler #5 i found the solution but i don't know why this first
This is my first MFC application away from VC6, and I feel a little
This is my first time using joomla. I don't know if I'm using the
I have found this example on StackOverflow: var people = new List<Person> { new
I have an application written in C++ and MFC (VS 2008 SP1) which is
In a text file like this: First Name last name # secone name Address
I am aware of both this and this questions. Which unfortunately didn't quite answer
I have a css rule like this in my css file: .Island_VerticalMenu:first-child { width:
Ok, I have this first table which has, among other things: table 1: id
This is my first batch file, and also my first time with batch language

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.