|
Thanks for the reply.
Still i didn't understand this line:
Create a new dialog as a property page type
Could you please explain me that?
|
|
|
|
|
Ok, select the resourceview tab in the your project's workspace, rightclick inside the dialog folder, and select "Insert...". A window of options will appear. Open up the "Dialog" group and select one of the IDD_OLE_PROPPAGE_xxx options (there's no difference between the LARGE and SMALL options bar the size that it starts the dialog in the editor, so it doesn't matter)
You'll now have a borderless dialog which you can design as you would any other dialog. When you use the code I gave, it'll insert that dialog inside the window of your main dialog (and becomes part of the main dialog as far as a user is concerned)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hello,
Problem description:
Send information from the program using the default mail client.
Browsing through MSDN, one possible way seems to be using the CSMTPConnection and CMimeMessage Classes from the ATL Server library.
Is there an alternate method?
I have tried similar stuff in VB. The code for the same is attached. However it limits the mail client to Outlook.
*********************************************
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add "C:\Hello.txt", olByValue, 1, "Hello World"
Set myRecipient = myItem.Recipients.Add("rainadeepti@rediffmail.com")
'save the item before sending it off.
myItem.Save
myItem.Display
*********************************************
Thanks in advance.
Regards,
Deepti
|
|
|
|
|
From memory you can use ShellExecute (or CreateProcess ), passing "mailto: email@address" as the process name. Look these up on MSDN to find out the exact format. This basically creates a new mail message using the default mail client. You can add attachments etc. using other command line parameters, the only thing you can't do (i don't think) is send it automatically (the user has to click "send").
-Alex
|
|
|
|
|
Thanks Alex.
Using ShellExecute, I am able to open the default mail client but my main problem is to attach a file to the mail message. Could you provide me a sample for that.
Regards,
Deepti.
|
|
|
|
|
::ShellExecute(NULL, NULL, "mailto: email@address.com \"C:\\scandisk.log\"", NULL, NULL, SW_SHOW);
You can also set things like the subject (&subject=) and (&body=) in the same string that you set the mailto: and file. Exactly how you format it i'm not sure but if you play around with it you should be able to do just about everything except for automatically send it. For that you need to use MAPI or automate Outlook.
-Alex
|
|
|
|
|
Thanks alex.
I had the syntax for adding the subject and body of the mail.
Its written as..
ShellExecute(NULL,"open","mailto:dr@dr.com?subject=Registration&body=Registration code is alpha",NULL, NULL, SW_NORMAL );
subject and body are keywords defined in teh MSDN help for mailto.
However guess the documenters missed out on attachements.
Thanks for clarifications.
Regards,
Deepti.
|
|
|
|
|
Hi,everyone!
Look at the following statements,
--------
sockaddr_in.sin_addr.saddr = htonl(NULL);
sockaddr_in.sin_port = htons(0);
--------
What means NULL ip address and port 0?
Cheers,
George
|
|
|
|
|
both the same NULL is #define'd' to:
#define NULL 0
|
|
|
|
|
Thanks, Almond pal!
You helped me a lot.
Cheers,
George
|
|
|
|
|
Go to Desktop and when you right click, u will see the short cuts.Can I add my text.exe to that list, if yes how??
|
|
|
|
|
I've pasted a section from the MSDN library showing where to register your context menu handler
(that is what you want isn't it?) so it would be effective. I'd start with "Folder" and then
work you're way through... If you wanted ONLY the desktop to have your menu item rather than
all directories, then that's a different question...
Good luck,
Iain.
Predefined Shell Objects
The Shell defines additional objects under HKEY_CLASSES_ROOT which can be extended in the same way as file types. For example, to add a property sheet handler for all files, you can register under HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers.
The following table gives the various subkeys of HKEY_CLASSES_ROOT under which extension handlers can be registered. Note that many extension handlers cannot be registered under all of the listed subkeys. For further details, see the specific handler's documentation.
Subkey Description Possible Handlers Version
* All files Shortcut Menu, Property Sheet, Verbs (see below) All
AllFileSystemObjects All files and file folders Shortcut Menu, Property Sheet, Verbs 4.71
Folder All folders Shortcut Menu, Property Sheet, Verbs All
Directory File folders Shortcut Menu, Property Sheet, Verbs All
Directory\Background File folder background Shortcut Menu only 4.71
|
|
|
|
|
I have knowed thant the ADODC being connection with DataGrid,but ,i want to
connection the MSFGrid to ADODC, who do know ? please tell me ! thanks !
as if he has a broject ,Please emaill to me ,my address:
xufeng.yuan@nyprochina.com
|
|
|
|
|
I want to use CSocket class, connect() in non-blocking mode. Is it possible??
|
|
|
|
|
|
Hi!
I have modified the sample application from MSDN lib and having a trouble: Custom Control with interfaces
CEdit
A
|
|
CParsedEdit
A
|
|
CParsedEditExport (for custom controls)
Now I change design pattern: extract interface from implementation, and enable RTTI in compiler option, theoretically:
CEdit IEdit(abstract as interface)
A A
| /
| /
CParsedEdit
A
|
|
CParsedEditExport (for custom controls)
Here is the code:
interface:
class IEdit {
public:
virtual void setText(TCHAR* text)=0;
virtual int getText(TCHAR* text, int count)=0;
};
class CParsedEdit : public IEdit, public CEdit {
public:
virtual void setText(TCHAR* text) { SetWindowText(text); }
virtual int getText(TCHAR* text, int count) { return GetWindowText(text, count); }
protected:
....
};
user:
class CWclsEditDlg : public CDialog {
public:
IEdit* Edit1()
{ return dynamic_cast<IEdit*>(GetDlgItem(IDC_EDIT1)); }
IEdit* Edit2()
{ return dynamic_cast<IEdit*>(GetDlgItem(IDC_EDIT2)); }
IEdit* Edit3()
{ return dynamic_cast<IEdit*>(GetDlgItem(IDC_EDIT3)); }
IEdit* Edit4()
{ return dynamic_cast<IEdit*>(GetDlgItem(IDC_EDIT4)); }
....
};
Does anyone know how to solve this?
Thanks.
Sovann.
|
|
|
|
|
Hi, everyone!
I have seen both help in Linux man and MSDN and still puzzled.
Who can tell me what is the major difference between the two APIs?
Cheers,
George
|
|
|
|
|
I've never heard of it, but according to MSDN, the recvfrom has two extra, optional parameters :
from [out] Optional pointer to a buffer in a SOCKADDR structure that will hold the source address upon return.
fromlen [in, out] Optional pointer to the size, in bytes, of the from buffer.
If the from parameter is nonzero and the socket is not connection oriented, (type SOCK_DGRAM for example), the network address of the peer that sent the data is copied to the corresponding SOCKADDR structure. The value pointed to by fromlen is initialized to the size of this structure and is modified, on return, to indicate the actual size of the address stored in the SOCKADDR structure.
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
|
|
|
|
|
recvfrom is used with UDP to get the source socket address of a packet.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks, Smith!
I also find that recvfrom can get more src address information.
It is another useful usage of recvfrom.
Cheers,
George
|
|
|
|
|
hello every1
-VC7: in the IDE open an exe/dll file to examine the resources
-i can see the resources tree (dialogs, icons etc.)
-i can edit/copy any resource but only staying within this tree
Question:
-how to insert one of these resources (for example a complex dialog to use it as a starting point for layout a similar one) into an existing project?
thanks in advance for any tip
best regards
|
|
|
|
|
In VC 6, resources were a text format which you could copy between projects. I dunno if this is still the case tho.
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
|
|
|
|
|
lbc wrote:
hello every1
-VC7: in the IDE open an exe/dll file to examine the resources
-i can see the resources tree (dialogs, icons etc.)
-i can edit/copy any resource but only staying within this tree
Using VC++ I personnaly usually have both the current resource tree open, and I do a open file, adding the other .rc file in the open windows. Then I can select and copy a resource from one of the trees, and paste it to the other.
VC++7 does not change anything to this.
Now if you are using VC++7 with a managed C++ project, it's of course a different matter. You can't copy/paste resources from/to a .rc to a .resx
In fact, what you need is a VC add-in. But I wonder how many years you have to wait before someone comes with such a useful tool (which should have been provided by the way by MS). These days, people on Cp seem to love articles for instance explaining how to crack a url, even though at the end they just use ::InternetCrackUrl(). As long as we are stuffed with this kind of sh*t, I am afraid you are unlikely to see anything good for you or for the overall dev community.
Good luck!
Back to real work : D-16.
|
|
|
|
|
add the resource to ur project,copy those resource you require into your resource. It may give some error when you compile update the string table if required
hope it solves your problem
|
|
|
|
|
udayGovekar wrote:
add the resource to ur project,copy those resource you require into your resource. It may give some error when you compile update the string table if required
What do you mean ? Aren't you saying that although you can copy/paste resources from two projects, it won't work in the end ?
udayGovekar wrote:
hope it solves your problem
Not mine, eh.
Back to real work : D-16.
|
|
|
|
|