|
Call ShellExecute() on the file, with a verb of "properties"
--Mike--
|
|
|
|
|
I tried the following code fragment from the WM_LBUTTONDOWN handler of an SDI app
ShellExecute(this->GetSafeHwnd(), "properties", "c:\\temp\\sharedfile.txt", NULL, "c:\\temp", SW_SHOW);
This call returns the error code SE_ERR_NOASSOC (0x1f) and does not display the property sheet for the file. What's wrong with this code?
|
|
|
|
|
I tried the following code fragment from the WM_LBUTTONDOWN handler of an SDI app
ShellExecute(this->GetSafeHwnd(), "properties", "c:\\temp\\sharedfile.txt", NULL, "c:\\temp", SW_SHOW);
The file exists in the specified directory.
This call returns the error code SE_ERR_NOASSOC (0x1f) and does not display the property sheet for the file. What's wrong with this code?
|
|
|
|
|
Dear Magesh,
In the forum, you posted:
"This call returns the error code SE_ERR_NOASSOC (0x1f) and does not display the property sheet for the file. What's wrong with this code?"
I'm not sure, but I think that the "properties" and some other new verbs are only available on Windows 2000. The only ones available for Windows 95/98/NT are "open" "explore" and "print." (I think.)
Cheers,
Brian Hart
|
|
|
|
|
I want remove caption bar in Toolbar(Floating).
I try to modify stlyle of Toolbar with ModifyStyle() method
but, failed.
ModifyStyle( WS_CAPTION, NULL ) -> this is I called Method
Thanks for reading this message!
|
|
|
|
|
When the toolbar is floating there are in fact 3 (three!) windows on top of each other.
The first one is a CMiniDockFrameWnd, the second one is a CDockBar, and finaly there is the CToolBar.
So you cannot change the style of the miniframe by calling ModifyStyle for the toolbar. In fact, it is also very complicated to remove the miniframe's caption.
If you really need this, in my article "CSizingControlBar..." in the Docking Windows section here, you will find how to do it, but be warned: this is a side feature in that library, and I didn't documented it.
|
|
|
|
|
How to put selected color(Not certain whether to use resources or some other way) in to CListCtrl's second column. The selected color should be from CColorPicker(combo like CColorDialog).
|
|
|
|
|
Check out this article of mine:
http://www.codeproject.com/listctrl/lvcustomdraw.asp
|
|
|
|
|
Hello All !
I want to write an application use ActiveX, but I do not want insert in Dialog. And I think that to do this by two way:
1. Use dialog and insert ActiveX normal, but set Dialog for hide. (Application base on Dialog, only one Dialog)
2. Maybe use only ActiveX in project ?!
Need some help. Thank you very much!
|
|
|
|
|
Hello!
Here is a way to do it.
1- Add the ActiveX to your project and you will get a .h and .cpp file that descripes the control.
2- Let us say the class is CMyCoontrol
CMyControl ctrlActiveX;
if(!ctrlActiveX.Create(NULL, WS_CHILD, CRect(0,0,0,0),
AfxGetApp ()->GetMainWnd(), WM_USER + 9999, NULL,
FALSE, NULL))
{
AfxMessageBox("Could not create object");
return FALSE;
}
// Control is created successfully do your work here
......
|
|
|
|
|
Hi
just add the ActivX to your project (Project / Add to project / Components / ActiveX. This will create a cpp and a header file and you can just call Create(..).
No need for a dialog at all.
Kurt
|
|
|
|
|
Is there any way of printing an adobe pdf file using vc++ 6.0?
Any response any one can give me will be greatly appreciated.
Sincerely,
Erich J. Ruth
|
|
|
|
|
I have been posting answers in CodeGuru and now I want to become a frequenter of CodeProject.
--Anthony Mai
|
|
|
|
|
Hi.
I created a cd player of my own using MCI. It is working fine on windows 9x.
I noticed a strange behaviour on windows 2000:
If i run my player and there is no CD in the drive, my app successfully open the cd device (MCI_OPEN),
but from this point windows explorer cannot access the cd drive even if I insert a data cd.
If I run my player and a cd is present in the drive everything works fine..
Any Idea?
Yaron
Yaronmiz@clockwise3d.com
|
|
|
|
|
Hi
I noticed that when I run MS CDPlayer and the cd device is already opened by another application,
the CD Player waits untill the device is free, and then take the control over it.
I wonder how are they doing it? Is it by polling and checking the MCI_SYSINFO or Is there any
notification from windows that the CD device is available for MCI_OPEN?
Hope you have any idea.
Yaron
|
|
|
|
|
There is anyone that can help me know how to implement application like microsoft money ?
I would like to know how it's developed and if there is something tools that can help me to develop like this.
Thanks
Antonio Patarozzi
|
|
|
|
|
Hi,
I wanted to know if there is a way to cause every application (installed on my computer, even those I didn't develop) to load a specific dll...
thx
Jonathan
|
|
|
|
|
Jonathan,
I found this on Deja, but not much else. Maybe someone else will have more hands-on experience with this:
>>
Hi, All!
I have following problem: When user executes particular process(console) I need insert my DLL into this process as soon as possible. I need this for NT and 98.
There are several ways to do this but none of them doesn't give full = solution.
1. Use hooks(SetWindowsHookEx). This is nice solution that works on both systems, but my hook DLL will be loaded to target process, only when one of the events i'm hooking occurs. And this is too late for me.
2. There is some registry key where I can put name of my DLL and it will be loaded to every process. Two disadvantages: works on NT only and reboot is needed.
3. Use technique used by Richter in his book using CreateRemoteThread. This one is good, but still works only on NT.
Does anybody knows other usefull technique for doing this.
Regards, Dennis
<<
|
|
|
|
|
This can not be done. And whatever your legitimate purpose is, there must be a better approach to implement it.
And your request sounds and smells suspiciously like a virus project: It fits the definition of a computer virus
|
|
|
|
|
I agree about the suspiscious smell
Actually I think it sounds and smells more like a Worm !
(technically different animals)
Unfortunatly I believe it can be done under some circumstances.
1. Using IE 4+ with low security settings,
2. Lack of a good firewall
3. Silly user,
I'm unsure how possible it is with WinNT and W2K
but it sure works with Win98.
But as to posting how it is done,
No I won't unless the person wishing to do so,
Contacts me and explains why they wish to do it,
with a legit reason etc. And then I'll only tell them
which MS-Press books to buy
Regardz
|
|
|
|
|
Hmmmm, I hadn't though of malicious uses of the information. I don't think the info is really that hard to find, MSDN documents the processes pretty thoroughly.
I've run into circumstances that would require this process, for example, imagine you wanted to add spell checking to standard edit controls, in every application.
So, Jonathan, let's hear about what you're trying to do, so we keep everyone motivated to share.
|
|
|
|
|
Hi to all Suspicious People,
My simple purpose for that is, that I have to launch a third-party application via automation, and due to some reasons that 3rd party application, crashes. In order to "avoid" that crash dialog box, and make the crash cleaner, I wanted to catch the 2nd try exception, and when caught, to shut-down that problematic application....
That's All....
Hope you can sleep better at night now...
Jonathan
P.S.
Still intereted in answers please...
thanks
|
|
|
|
|
I am learning how to use DirectX from a book (SAMS Teach Yourself DirectX 7 In 24 Hours - although it received some negative reviews, on the whole I think it is pretty good).
I have got some DirectSound code working, but only on certain WAV files. The WAV files that work properly have 8 as the wBitsPerSample member of the WAVEFORMATEX structure. The ones that don't have 0 as this value (what actually happens is that the sound plays as fast as it can go, rather than using the frequency it should be played at).
In the VC++ docs (VC++ 6) it says that that member CAN be 0 if the format is not PCM, as sometimes this member can't be used in the compression algorithm the WAV uses.
I also notice that the cbSize member can indicate that the WAVEFORMATEX structure has some extra bytes tacked onto the end, so I duly coded to allow for this and passed the extended structure to CreateSoundBuffer(). Although it didn't cause a crash, it made no difference whatsoever.
Does anyone know if I am doing something wrong? How can I overcome this problem? According to the book DirectSound can handle ANY format...
|
|
|
|
|
Hi,
I had developed a DeskBand. Now, I wish to put this DLL in download section of my website where surfer can install it from the web like Installing Yahoo! Companion. I think it can be done either using VBScript or JavaScript but need some good suggestions.
Thanks in Advance
|
|
|
|
|
You can use the VB installer or Install shield to make a package for the web. the cab will build in the registration INF which will download and install the file.
-Erik
|
|
|
|