|
Iman Ghasr-e-fakhri
|
|
|
|
|
Hi Steve
Please mote Help me
Iman Ghasr-e-fakhri
|
|
|
|
|
|
Hi
I want to use CreateProcess Function,
but this function not work true (not execute my .exe file).
Thanks a lot.
|
|
|
|
|
Hi,
I used the function CreateProcess in many applications.I can even start an ATL Service!
The code goes like this .
STARTUPINFO suinfo;
memset(&suinfo,0,sizeof(suinfo));
PROCESS_INFORMATION procinfo;
BOOL result;
for(int i=0;i<10;i++)
{
result=CreateProcess("<path of="" yr="" exe="">","",0,0,FALSE,NORMAL_PRIORITY_CLASS,0,0,&suinfo,&procinfo);
if(result)
{
cout<<"Client process created\n";
}
else
{
cout<<"Failed to create the client process\n";
exit(0);
}
}
This will work !
Y.Yamini Devi
|
|
|
|
|
<<< In the name of GOD >>>
Hi,
I need algorithm about sorting 1 to 9:
This program can give integer array and must sort this array.
for example:
int MyArray[5] = { 8, 0, 1, 4, 9 };
Sorting(MyArray, 5);
.
.
.
void Sorting(int Array[], int nNumber)
{
.
.
.
// MUST PRINT SORT RESULT
// IT MEAN:
// 0
// 1
// 4
// 8
// 9
}
I need this function very fast ...
Thanks for reply.
Hadi Rezaie
|
|
|
|
|
Hi all,
I wrote my function,
I'm so happy ...
Hadi Rezaie
|
|
|
|
|
I know you did it (bubble sort I presume) and I would encourage you to learn these sorts of things, but I would always consider using STL for containers and algorithms, because they are COOL !!
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi all,
I wrote my function,
I'm so happy ...
Hadi Rezaie
|
|
|
|
|
I have an owner drawn combo box where i do drawing in DrawItem function
I am placing a combo box in the resource editor and setting its properties to ownerdrawvariable and has strings. When I do this it works fine but I want to set these from the code because i won't have to remember them all the time.
I did this
void CXXXCombo::PreSubclassWindow()
{
ModifyStyle (0,CBS_OWNERDRAWVARIABLE|CBS_HASSTRINGS);
CComboBox::PreSubclassWindow ();
}
it did not work. Why ? How can i set these from the code by subclassing a combobox
Thanks.
|
|
|
|
|
Ok, now i'm kinda a beginner but, I think you need to use GetStyle and then or(|) the other to style bits on top of the getstyle return.
|
|
|
|
|
Put your ModifyStyle() call in PreCreateWindow() instead.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
How do I place controls like a CComboBox on a flat CToolBar derived toolbar?
|
|
|
|
|
make a dialog bar instead
its easier
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Yeah, but then I can't have it be the same height as my other toolbar, and I can't have flat toolbar buttons.
|
|
|
|
|
ok ... i see your point ... i won't say it can't be done (every time i say such a thing i find out it can be and i'm beginning to believe that anything can be done given enough time and effort) ... that said however i think to achieve what you want will take some considerable effort as toolbars are not designed to have other controls in them (afaik) ... why not make a dialog bar and do custom drawing of the buttons you want to be flat? it might be easier than the other option
now i await to be told it is easy ... just use CWhateverToolbar etc etc
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
I know how to place CComboBoxs on the old toolbars, but it doesn't work on the falt ones.
|
|
|
|
|
Are there any essays out there that describe how program updating works? Would anyone be interested in writing such an essay? I'm writing a program that I plan to be consistently updated. Hopefully someone out there has a fairly streamlined idea that will make the update quick and painless for the user.
Thanks in advance for any info that you can give me!
-Michael
|
|
|
|
|
Hi,
I am trying to find whether file is read only or not on NT system.
The file permission is set using NT explorer, right mouse click on file->properties->Security and EveryOne just Read Only.
But the Read only attribure is not set.
When I use the standard C function
"access(filename, 02)" or CFileFind::IsReadOnly
it returns the file is writable (since the read only attribute is not set).
But in reality this file is not writable, since EveryOne has Read Only access.
How do I access this windows NT specific access permission to determine
the file is read only or not.
I would appreciate any help regarding this. Any sample code....
Thanks
Kumar
|
|
|
|
|
Hi,
See CFileStatus in MSDN.
Hadi Rezaie
|
|
|
|
|
Hi,
I appreciate your prompt response, I already tried this one too.
This will return read only if a file "attribute" is flagged "Read Only".
CFileFind also work based on "Read Only" attribute set on the file, if the file is "not flagged" "Read Only",
it does not look at the Windows-NT ACL security settings.
In my situation, the file is not marked read only (i.e is the read only attribute is not set)...
but I used file->properties->security and Removed the existing settings and added EveryOne -> Read. This makes the file read only even though the the attribute is not set to Read Only.
What happens here is file itself is not read only, but it is made read only for certain users using NT security settings.
If I add one more setting for individual user and give "FULL Control" that user can write to the file.
But the Standard C functions access() and
CFileFind::IsReadOnly() looks at the attribute setting not at the security level settings. So what happens is, these functions return the file is writeable, even though we can not write to it.
I have no clue how to get actual file permissions based on the Security settings
Any info regarding this will be highly appreciated.
Thanks
Kumar
|
|
|
|
|
Hi
I have a problem with SHFileOPeration. I want to copy files from Hard Disk to Floppy Disk. When no disk is inserted in my floppy disk, the message.... is Try or Cancel. When i clicked Cancel, the return value of SHFileOPeration is 0 like if the function works correctly.
How can i know if 0 means thats the copy is good or the action was cancelled ?
Thanks
Eric
|
|
|
|
|
Hello,
I start at least 4 threads in my program (besides the main program thread).
They all have ::WaitForSingleObject(...); in them, one is for file notification update, one is for other stuff, anyway, my question is, how much does this IMPACT on program speed & memory consumption in general (depending on CPU and memory)? (I'm working on a small file manager app coded in MFC).
If anyone got any comments I'm happy to here them. How many threads could one run with ::WaitForSingleObject(...); in them before it would get noticable (depending on CPU and memory)?... How many threads does a normal window program run, and a Windows 95/98/XP session in general?
So all you thread experts, gimme comments!
Cheers,
Henrik
|
|
|
|
|
A thread that is blocked in a WaitFor...() call uses no CPU time. If all your threads are running, the CPU will be doing more context-switching, which is an expensive operation (on the order of 200 CPU cycles, IIRC).
Each thread uses memory, of course, for its stack and whatever state info the OS keeps on it. But if your threads are blocking for the majority of the time, I don't think you'd run into problems.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
I saw many examples how to write context menu shell extension for IE, but is it possible to do the same fo IIS 5.0 ? The example references or same articles would be very prishieted..
Thanks a lot
|
|
|
|