|
I recommend reading this[^] article. It's well written, and includes an easy-to-use communication framework and a full-duplex chat client-server app.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I have a wizard derived from propertysheet. It is a modal dialog which is invoked using DoModal(). Immediately after the wizard is displayed, I want to popup a dialog. But i'm not able to track the exact point after the wizard is shown. In which method of the wizard can i do this ???
Thanx for ur help.
|
|
|
|
|
Try doing in the OnInitDialog of your wizard.
|
|
|
|
|
At the end of the sheet's OnInitDialog() method, you'll need to post a user-defined message. In the handler of that message, instantiate the other dialog and call its DoModal() method. You cannot do the latter directly from the sheet's OnInitDialog() method.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
If you use a modeless dialog box you can create it and show it within the OnInitDialog method of the wizard.
Basic idea
1) Create dialog
2) Call ShowWindow for the wizard (Ensures that the wizard is shown)
3) Call ShowWindow for the dialog (Shows the modeless dialog)
before returning from the OnInitDialog of the wizard.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Thanx for all ur responses. Its working now !!!
I tried first to post a user defined message from the sheet's InitDialog. But that did not work as expected. Then i tried the same from the InitDialog of the property page. And it worked just as required.
Thanx again.
|
|
|
|
|
I have a 4-page document to print out. The first 3-pages are
printed in landscape. This I can do.
The last page needs to be printed in portrait. After the first
3-pages are printed, how can I change the orientation to portrait
without prompting the user to print again and this time select
portrait.
I use this code to switch to landscape:
BOOL CFormOptions::SetLandscape(CPrintInfo* pInfo)
{
tagPDA pPrintDlg;
AfxGetApp()->GetPrinterDeviceDefaults (&pPrintDlg);
pInfo->m_pPD->m_pd.hDevMode = pPrintDlg.hDevMode;
LPDEVMODE devMode = pInfo->m_pPD->GetDevMode();
if (devMode)
{
// devMode->dmPaperSize = DMPAPER_LEGAL;
devMode->dmPaperSize = DMPAPER_LETTER;
devMode->dmOrientation = DMORIENT_LANDSCAPE;
GlobalUnlock(devMode);
}
return DoPreparePrinting(pInfo);
}
and I call a similar function with DMORIENT_PORTRAIT just before
I print the 4th page, but it still prints in LANDSCAPE. Any idea
on how to change the orientation during the print process for just
that last page?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
From where are you calling this function? Based on the fact that you are returning DoPreparePrinting() I will say you are calling it from OnPreparePrinting() . According to this MSDN page[^] you should be setting the page orientation in OnPrepareDC .
In OnPrepareDC you would update your DEVMODE structure as you have done, then call CDC::ResetDC with the updated DEVMODE to change the orientation.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
The secret is that you need to call pDC->ResetDC(&sNewDevModeStruct) after you call pDC->EndPage() for page 3 and prior to calling pDC->StartPage() for page 4.
ResetDC is the magic behind print jobs that have pages that are 1) different orientations 2) sourced from different paper bins 3) different paper sizes.
See MSDN for more info.
onwards and upwards...
|
|
|
|
|
is it possible to have a 256 color bitmaps in c++ resource?
includeh10
|
|
|
|
|
|
Use the import functionality to add them into the resource.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
|
I am using visual C++ .net
I want to try out a simple program by adding a close button on a dialog
what should I type on the
void TryDlg::OnBnClickedButton1()
{
}
Thanks
|
|
|
|
|
Take a look at EndDialog.
Or calling OnOk() or OnCancel() works also but DoModal will return IDOK or IDCANCEL then.
|
|
|
|
|
Thanks
OnCancel works well for the program
|
|
|
|
|
|
|
hiho@ll
i'm using Visual Studio .NET 2003 and a Setup Project for my Application
For my application i set a link in the program menu to my application
but it just opens the Folder of my programm and not the program directly!?
I was using the Target option in the Link Options of my Setup project
and i Can only set "Application Directory" as the target
how can i set the Target to Application Directory\myprog.exe?
thx @ll
|
|
|
|
|
maybe u can use inno setup instead.
i had ur problem before.
inno setup is very good except it can not replace files which is in using properly - maybe i lost some features of the setup, u can try it.
u can find downlod link in this forum or by google.
includeh10
|
|
|
|
|
hiho
thx for ur reply
but i made it already
i just clicked in the window for the client file system the "Add Link" Option and choosed the "primary output for myapp"
so the target changed to "primary output for myapp"
excuse for my bad english, i'm not using the english Version of Visual Studio
|
|
|
|
|
I am trying to find a way to extract and send the contents of TEXT FILE 1, via email, to a list of email addresses in TEXT FILE 2.
So just to clarify, I would like some code which will rip the contents of Text File 1 and send the contents to everyone in Text File 2.
Any help received will be greatly appreciated.
Thanks,
|
|
|
|
|
Where do you want help, In taking the contents of text files or sending the email?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
|
if SPAM, first fine is $4,000, second is $1.2 million.
amount of fine varies with countries by the law.
this replay is for in case that you don't know.
hope u can ignore the info.
cheers
includeh10
|
|
|
|