|
ramyasangeet wrote: But my problem is,If file name has space(Ex.Race car),then the directory is not created.
It works well in my code as:
if(!CreateDirectory("Race car", NULL)) {
AfxMessageBox("Error CreateDirectory.");
}
Maxwell Chen
|
|
|
|
|
I use the same coding.
if(!CreateDirectory("Race car", NULL)) { AfxMessageBox("Error CreateDirectory.");}
This is not creating directory with name Race car.
just i need to remove the space and i have to create directory with name like Racecar.
how to do that??
cheers
sangeet
|
|
|
|
|
Show me the error code.
if(!CreateDirectory("Race car", NULL)) {
DWORD ErrorCode = GetLastError();
CString sTxt;
sTxt.Format("Error code: 0x%08X", ErrorCode);
AfxMessageBox(sTxt);
}
Maxwell Chen
|
|
|
|
|
but it work
CreateDirectory("c:\\AA000017060102021015",NULL);
whitesky
|
|
|
|
|
i have mentioned my prgoram under and i am tryin to read the path where the acrobat reader is installed from the registry. though RegQueryInfoKey is returnin a positive result for the key, but when i query for Value 'Path' in the key the return value(szProductType) is empty
HKEY hKey = NULL;
LONG lRet = NULL;
char szProductType[1024] = { '\0' };
DWORD dwBufLen=1024;
LPDWORD Path;
int size = 8192;
LONG appExist;
TCHAR regPath[] = TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\AppPaths\\AcroRd32.exe");
appExist = RegQueryInfoKey(HKEY_LOCAL_MACHINE,NULL,NULL,NULL,NULL,NULL,NULL,Path,NULL,NULL,NULL,NULL);
lRet = RegOpenKeyEx( HKEY_LOCAL_MACHINE, (LPCWSTR)regPath, 0, KEY_ALL_ACCESS, &hKey );
lRet = RegQueryValueEx( hKey, (LPCTSTR) "Path", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
|
|
|
|
|
|
Hi
I want to add a contect menu on the right click of Recycle Bin Folder.
Please guide me how to do this.
Thanks
|
|
|
|
|
How To make Icon Background transperent.
|
|
|
|
|
in the windows desktop... which is possible in windows 2000 and above only. u just have to set the appearance of the desktop. in case u are makin the icon then u have to specify the area that u want to be transparent with a paricular color and add that color at the left top corner.
|
|
|
|
|
I want Mycomputer type of Icon,even After Changing background of the desktop the icon is visible in same fashion.
I am using VC++6,Is there any utility for making this type of custom icons.
With my Icons they are transperent with perticular color scheme only,otherwise
they are showing white square along with icon.
|
|
|
|
|
In VC++6, there is an image that looks like a computer monitor filled with cyan (it's in between the current color selections and black/white.
Left or right click on this, and then you can paint the pixels that should be transparent in your icon with the current tool.
Hope that helps.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
but what if I want to have a custom icon.
|
|
|
|
|
Maybe I'm mis-understanding your question.
Are you talking about customizing your application icon when your .exe is on the desktop? Just edit the IDR_MAINFRAME icon (or the first one on the list, I believe).
You can add different sizes and color depths of icons by clicking on the button to the right of the "Device" combobox. It should pull up a dialog box telling you what type of icon you can add, like 32x32 (256 colors), etc. Is that what you're looking for?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
If u want to draw a icon,
use the following WM_PAINT of any control which is using as place holder (static text/picture box etc
ImageList_Create
LoadIcon
ImageList_AddIcon
ImageList_Draw
|
|
|
|
|
|
ppatel567 wrote: Here why not only header files for CMyApp and CMySpec are not added.
Why such kind of syntax?
They are called Forward Declarations. The header files for these classes will be included in the CPP file.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
It is not always possible to include header with desired declaration, in some cases you just don't want class CPatel to heaviliy depend on CMyApp. In such cases (and if CMyApp only encounters in CMyApp* form) it is easier to make such preliminary declaration.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
This is called a Forward Declaration. The class CPpatel no doubt uses the services of the classes CMyApp and CMySpec and as such will have members that refer to them. If CPpatel has a member variable of, for example, the CMySpec class then you need to #include its header as the compiler needs to know its size to define CPpatel . For example:
class CPpatel
{
..
..
..
CMySpec m_TheSpec;
};
If, on the other hand, the CPpatel class contains a pointer or reference to the CMySpec class then the compiler doesn't need to know the object's size as all pointers/references to a class are the same size. In this case you can use a Forward Declaration and you don't need to #include its header. For example:
class CPpatel
{
..
..
..
CMySpec *m_pTheSpec;
};
This is a good thing as it minimises the dependencies of the header file and thus increases the stability of the project (in terms of maintenance) and decreases compile times.
Sometimes Forward Declarations are used to break cyclic dependencies but I'll not go into that at this stage.
Steve
|
|
|
|
|
|
Well, you don't have to use it anyway In most cases it can be avoided.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
Why would you want to avoid it? Minimizing dependencies in a header files is a good thing.
Steve
|
|
|
|
|
Stephen Hewitt wrote: Minimizing dependencies in a header files is a good thing.
I second Steve's opinion!
Maxwell Chen
|
|
|
|
|
It takes years of experience for you to understand what grigsoft said. You will learn it from coding larger-scaled programs.
Maxwell Chen
|
|
|
|
|
ppatel567 wrote: I sometimes noticed that in the header file its only written asanyheader.h=======class CMyApp;class CMySpec;
thats we call forward decalaration of class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|