|
Hi,
Wonder anyone can answer my Question. I need to create a directory with many sub-directories using c commands. Which command to use and if possible where to find to source code. THKS.....
|
|
|
|
|
CreateDirectory - Win32
mkdir (or maybe it's _mkdir) - Standard "C"
Take a look in the MSDN.
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
Hi,
Thks for the tip...
Thks and regards.
|
|
|
|
|
MakeSureDirectoryPathExists() - Win32 only, but this is recursive
Dave
|
|
|
|
|
There is no API that works on all OSes, however SHCreateDirectoryEx() works on Me and 2K+ if that restriction is acceptable to you.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
i have created a service that interactes with desktop
only then when i select a service in a service window and right click on it and after clicking the properties i select the logon tab.
after that i have to click check box that contain following text?
---------------------------------------
allow service to interacts with desktop
---------------------------------------
is there any way to do it in my program i am having exe of service and source code in csharp it solution does not exist in dot net but its solution is here in vc++?
r00d0034@yahoo.com
|
|
|
|
|
Haven't I answered you already. From what I remember I have given the symbol to use and the WIN32 API method to call. You haven't followed my answer by an acknowledgement of whether it did anything good for you. Which is already a BAD thing, let aside you didn't even thank.
Now this renewed post looks like an insult to me.
Back to real work : D-17.
|
|
|
|
|
first of let me say that
i am very sorry for that.
a bundle of thanks for your previous help .
yes you told me the win32 api i know that.
[DllImport("advapi32.dll", CharSet=CharSet.Auto)]
public extern static IntPtr CreateService(IntPtr databaseHandle, string serviceName, string displayName, int access, int serviceType, int startType, int errorControl, string binaryPath, string loadOrderGroup, IntPtr pTagId, string dependencies, string servicesStartName, string password);
MY service has been created in csharp may i have to
re-create it in vc++ to do this ?
or it is possible with the existing service?
i am very much confused about this win32 api?
there are a number of perameters although i study the msdn?
but i am confused where i have to call it in my code existing code or i have to creat it again in vc++?
r00d0034@yahoo.com
|
|
|
|
|
Hi,
I've to make an application that allows the user to write his own script(VB Script) and the application has execute that script does anybody has an idea of how to go about it. any ideas would be greatly appreciated.
Thanks & Regds,
Vijay.
|
|
|
|
|
Does it have to be vbscript ? Python provides an excellent interface for allowing users to enter their own script and running it within the app.
Does the script interact with the app, or just run on the machine ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Hi,
thanks for your reply. it can be any script. only thing is it should interact with the application.
|
|
|
|
|
i am having string's like following examples in a loop
-------------------
@123456
@65465498
@-65465498
123456k
65465498 k
-65465498 l
how are u
nice dear
--------------------
these are the strings that i want to convert them into integer value but they also contain characters and speces and sentances. how to convert valied strings into int?
can any body tell the good check so that ?
is there any way to neglect character in a string?
r00d0034@yahoo.com
|
|
|
|
|
Why are you asking this on the C++ forum, having found out how to do it in C# ? Is it a bad enough problem to change languages over ?
In C++, you have some functions called ::isalpha and ::isalnum. If the first returns false and the second returns true, you have a number. These functions take a character, not a string. You need to use these functions to parse your strings, then use atoi on the strings that you've verified have only numbers, or built to have only numbers.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
thanks a lot for your answer?
i hope you have found your answer?
r00d0034@yahoo.com
|
|
|
|
|
imran_rafique wrote:
thanks a lot for your answer?
You're welcome.
imran_rafique wrote:
i hope you have found your answer?
Yes, thanks. I asked a couple of questions a day or so ago, got some pointers, looked them up in the MSDN and all is well with me. Good luck with your project.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
I am afraid that you have to write your own function,test the left side of your string,if it's not a integer or a "+" or "-",trim it off,and then use the function "atoi" to convert the remainder string to integer.
|
|
|
|
|
Can someone explain what does it mean by saying "ascii coded hex"?
Does it mean treating 0x1000 as each single character '1' '0' '0' '0'
thanks
|
|
|
|
|
peter ho wrote:
0x1000
"0x1000" is 'ascii coded hex'.
1984 : that is ascii coded decimal
0001010101 : that is ascii coded binary
'ascii coded hex' means : 'the number has been printed in hexadecimal form'.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
hey, i just have a plain project created by the MFC app wizard, and i'm trying to get a CTabCtrl working, i tried followinf the help...
1. Define the control in the view or window class.
2. Call the control's Create member function, possibly in OnInitialUpdate, possibly as early as the parent window's OnCreate handler function (if you're subclassing the control). Set the styles for the control.
but whatever i do it just comes up with a debug assertion failed, any ideas/advice ? thanks,
luke
|
|
|
|
|
Hi
I want to display time according to Windows settings. I tried this:
strftime(pString, nStringSize, "%#c", tmtime);
but it haven't done what I want, date is formatted in english (not in my windows language) and also don't look like my date settings. Thanks in advance for any hints.
Mariusz Popiolek
|
|
|
|
|
Check out ::GetLocaleInfo( ) and the LOCALE_SLONGDATE LCTYPE.
If you are using MFC then I suggest you check out COleDateTime::Format( ) as well.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Im trying this code in a dialog with only a button when you push it this code is executed:
void CBorradlgDlg::OnButton1()
{
OPENFILENAME ofn;
char szFile[512];
char title[]="Title openfilename";
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = GetSafeHwnd();
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter = "Object\0*.obj\0All\0*.*\0Text\0*.TXT\0";
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
ofn.hInstance=0;
ofn.lpstrCustomFilter=NULL;
ofn.nMaxCustFilter=0;
ofn.lpstrTitle=(LPSTR)title;
ofn.nFileOffset=0;
ofn.nFileExtension=0;
ofn.lpstrDefExt=".obj";
ofn.lCustData=0L;
ofn.lpfnHook=NULL;
ofn.lpTemplateName=NULL;
if(GetOpenFileName( &ofn ) != TRUE)
{
DWORD Errval=CommDlgExtendedError();
switch(Errval)
{
case CDERR_DIALOGFAILURE: AfxMessageBox("CDERR_DIALOGFAILURE "); break;
case CDERR_FINDRESFAILURE: AfxMessageBox("CDERR_FINDRESFAILURE "); break;
case CDERR_NOHINSTANCE: AfxMessageBox("CDERR_NOHINSTANCE "); break;
case CDERR_INITIALIZATION: AfxMessageBox("CDERR_INITIALIZATION "); break;
case CDERR_NOHOOK :AfxMessageBox("CDERR_NOHOOK "); break;
case CDERR_LOCKRESFAILURE: AfxMessageBox("CDERR_LOCKRESFAILURE "); break;
case CDERR_NOTEMPLATE: AfxMessageBox("CDERR_NOTEMPLATE "); break;
case CDERR_LOADRESFAILURE: AfxMessageBox("CDERR_LOADRESFAILURE "); break;
case CDERR_STRUCTSIZE: AfxMessageBox("CDERR_STRUCTSIZE "); break;
case CDERR_LOADSTRFAILURE: AfxMessageBox("CDERR_LOADSTRFAILURE "); break;
case FNERR_BUFFERTOOSMALL: AfxMessageBox("FNERR_BUFFERTOOSMALL "); break;
case CDERR_MEMALLOCFAILURE: AfxMessageBox("CDERR_MEMALLOCFAILURE "); break;
case FNERR_INVALIDFILENAME: AfxMessageBox("FNERR_INVALIDFILENAME "); break;
case CDERR_MEMLOCKFAILURE: AfxMessageBox("CDERR_MEMLOCKFAILURE "); break;
case FNERR_SUBCLASSFAILURE:AfxMessageBox("FNERR_SUBCLASSFAILURE "); break;
}
}
}
Debug version throws CDERR_INITIALIZATION error
Release version works fine
where is the error?
Im using XP VC6 SP5
Thanks.
|
|
|
|
|
oh my God what a silly bug some hours later i find the solution , there was an uninitialited variable
char szFile[512]<big>=""</big>;
|
|
|
|
|
Hi ya'll,
I'm using MFC and I've got a class 'CMyComboBox' that I've derived from 'CComboBox'.
When I subclass a combobox that was created from a dialog template resource, all messages that were intended for the combobox's original windproc go through my message map now . I can at my discretion pass them along to the original windproc. I'm fine with all of this behavior so far.
Now let's suppose the user clicks the drop down arrow. A 'WM_LBUTTONDOWN' message comes through my message map FIRST. Now suppose that I ignore it and pass it along to the original windproc, and it determines that it's time to drop down the list box portion of the combo. A 'CBN_DROPDOWN' notification message is sent to my PARENT window (the dialog, a CWnd based dialog), SKIPPING my message map entirely. Also suppose the dialog's message map has no handler for this notification so it is reflected back to the combobox. ONLY THEN does my message map get a chance to handle this notification message .
I want my CMyComboBox classes message map to receive the notification messages from the original combobox's windproc BEFORE they go to the parent window. AND what if the parent window handles the notification instead of just reflecting it?? Then 'CMyComboBox's message map will never know ???
does anybody know a way to receive notification messages from a subclassed window WITHOUT relying on reflection.
Part of my motivation is to port the control into an ATL activeX, and I'm not sure if the CWindow base class has all the same reflect functionality as MFC's CWnd base class.
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
Maybe having a look at MFC source code can shed some light on how reflection is implemented in this framework --then maybe you can just replicate the method.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|