|
If you can't move it, why do you want two dialogs ? You could handle WM_MOVE in one and move the other, and make the bottom one frameless, but it will always be a hack. If you explain why you want to do this, perhaps I can give better advice.
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
|
|
|
|
|
Why i needed 2 dialog boxes was my application is a custom dialog app.I need to paint Non-client area(border,caption etc..).
||------------|| ------>CAPTION
||------------|| -----> PART 1
|| ||
|| ||
----------------
|| ||
|| || ------> PART 2
||------------||
Bitmaps disaplyed as a border for part 1 & 2 are different.So i thought of using diff dialog boxes.
Any idea,how can i achieve this?
Regards
Neha
|
|
|
|
|
I would have thought if you're drawing them yourself you can just draw the two different parts ? It would be a lot simpler.
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
|
|
|
|
|
You can do that easily with property pages
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Could you please tell me how?
Thanks
Neha
|
|
|
|
|
It's pretty straightforward. Create a new dialog as a property page type, give it a class (as you would with any normal dialog)
then in the main dialog, do something like this
m_pxSubDialog = new CSubDialog( this );
m_pxSubDialog->SetAnyOptionsEtc();
m_pxSubDialog->Create( IDD_DIALOG_RESOURCE_NAME, this );
m_pxSubDialog->SetWindowPos( ... );
m_pxSubDialog->ShowWindow( SW_SHOW );
(where m_pxSubDialog is a member of the main dialog class, of the type of your new sub dialog, and IDD_DIALOG_RESOURCE_NAME is the name of the dialog in the resource editor.)
To close the sub dialog from the main dialog, use
m_pxSubDialog->DestroyWindow();
delete m_pxSubDialog;
m_pxSubDialog = NULL;
To make your sub dialog communicate with the main one, you can pass messages back from the child to the parent window
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
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.
|
|
|
|
|