|
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
|
|
|
|
|
I need to inicializate a vble with the name and the path of a file that is in the directory where I have the program .exe and I have other vbles that depend on where the user places the files. How can I do it so that the program dinamicly accepts it without the user having to modify it?Thanks
|
|
|
|
|
If i understand it correct you are trying to get the directory where your .exe is working .
You can get it like this
CString strFullPath;
LPTSTR pBuffer = strFullPath.GetBuffer (MAX_PATH);
GetModuleFileName (NULL,pBuffer,MAX_PATH);
strFullPath.ReleaseBuffer ();
I hope this helps.
Orcun
|
|
|
|
|
Hi, my problem is, thet i want to write a logon/password dialog for all windows versions.
I have written some code which disables alt+esc and alt+f4 and alt+tab.
I used a low level Keyboard hook to do this.
But I am not able to disable Ctrl+Alt+Del.
I even thought about implementing some Onscreen Keyboard (code from codeproject). But i think this is not so good for a password dialog.
Any suggestions are welcome.
thanks
Bernd
|
|
|
|
|
There is no reason your hook shouldn't be able to catch CTRL-ALT-DELETE.
|
|
|
|
|
Yes, but why not??
I've read the MSDN up to now, but the only thing i get is this:
It#s not possible to disable Strg+Alt+Del under Win2k. Only way to do this is to write a replacemant of the Windows Gina DLL.
But I don't want to do this. ( To much effort)
I MUST be possible with an other method, because i have seen an application disabling it (i don't remember the app. )
Please let me know if you can help me.
thanks
Bernd
|
|
|
|
|
<quote>Yes, but why not???
... Because Ctrl+Alt+Del is the NT SAS (Secure Attention Sequence) which, due to the C2 security requirements, can only be intercepted by a trusted GINA .DLL -- so, as you point out, the only way to disable it would be to replace the default GINA.DLL with your own and implement WlxLoggedOnSAS() to return WLX_SAS_ACTION_NONE whenever it receives a WLX_SAS_TYPE_CTRL_ALT_DEL notification
|
|
|
|
|
Hi, my problem is, thet i want to write a logon/password dialog for all windows versions.
I have written some code which disables alt+esc and alt+f4 and alt+tab.
I used a low level Keyboard hook to do this.
But I am not able to disable Ctrl+Alt+Del.
I even thought about implementing some Onscreen Keyboard (code from codeproject). But i think this is not so good for a password dialog.
Any suggestions are welcome.
thanks
Bernd
|
|
|
|
|
In NT/2000 use gina dll!
in 95/98 use SystemParametersInfo
hi
|
|
|
|
|
Does anyone know how to launch the "Properties" common dialog box from an application?
I mean the dialog that's produced from the context menu in Explorer (right click -> Properties)
What information is needed in order for the dialog to display the properties of a file, does it just need the path and filename??
Thanks in advance!
Liam O'Hagan
Senior Test Engineer
GLI Australia
www.gli.com.au
|
|
|
|
|
|
Grrrr it doesn't seem to work!
I'm using the following code...
ShellExecute(NULL, "properties", Filename, NULL, NULL, 0);
where Filename is a CString containing the absolute filename i.e. c:\temp\test.txt
I am using it in a handler for double clicking on a listbox containing a bunch of files, similar to the listbox on the right of explorer..
Any ideas anyone? I'm stumped...
Senior Test Engineer
GLI Australia
www.gli.com.au
|
|
|
|
|
Hello,
I got a small linking problem, I get this error:
TabCtrlEx.obj : error LNK2001: unresolved external symbol __imp__PathCompactPathA@12
Debug/FileOpus2.exe : fatal error LNK1120: 1 unresolved externals
I try to use ::PathCompactPath(...);
I do include the "shlwapi.h" file in my project, but still doesn't want to work.
Any tips?
Cheers,
Henrik
|
|
|
|
|
You need to link with shlwapi.lib too, so the linker knows which DLL contains the PathCompactPath() function. On the Link tab of your project settings, add shlwapi.lib.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|