|
Like my signature states...
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i just want to know how to hangle colors for various controls in win32 api... i am not getting it to the right place... examples or internal and external links may help... how to color the foreround and background of any window ? ...
|
|
|
|
|
|
See WM_CTLCOLOR* for Doalog/Button,...
|
|
|
|
|
Hello
As you know, there is an explorer page on the left side of
Windows Explorer(since XP), unless you activate the treeview
or search page by clicking the "Search", "Folders" button on the main toolbar.
When you are in the normal document folder,
it shows "File and Folder tasks" "Other Places" "Details"...
and when you changed to the music folder, it shows "Music Tasks"
group about music playbacks(play all,music shopping),
and in the photo folder, it shows "music tasks" group:
"Slideshow, Print Photos... etc" in it.
What I want to do is to insert my own task group in the
explorer page such as "my own task". Clicking
one of buttons on "my own task" may launch linked programs.
(just as "play all" button launches Windows Media Player)
I searched all the MSDN documents about this,
especially in Shell Extension part,
but I failed to get any information on this.
Does anyone know a bit about this?
Just a starting point will be a great help to me.
Thanks in advance.
|
|
|
|
|
Hi,
I am trying to notify the user about events of my application by placing an item in his outlook inbox. Currently, I create a MailItem and save it (see below). This brings two problems:
1. The sender field cannot be set. (It's always empty)
2. The e-mail is flagged as unsent message and thus the user can edit and send it.
Is there a direct way to create pseudo-E-Mails in the Inbox or a solution to the problems above? I cannot send a real e-mail, as notifcations have to be instantaneous.
Thanks a lot.
Dominik
Code:
MAPIFolderPtr pInbox;
_ItemsPtr pInboxItems;
_MailItemPtr pNewMail;
pInbox = pMAPI->GetDefaultFolder(olFolderInbox);
pInboxItems = pInbox->Items;
pNewMail = pInboxItems->Add();
pNewMail->Subject = "New Mail Subject";
pNewMail->Body = "New mail body\n";
pNewMail->PutTo("someone@server.com");
pNewMail->Save();
pNewMail->Move(pInbox);
|
|
|
|
|
gunkel wrote: 1. The sender field cannot be set. (It's always empty)
Probably because you've not set it to anything. Use the SetSentOnBehalfOfName() method.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks so far. Actually in my VC++ 2005 with Outlook 2007 its called PutSentOnBehalfOfName(). Why is that? Just curious...
Anyway, the message ist still an "unsent message", which allows the user to edit and sent it. A functionaly that brings me into troubles. Any ideas?
|
|
|
|
|
gunkel wrote: Anyway, the message ist still an "unsent message", which allows the user to edit and sent it.
"Sent" messages really only exist on the recipient's machine, rather than on the machine in which they were created. In general, there are three different types of messages: sent, posted, and saved. Sent messages are traditional e-mail messages sent to a recipient. Posted messages are created in a public folder. Saved messages, which is what you have, are created and saved without either sending or posting.
gunkel wrote: A functionaly that brings me into troubles.
Why?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am trying to notify the user about events of my application by placing an item in his outlook inbox. This has to look just like an e-mail that has arrived via a POP-account. (I cannot send it via POP3 or the like, because the notifications have to be instantaneous.)
Because:
1. this must be read-only. (currently not the case)
2. the user must be able to use the reply function in Outlook. (currently not the case)
Thanks.
|
|
|
|
|
i just want to know how to write ftp programs using win32 C style... also how to write networking programs using win32 api's... so i can upload my files automatically at some specific interval to the server...
|
|
|
|
|
Please have a look at MSDN.
Regards,
Paresh.
|
|
|
|
|
Jayapal Chandran wrote: i just want to know how to write ftp programs using win32 C style
Have a look at this[^] it can be very useful (if you wish to buy it.
And for a FTP server have a look at this[^] (it's free for personal use)
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Jayapal Chandran wrote: i just want to know how to write ftp programs using win32 C style...so i can upload my files automatically at some specific interval to the server.
How about FtpPutFile() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
how to set password to mdb file,programatically..??
thanks in before
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is it possible to check how many variable arguments are passed to a function?
Best regards
Hansjörg
|
|
|
|
|
No, when using ellipsis to pass arguments you should always give the number of arguments,
or a way to get them like sprintf.
codito ergo sum
|
|
|
|
|
Have a look here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
May be that I have missed something. but here I don't can find something about the number of arguments...
|
|
|
|
|
The sample shows how you can implement functions with a variable number of arguments using C.
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.
|
|
|
|
|
HOw this works I know. But I need a way to know the number of variable arguments. Because if no one are used, I want to optimize the function...it's a lot faster.
Best regards
Hansjörg
|
|
|
|
|
if optimization is your concern, then avoid to use variable number of arguments (or use a mechanism such as the main one, i.e. an array of arguments and its length passed to your function).
BTW, referring to the MSDN sample (link given by Roger Stoltz) [^], nothing prevents you to use the marker to indicate the total number of arguments: does this fit your needs?
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.
|
|
|
|
|
The marker is not so a good was i think...
The problem is that it is not possible to define 2 methods in a class (same name). One with variable length parameter and one without...This would be the best solution for me too...
I want to make a logger class in this way...
class Logger{
void Log(LPCSTR format,...);
void Log(LPCSTR message);
}
something like that. It is easier for the user to have allways the same name...Do you know any solution for that? arrays are also not so good..it's not easy to use...
if not I have to give the function another name....
Best regards
hansjörg
|
|
|
|
|
hansipet wrote: Do you know any solution for that?
No.
BTW, why don't you emulate the behaviour of cout instead of the one of printf ?
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.
|
|
|
|