|
nadiric wrote: Is it possible to send a command to the operating system without causing a command window to pop up?
Yes.
nadiric wrote: This seems to be the behaviour of system(command), any alternatives?
CreateProcess() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hello comunity,
i use in some code places PeekMessage, but in some cases program never come out from
this loop!
QUESTION: is there any way to check out how many messages are in the queue, in the loop?
Just simple while() loop like this:
while(::PeekMessage(&Message, NULL, NULL, NULL, PM_NOREMOVE))
{
::TranslateMessage(&Message);
::DispatchMessage(&Message);
}
thanks for any help
break;
|
|
|
|
|
break; wrote: PM_NOREMOVE))
Shouldn't this be PM_REMOVE ?
|
|
|
|
|
Hello Prasad,
thanks for help, i try now with PM_REMOVE, i post the result here!
regards
break;
|
|
|
|
|
Hello,
yes, with PM_REMOVE is better now!
regards
break;
|
|
|
|
|
Hi All,
How do i go about allowing the user to select just a path instead of file name?
Thanks in advance...
|
|
|
|
|
karldwmoore wrote: How do i go about allowing the user to select just a path instead of file name?
CFileDialog::GetPathName() and then trim the string that you get, to get the path of the file.
For this you can use CString:ReverseFind()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I know how to get the path of a given filename, but is there away of just selecting a path i.e. folder without selecting a file? The way many installer work?
Thanks again
|
|
|
|
|
Instead of wedging that functionality into CFileDialog , try using SHBrowseForFolder(...) instead.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Just what i needed, is there a way of expanding it to allow networked drives or hidden shares i.e. "\\200.200.2.1\c$" because you cant type anything in.
|
|
|
|
|
You can use the BIF_EDITBOX flag. Have a look at the information on the BROWSEINFO structure for more details.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I have a project writed in MFC (Dialog) and button that must print something.
CDC dcPrint;
dcPrint.Attach(dlgPrint.GetPrinterDC());
On Windows98 it does't work and on Windows2000/NT it works.
But if I print something from this computer(Windows98) from another programm (for example Notepad or Word) printer works property.
Please, help me, why it does not work???
|
|
|
|
|
Have you added
dcPrint.m_bPrinting = TRUE; statement
after the above mentioned code ??
Appu..
"My blood group is not B+.But I have it my blood"
|
|
|
|
|
Hi All,
Given a directory of files say, 1.txt, 2.txt etc How do i go about processing the first file then looping around until all files have been processed. Is there a way if providing a path then processing all the files there?
Thanks in advance..
|
|
|
|
|
Take a pick from one of these:
1.
_findfirst()
_findnext()
_findclose()
2.
FindFirstFile()
FindNextFile()
FindClose()
3.
(MFC class) CFileFind
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
Your'e welcome. That's the avaiable ways, AFAIK. There might be a ATL/STL way too, but I'm not sure.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
WTL has the CFindFile class
|
|
|
|
|
And four way that is easy use of DlgDirList it fills that list with file name or folder
|
|
|
|
|
how to change the background color of the button and also for the tab controls
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
You can derived of CButton and use of WM_DRAWITEM
|
|
|
|
|
Hi all,
I want to perform file copy operations and display a progress-bar after my dialog has just been initialized and displayed with out any user action such as clicking on a button... However I cannot put that codes in the OnInitDialog() virtual function of that dialog. If I do that, the dialog will appear after all operations are ended. Please help to show me how to do that.
Thanks in advance.
|
|
|
|
|
Hi.
U r requirement is to display this progress only when user starts the file transfer operation say by clicking on any button. You can take the following approach...
1. Add the Progress at the time of Layouting your dialog box.
2. Keep that progress bar invisible.
3. When user starts file transfer process; make that progress bar visible.
U can use CWnd::ShowWindow(TRUE/FALSE) to show and hide perticular control.
Sameer Thakur
|
|
|
|
|
Thank you, Sameer_Thakur.
I just only want to start the file transfer operation automatically after the dialog box is displayed (exactly after OnInitDialog() called) without clicking any button, without any user action.
Thank you.
|
|
|
|