|
guillaume.dauphin wrote:
I've visual studio .net 2003...
It helps to state this type of information up front so we don't go chasing rabbits!
guillaume.dauphin wrote:
...it's the way to call my program in c (to put in the MFC appli) that I don't know...
Perhaps you are looking for CreateProcess() . It allows you to "run" an application based on its name.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Do you anybody know how to lock a folder that just can be opened by my own process?
It means if you want to open this folder it doesn't work.
And no compression. In command line , you can not open the folder either.
try again
|
|
|
|
|
You can try for folder not opening, use IShellExecuteHook interface.
Implement a class derived from IShellExecuteHook.
Then in your COM component, derive your class from this (your IShellExecuteHook-derived) class.
The Execute(LPSHELLEXECUTEINFO lpsei) method will inform you that the user has tried to open the folder by double-clicking.
But it will not handle the Explore command.
For that you can develop a BHO by implementing IObjectWithSiteImpl and in its Invoke method, catch DISPID_NAVIGATECOMPLETE2 event.
As for the Command prompt,
May someone else or GOD help you.
this is this.
|
|
|
|
|
|
Hello
I am working with MFC. When i insert a bitmap to dialog, the buttons and edit boxes behind that bitmap disappears. Can anyone tell me how can i make them visible.
Thanks
We Believe in Excellence
|
|
|
|
|
you should UPDATEDATA(FALSE)before insert.luck.
|
|
|
|
|
Aqueel wrote:
When i insert a bitmap to dialog, the buttons and edit boxes behind that bitmap disappears.
What would you expect to happen when a bitmap is placed over the other controls? Explain in more detail what you are trying to accomplish and maybe a more suitable solution can be offered.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello
I want to insert a bitmap on dialog as background image so that all other controls are placed on this image. When i try to do this i mean when i put a bitmap on dialog, all controls that should come over the image go behind that image and are not shown in output. How can i make them visible?
We Believe in Excellence
|
|
|
|
|
U got the solution in MSDN forum. right??
VC++ programmer
|
|
|
|
|
No Sir
There is no responce from MSDN forum yet.
We Believe in Excellence
|
|
|
|
|
There is no MSDN forum. If you are referring to the microsoft.public.vc.mfc newsgroup, you received two responses within an hour after your post. One of them referred you to here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello,
Can you help me? I have some questions about C++.
Right now I learn how to write code in C++, I am a newbie.
1. I make a simple application that needs binding data from Microsoft access to datagrid using Microsoft jet driver, can you make a simple function for it or maybe a sample?
2. I also want to make the application that can update the dataset and database; can you give me another sample of it?
3. Can you make a sample for adding data from textbox and updating it to database?
I hope it’s not too much, I need your help so I can learn write the code from you. Thanks.
Regards,
Indra.
|
|
|
|
|
First try to study what is ODBC.
We Believe in Excellence
|
|
|
|
|
Have you look here[^]?
<italic>Work hard, Work effectively.
|
|
|
|
|
go through the ADO library. It is COM component implemented some easy to use interfaces. If u dont know how to use the com components, first learn that. becasue, most of the library is coming with the com technology.
VC++ programmer
|
|
|
|
|
I'm trying to write a simple file manager and want to be able to detect changes to file associations, and then get the new/changed icons. Getting the notification isn't so hard, but the it's what to do when
I get it that is the problem. I get icons from the system by calling SHGetFileInfo() and unfortunately this function seems to cache the icon indexes in the system image list for a given filetype. So even if the icon for say, mp3 files, has been changed by the user while my application is running, SHGetFileInfo() still reports the original icon index.
Any ideas ?
|
|
|
|
|
Changing file attributes for a file is no problem (e.g. using the SetFileAttributes() function).
Is there an equivalent for doing this for a directory?
Thanks in advance, hfr
PS: if using SetFileAttributes() for a directory I get a HRESULT of 2 which means: file not found
|
|
|
|
|
This works for me:
if (! SetFileAttributes("c:\\ResOrg", FILE_ATTRIBUTE_READONLY))
{
DWORD dwError = GetLastError();
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi thanks for your reply!
Sorry, I was a bit inaccurately...
I am using RAPI version of SetFileAttributes() --> CeSetFileAttributes() because I need to do this on a remote device (on a Pocket PC running Windows CE)
It seems that there is a difference between SetFileAttributes() and CeSetFileAttributes().
CeSetFileAttributes() works fine for files but not for directories. The only thing I have found about this issue is that the .NET Compact Framework does not support changing attributes on directories... (files are supported).
Since the project is written in VC++ this should not matter...
CeSetFileAttributes() always returns false and CeGetLastError() returns 0x2 (file not found...)
Any idea why CeSetFileAttributes() does not work for directories?
thx
|
|
|
|
|
rubicon_hfr wrote:
Any idea why CeSetFileAttributes() does not work for directories?
No. I've no experience with CE or the .Net framework. What folder attribute are you wanting to alter? If I am reading the documentation correctly, it states that an application cannot change the attributes of a directory in the RAM file system. Does that apply to your situation?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I assume you mean ROM, not RAM?
Of course I do not try to alter attributes of a directory which is located in ROM. In this case I'll expect a "access denied" error...
I'd like to change directory's attributes which are located in RAM or on a storage card.
I can delete or rename the directories but I cannot change the "r" or "h" attribute...
|
|
|
|
|
rubicon_hfr wrote:
I assume you mean ROM, not RAM?
No, RAM was the intended word. See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Very interesting... thx!
This code (see comments) demonstrates what happens:
<br />
CeRapiInit();<br />
<br />
CString strFileName = "\\SD-MMCard\\Temp";<br />
<br />
wchar_t wcFileName[256];<br />
mbstowcs(wcFileName, strFileName, strFileName.GetLength()+1);<br />
<br />
DWORD dwAttributes = CeGetFileAttributes(wcFileName);
HRESULT hr = CeGetLastError();<br />
<br />
dwAttributes |= FILE_ATTRIBUTE_READONLY;<br />
<br />
CeSetFileAttributes(wcFileName, dwAttributes);<br />
hr = CeGetLastError();<br />
<br />
CeRapiUninit();<br />
RAM: "The system cannot find the file specified." (ok, since MSDN says it is not supported
Storage Cards: "Access is denied." (also not supported? )
|
|
|
|
|
FYI: Conclusion - setting file attributes for directories
I tried something and here are the results:
CeGetFileAttributes()
Worked for all devices.
CeSetFileAttributes()
Not worked on a PPC2002 device (Pocket PC)
Worked on a WM2003 device (Smartphone)
So it seems that this is only supported for devices using WM2003 or higner...
|
|
|
|
|
I want to find a working Dynamic time warping algorithm in c++ to compare voice.
|
|
|
|