Hi!
I have rewrited a simple MFC application in MS Visual Studio 2008, and now it is working how i wanted. My only problem is, that i have to press a button, and i don't want. It should work automatically. I also noticed that the function are somehow called automatically.
These function are called each after:
CGetFileListDlg::CGetFileListDlg(CWnd* pParent /*=NULL*/)
void CGetFileListDlg::DoDataExchange(CDataExchange* pDX)
BEGIN_MESSAGE_MAP(CGetFileListDlg, CDialog)
BOOL CGetFileListDlg::OnInitDialog()
void CGetFileListDlg::OnPaint()
My function, which i want called automatically is :
void GetFileListDlg::OnBnClickedButtonGetFileList()
. If i call my function from OnPaint
(which is last called), my application is working, but i can't see nothing, untill the functions have ended. OnPaint
is called more than 20 times (i don't know why). So what should i do(if it is possible somehow), that after OnPaint
my void CGetFileListDlg::OnBnClickedButtonGetFileList()
function should automaticall be called?
Thanks in advance!
kampi
EDIT:
What my CGetFileListDlg::OnBnClickedButtonGetFileList() function does is this: It queries for two given path for the filelist and then compares them. OnPaint is called more than 20 time, and that's the reason why this isn't good for me, because when i call this function there, it will be called more than 20 times, and why it is being called the OnPaint function, doesn't ends, and that's why i can't see the data. If i call my function in OnInintDialog, then it works, almost fine, but then it ends before, i can see the window.