|
Pass the first parameter to the CFileDialog constructor as "FALSE". Then you will get "save as" dialog.
|
|
|
|
|
Thanks naveen ..
i finished from SHBrowseForFolder APIs ..
now its working
Thanks for your proper response
|
|
|
|
|
raju_Code wrote: i need Save and Cancel button //
You need them for what?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
You can make use of _splitpath() after getting the complete path to the file.
Regards,
Suku PK
|
|
|
|
|
raju_Code wrote:
here output is : D:\2009\October\Visual Studio Projects\visual\centerI.TIF
but i need save this file path :
D:\2009\October\Visual Studio Projects\visual\
please how to get folder path ?
Use PathRemoveFileSpec() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
how can I write a code for scanning harmful USB devices in a good programming language and with a good GUI.I have a database for the viruses
so when the USB device is connected the software will look up for in the list and if there is a virus tehn it will prompt the user.
|
|
|
|
|
Scanning USB devices is easy enough. How would your code know whether they were harmful?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Dear Expert,
How to create visual c++ project using ADSI
|
|
|
|
|
What about documentation [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hey, I know this has been asked many times, and I've researched several solutions like atod etc,
here are some bits from my code.
CString line;
chkfile.ReadString(line)
CString token;
token = line.Tokenize(_T(" "),v);
TRACE(L"token %s\n",token);
TRACE(L"converted %d\n",_tstof(token));
chkfile is a CStdioFile.
the TRACE reads something like
token 66
converted 0
Why is always returning error code 0?
Thanks
soong
|
|
|
|
|
soongez wrote: TRACE(L"converted %d\n",_tstof(token));
%d expects an integer type
_tstof returns a double
Try with %f or %g or somesuch instead of %d.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
soongez wrote: TRACE(L"converted %d\n",_tstof(token));
Wait, so you already have your double in a string but you first want to convert to a float and then back to a string... Why don't use the string directly ?
|
|
|
|
|
Thanks the %f worked, but I used _tstof because the other double converters would give me errors such as cannot convert CString to char* because 'line' was a CString and I couldn't change it to char* when using ReadLine. I'm still pretty poor in using pointers etc.
The TRACE is just to test if the output is correct, it will be used somewhere else later in the program.
cheers.
|
|
|
|
|
Hi all,
I have created a dialog box with blue background color. i want to change the background color of message box too in that dialog.How to add background image to a message box?
Thanks,
|
|
|
|
|
AFAIK you cannot do that with standartd message boxes: you've to roll your own version of.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Of course you can !
simply subclass it
|
|
|
|
|
How do you 'subclass' the MessageBox function?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Do you need to handle the WM_CTLCOLORDLG message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Do you mean message box as in MessageBox(), or message box as in an IDC_STATIC text control?
|
|
|
|
|
Hi
Can Context menu be system modal, so that if any tool tip appears,it should display behind my context menu not above it...
Thanks
|
|
|
|
|
1/ I doubt it.
2/ How long is this menu appearing for? Yikes...
3/ If there was an answer, how long before your competitor says "Can I make my tooltip system modal, so no menu appears on top of it?"
Point 2 is the main one - a menu is a temporary thing.
If you *really* want to do your thing, make a window with lines of text that disappears when you click on one. You don't have to actually use the menu functionality of windows. It will be more work, but tough. You want something way aways from the norm, you have to do it manually.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
const char* str = "C:\\Documents and Settings\\Test\\TestData";
int i = sizeof(str);
i always 4. why?
|
|
|
|
|
KASR1 wrote: const char* str = "C:\\Documents and Settings\\Test\\TestData";
int i = sizeof(str);
i always 4. why?
Because str is a pointer and with sizeof(str) , you're NOT finding the length of the string that str is pointing to.
If you need the length of the string, use strlen (or yet better use TCHAR and _tcslen )
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i have replaced with strlen() it works fine.
|
|
|
|
|
Aside of what Rajesh R Subramanian suggested you can also try:
const char str[] = {"C:\\Documents and Settings\\Test\\TestData"};
int i = sizeof(str);
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|