|
I need to make the following (very common I think) thing: an edit box for the e-mail address and a button "create new mail" using entered address.
The existing implementation of this function does not suit me because it's not working without properly setup e-mail client . The implementation is call to ShellExecute function with URL like "mailto:a@a.com..."
I've examined winzip using regmon (by sysinternals, Mark Russinovich & Bryce Cogswell). It opens key HKLM\Software\Clients\Mail, takes default client name, opens its key right here and uses the specified dll
Then "create new mail" window of the e-mail client opens.
May be there's some one else knows how to do that???
konst
|
|
|
|
|
The HKLM\Software\Clients\Mail registry key is used by MAPI - I think it's not necessary to read the settings and call DLL 'manually'. CDocument::OnFileSendMail creates a message with serialized document as an attachment and opens a default email client - have a look on this method.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Does anyone have any idea how to copy all the files and subdirectories of a directory I choose and exclude all the debug directories(for backup purpose)
Thanks in advance
Le Ridder Noir
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
I'm using batch files and compression program for that. Basically, I have a batch file that searches .dsp file for lines containing references to project files. These lines look like this:
SOURCE=.\myfile.cpp
Then, I'm replacing "SOURCE=.\" with nothing; the result is list of files included by project. This list is passed to the archiver, which makes a compressed file.
I'm pretty happy with this solution; the only problem I initially had was related to the resource files - it turned out that you can have some file (.ico, for example) referenced by .rc, but not .dsp.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Does anyone have any idea how to copy all the files and subdirectories of a directory I choose and exclude all the debug directories(for backup purpose)
Thanks in advance
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
Not a true answer to your question but it may help... I use a neat little freeware program called CleanEx by Paul Dixon:
http://www.elphin.com/products/cleanex.html
Basically it deletes all the temp intermediate files made by VC in my debug and release directories.
I simply run that and zip whats left!
You can configure the types of files it deletes, so it may be useful to you.
--
The Obliterator
|
|
|
|
|
I am using the STL vector from VC++
How can I look at the entries like MyVector[0]
The Compiler says
'overloaden operator not found ' (Translatation from German)
can somebody help me?
|
|
|
|
|
I thought operator [] was there. In any case, you should use MyVector.at(0) because it does bounds checking for you.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi
I have a class Line which has 2 endpoints as members and Drawing() as method.
I just declared a CTypedPtrList of pointers to Line in document .I accessed the list in view by GetDocument() and created the instance of Line and added to list.I want to modify the values of end points so that i can draw another line with same pointer.I am able to reflect the changes in OnDraw() but I want to serialize the data which i modified.i am able to serialize the data which i have given at the time of creating the instance of the class(pointer which i am storing in list) but not the modified values.I am getting the pointer from list and modifying the
values after assigning to another pointer.to reflect the changes what i have to do?
Thanks for ur help.
bhikshapathi_g@semanticspace.com
|
|
|
|
|
OK the background information first, I am writing a dialog based application that sits on top of a database (sounds exciting already doesn't it). If the user clicks the Customer button he is magically transported to another dialog (remarkable) that has a ListCtrl in Report mode that lists all the Customers (OK, so far so good).
The next amazing leap of logic requires me to enable the user to update or delete customers. I thought that I would have the user click on the required Customer row (logical isn't it?) and then enable Change/Delete and process from there.
Problem is when I click on a row only the first column in that row is highlighted (not the whole row) and I have to click on the data itself not just the cell (I know it's not a cell per se (been wanting to use that phrase for years) but you get the idea).
Now I have been into ClassWizard and looked at the available messages and the associated descriptions that appear at the bottom of the dialog box and none of them seem to be the one I want. I tried a few and they weren't the one's I wanted, I could only get recognition of a click to a ListCtrl header.
I then tried using Spy++ (I am not experienced with this tool) but all I could see were mouse move, mouse button down and destroy messages. None of which helped me.
Questions are -
1. What message should I be looking for when clicking on a ListCtrl row?
2. Can I get the whole row to highlight?
3. If a ListCtrl is the wrong control what should I be using?
Any other hints, tips or suggestions eagerly accepted.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
1. What message should I be looking for when clicking on a ListCtrl row?
LVN_ITEMCHANGED
2. Can I get the whole row to highlight?
YourListCtrl.SetExtendedStyle ( LVS_EX_FULLROWSELECT );
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Mike
thanks very much for the reply. Will give these a go after the kids go to bed. They are due home any moment now and toddler keeps climbing up on my lap and thumping the crap out of the keyboard.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Be aware that the full row style is only available with IE4+ commmon controls. So your user has to have at least IE4 installed or you need to install them.
|
|
|
|
|
OK, have just been reading a couple of articles that refer to the Platfrom SDK and that I can get it with MSDN, purchase it from Microsoft on CD or download it from here.
The first two are out while the third kept giving me error messages about not having the correct authorty to access it.
So I did a quick search on Google and was taken to the Platform SDK download page. As I was working from home today and there is no way in hell I would download the SDK over a dial-up line I took control of a server in the office and proceeded to download the ~840KB executable.
I assumed that I was to then run it, tell if I wanted typical/custom/what ever install and download the relevant (read all) bits like I can with the Internet Explorer download. Problem is it gives me an error message about not being a valid msi file.
Is it possible to get my hands on the SDK without having to resort to buying it (yes I'm a shameless cheapskate)? And if so how?
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
|
Markuk
I am running Windows 2000 on my laptop and on the Server I attempted to perform the download from. According to the instructions I do not require the Microsoft Installer update. I thought the problem might have been that the server did not have Visual Studio installed and that the SDK only installs from the web and does not download the installation files.
It also could have been a corrupt downloaded file, which I will test when I get in to the office tomorrow.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
ftp.microsoft.com is down at the moment. The Platform SDK is FTP-able, the path is something like /developer/platformsdk - it's obvious once you see it. However, you should use a dedicated FTP client to get it (I use LeechFTP), since IE is woefully inadequate for mass FTP downloading.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Mike
that two for two. Tried ftp.microsoft.com earlier but only used IE, I have LeechFTP but for some strange reason didn't fire it off. Also tried /developer/platformsdk and /developer/platformsdk/feb2001 but couldn't get anything to work.
Will wait till I'm in the office tommorow and give it ago with LecchFTP. I assume Anonymous login is OK.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Hi,
What is performance this code ? What doing ?
void DoEvents()
{
MSG msg;
while(::PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
{
if(!AfxGetThread()->PumpMessage()) return;
}
}
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I think what it is doing is translating and dispatching all the messages that are in the current thread's message queue -- if there are any. I've seen something similar before; I think it was a trick used to update a dialog box's controls during a supper lengthy operation.
Sort of like this;
...
for ( int i = 0; i < 10000000000000000; ++i ) {
wndListBox.AddString ( arrayOfWayToManyStrings[i] );
DoEvents ();
}
...
I'm not really sure if this is good practice or not... but if you find that your using it frequently, you might consider doing the UI processing in a separate thread.
Someone correct me if I'm wrong.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Thank you very much ...
I'm very very beginner in Thread programming, i mean i'm very beginner in using functions that work by Messages, if possible please write FULL for me about SendMessage and GetMessage and DispatchMessage and PostMessage and ... and explain about Thread, what mean Thread ? how can i use of it ?
Thanks again.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hey,
Hey,
I don’t think I can tell you any more than what MSDN would.
SendMessage - Sends a message to a specified window, and does not return until the window processes it.
PostMessage - places a message in the specified window's message queue, and returns immediately.
GetMessage - looks at the thread's message queue and waits till a posted message appears, all the while dispatching any incoming messages.
DispatchMessage - Dispatches a message to a window procedure, letting it take the appropriate action. All the message handlers you add to your application get called because of this function.
As for threads you’d be better of looking through MSDN or better yet a beginner book on the subject. The book that helped me out the most was ‘Beginning Windows NT Programming’ – by Julian Templeman… it has a great section on threads and processes.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Hi Ben,
Thanks alot for your helps,
I got very notices from your reply.
If i'll find any other question i ask you ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hi Mr.Ben,
Thanks alooot for your reply ...
You said DispatchMessage, dispatch message to a window procedure, i want to know does SendMessage and PostMessage don't dispatch message to a window precedure ?!!!
So, where does SendMessage or PostMessage, dispatch messages ?
And in last, what is different between PostMessage and PeekMessage ???
Thanks again ...
Best Regards
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
SendMessage and PostMessage don't dispatch messages, they insert messages into a message queue. The thread that receives the message is responsible for dispatching the message. PeekMessage checks if there are any incoming messages in the queue and always returns immediately, unlike GetMessage which blocks until a message is received.
|
|
|
|