|
sweep123 wrote:
sei.fMask = SEE_MASK_INVOKEIDLIST;
Per MSDN:
The lpIDList member must point to an ITEMIDLIST structure.
sweep123 wrote:
bSuccess = ShellExecuteEx(&sei);
What is the value of bSuccess ? If it is FALSE , what does GetLastError() return?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The code was lifted from the FileTreeCtrl sample on the code project site.
http://www.codeproject.com/wtl/wtlfiletreectrl.asp
When I place a breakpoint at the statement:-
m_strPath.ReleaseBuffer();
The bool is 1 and last error is zero.
Both this sample and my version are able to run up Notepad when double-click on a txt file. An image editor will run up for bitmaps.
But neither runs the CSL program associated with the ABC.CSL file.
|
|
|
|
|
While I doubt it's related to the problem at all, the calls to GetBuffer() and ReleaseBuffer() are not necessary.
What value are you assigning to lpVerb ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If I use
sei.lpVerb = "open";
then the files is opened with QuickView and that includes .txt and .log files.
The code does not generate any erros, just dont seem to be able to run the program CSL.EXE in the correct manner with this code.
As I said if I use Windows Explorer then the CSL.EXE runs OK with the selected file.
Any ideas?
Sweep
|
|
|
|
|
when i click on ListCtrl Itelm ,, its background colur is turned to blue ,
after that
when i click to an other control ... previusly Clicked ListCtrl Items background colour disaapear ,, and i not know at thia stage at which item i was clicked ,, i want to Highlight it ,, with any way ,, as in windows it change its colour to Grey,,,
any tip .. or way
thanx.
Actualy ,, it makes easy the user to see that he clicked on this item last time
thanx
|
|
|
|
|
Can you use the LVS_SHOWSELALWAYS style?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
My question may seem a bit lame. But I always twist my mind when trying to start a new project; i always have projects as they try to help me learn more.
But it takes me some time to come up with one, itried seaching the net for sites which offer list of project titles as a start point for fellows like me who waste their time wondering what to do ??
So pls if u know a site of this kind or have a list of possible ideas tell me.
Now i am finished with the project i was developing
"Digital Power System Simulation" and now ready to another??????/
|
|
|
|
|
Here is Suggestion
make a project on SmartCard's
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Well when I want an idea of something to develop, I hit sites like download.com and other shareware sites and that usual gives me some inspiration. Of course there are places like http://www.rentacoder.com[^] which have hundreds of project ideas.
Michael
CP Blog [^]
|
|
|
|
|
|
Hi,
How to trap file reading and writing in Shared Folder over a Network for Workgroups in Windows? Further more, may I trap browsing event in Shared Folder?
Thanks.
|
|
|
|
|
Is this to run on a Windows For Workgroups machine? If so, you'll be needing a 16-bit solution.
Otherwise, if the machine is NT-based, check out ReadDirectoryChangesW() and FindFirstChangeNotification() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have created a .net C# service and i am calling the service in COM.
Code below fails on CoCreateInstanceEx returns
hresult = 0x80040154,Class Not Registered.
CoInitialize(NULL);
CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
COSERVERINFO serverInfo;
ZeroMemory(&serverInfo, sizeof(COSERVERINFO));
COAUTHINFO athn;
ZeroMemory(&athn, sizeof(COAUTHINFO));
// Set up the NULL security information
athn.dwAuthnLevel = RPC_C_AUTHN_LEVEL_NONE;
athn.dwAuthnSvc = RPC_C_AUTHN_WINNT;
athn.dwAuthzSvc = RPC_C_AUTHZ_NONE;
athn.dwCapabilities = EOAC_NONE;
athn.dwImpersonationLevel = RPC_C_IMP_LEVEL_IMPERSONATE;
athn.pAuthIdentityData = NULL;
athn.pwszServerPrincName = NULL;
char *HostName = GetHostName();
//char *IP = GetHostIP();
USES_CONVERSION;
serverInfo.pwszName = A2W(HostName);
//serverInfo.pwszName = A2W(IP);
serverInfo.pAuthInfo = &athn;
serverInfo.dwReserved1 = 0;
serverInfo.dwReserved2 = 0;
MULTI_QI qi = {&__uuidof(IMyInterface), NULL, S_OK};
IMyInterfacePtr* m_pIPtr;
try
{
m_pIPtr = new IAEMMainPtr;
}
catch(...)
{
::MessageBox(NULL,"Object Fails","MyClass",MB_OK);
return;
}
HRESULT hResult = CoCreateInstanceEx(__uuidof(_MyClass), NULL,
CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER, &serverInfo, 1, &qi);
if (FAILED(hResult))
{
delete m_pIPtr;
m_pIPtr = NULL;
::MessageBox(NULL,"CoCreateInstanceEx Fails","MyClass",MB_OK);
return;
}
m_pIPtr->Attach((IMyInterface*)qi.pItf);
(*m_pIPtr)->GetString(pRetVal);
CoUninitialize();
Sathish
|
|
|
|
|
Hi there,
Is there any other way of implementing asynchronous serial communication in Visual C++ than the MFC way. The MFC way is too time consuming.
I so far have seen that _inp and _outp are only for WIN95 platform.
Any suggestions will help.
Thanks.
|
|
|
|
|
You can use CreateFile and the Win32 Communications API which contains functions like BuildCommDCB(...) etc.
|
|
|
|
|
Thanks for the reply.
Yes, you're right CreateFile() and the WIN32 Comms API can be used.
My problem is that I receive data that is between 40 and 45 bytes in length far too late. The instrument on the other side sends the data at 9600 baud every 100ms. My program must receive it by 65ms.
At the moment the data is received it at approximately 80ms, which is way too late. I have used the CreateFile() and ReadFile() with the necessary time-out, threads and event operations to read the data.
I also wrote a utility in Delphi which seem to work fine (54ms). Unfortunately the code must be in C++ as it fits into a bigger Visual C++ program.
Any ideas.
Thank again.
|
|
|
|
|
My application have to offer a dialog to select a file to be deleted.
I've tought to CFileDialog but it is useful only to open or to save a file.
Is there a way to have a dialog to browse files in order to select a file to be deleted ?
Thank you very much !
|
|
|
|
|
You can just use CFileDialog to select the file, by just display the "Open" dialog and with the filter flags OFN_HIDEREADONLY | OFN_FILEMUSTEXIST and just change the title of the dialog (I think there is a member function to do that) or that a look at m_ofn member data.
|
|
|
|
|
You can still use a File Open dialog to ask for a file name to be deleted; you'll need to change the title and the caption on the action button to Delete.
To change the title, set the m_ofn.lpstrTitle member. Changing the action button's caption is harder: I think you'll have to create a hook procedure which handles WM_INITDIALOG; in the handler, call SetWindowText for the button with the IDOK control ID (which you can get with GetDlgItem).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I would use CFileDialog to select the file, show the path in an editbox and let the user press delete.
This way the user can rethink his/her decision.
so my advice would be:browse button to select (show path in editbox)
delete button for the obvious action of deleting the selected file;)
MessageBox to confirm.
hope it helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
here your solution->
Use this little Piece of code
CFileDialog a(TRUE);
a.DoModol();<br />
CString sr=a.GetPathName();<br />
::Unlink(sr);
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I created a MFC dll in which I created a dialog and i placed a OCX over it.But when i domodal that dialog from a exe the dialog is not displaying but when i remove the ocx control the dialog is displaying properly.what will be the problem?
thanks,
john
|
|
|
|
|
Sounds like AfxEnableControlContainer() has not been called?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi,
i want to include any animated images(.gif) into richedit box. Is it possible or not.if, tell me how it can be done.
thank you.
|
|
|
|
|
I m building my own installer,
and want to install my application at client machine . where VC++ is not installed .. wt dll's r required or files required to sent with my EXE ... ,, that build was using static Link library n Release mode configuration. r they ( files/dll)differ with operating system version Win 98 / XP /2000
or any other way
thanx
|
|
|
|