|
sorry, ask more precisely: how can i bind buffer, which i receive from WSARecv (this buffer send to my server from some ftps client), to BIO object?... for future decryption...
modified on Tuesday, April 15, 2008 7:28 PM
|
|
|
|
|
Actually 2 questions.
1. In CFileDialog, is the edit control ID 1148 or 1152 under Windows XP?
2. Is the ID still the same in Vista?
I'm trying to use SetControlText to set the file extension automatically when user selects the file type dropdown.
|
|
|
|
|
I don't know how to do this, but I bet you'll spend an awful lot of time hassling with this. Is there a reason you need to do this? Normally you would just wait till the user successfully closes the dialog and then get the extension and file name from the CFileDialog.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
A lot of applications have this behavior. For example, Adobe Photoshop, in the Save As dialog, if you choose a different file type, say JPG, it would automatically set your file name to be "mypicture.jpg". If you choose BMP, it would change it to "mypicture.bmp".
|
|
|
|
|
That's true Adobe does do that. But the thing is that you're having to work around or fight the system. In doing so you're causing a hassle for yourself and for the folks at Microsoft. Go read some of the articles at the "Old New Thing" - it's full of stuff like this. What if Microsoft changes the ID? Then your code is broken. Or they change to a different technique or control? All I'm saying is that, unless there's an easy way to do this, and I don't think there is (I could be wrong), that you're fighting something and spending your time on stuff that could likely be more profitably spent doing something else.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Create your own file dialog class derived from CFileDialog and override the virutal member OnTypeChange. That member is called when the selection in the type box is changed.
Judy
|
|
|
|
|
Jason Liu wrote: 1. In CFileDialog, is the edit control ID 1148 or 1152 under Windows XP?
Per Spy++, it is 0x480 , or edt1 from dlgs.h .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hey David,
Writing this from the MVP Summit, met Mark Salsbery, Joseph Newcomer, Nish, P J Naughter. Exciting for me!
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Nibu babu thomas wrote: Exciting for me!
Indeed.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
|
Hi there
In C# is a method WriteLine in Debug class. How can I do that in a MFC win32 application.
|
|
|
|
|
duta wrote: How can I do that in a MFC win32 application.
Assuming a non-GUI application, try WriteConsole() or WriteConsoleOutput() .
If, however, you are referring to the debug window within the IDE, check out TRACE() .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
first of all, it seems that you don't exactly know what you're talking about :
duta wrote: in a MFC win32 application
even though MFC is built upon Win32, an application is either MFC or Win32, not both.
moreover, even though it is possible to have a console in a MFC program, it is a framework designed for window oriented applications.
so to reply, but not to you exact question, you still can always use the C++ mechanisms to output to the standard stream :
std::cout << "Hello World !";
|
|
|
|
|
Actually that's not entirely correct. You can change your linker settings from /subsystem:WINDOWS to /subsystem:CONSOLE and you will get a console.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
that's why i said "even though it is possible to have a console in a MFC program", but i felt the post owner wasn't that far in learning C++/MFC...
|
|
|
|
|
Damn you got me! Helps to read all the way to the end!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
many thx for your posts.
I've tried to switch to system:/console but I have this error:
error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
|
|
|
|
|
duta wrote: error LNK2019: unresolved external symbol _main...
So do you have a main() function?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
it's about a GUI using MFC.
I'm new in the field and I wish to learn. I need so see/write some variables but without using a label.
|
|
|
|
|
I find it. It's about TRACE()
I'm new and main problem is because I don't know how to use MSDN efficiently.
|
|
|
|
|
Dear Friends,
I need a progress bar which should have two values. Target and Actual. both values should be drawn on the same ctrl.
Like below
........Actual......[Target]
I already have used CMacProgressCtrl to display one value. Now i have to change it. can anybody help me out.
|
|
|
|
|
A very easy solution is to put a static control right above your progress control that indicates what 100% is. If you want to actually write on the progress control, however, you'll need to look at creating your own. Source code is plentiful, here for example.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello!
I have a Win32 application and I would like to retrieve the command line arguments passed to another application. I'm actually trying to get the command line arguments used to start each instance of svchost.exe.
Is there an API for this or do I have to implement a complex machanism? I thought of OpenProcess and different "query process information" functions after that but I could not find any solution... Can anyone help?
Thanks in advance!
|
|
|
|
|
Here is one example.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|