|
SetWindowText on the dialog.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
If I pass in the "text" I want to use, I have no problem:
CEntitySummaryDlg::OnInitDialog()
{
SetWindowText(m_captionText); // m_captionText initialized in constructor.
// blah, blah, ...
}
However, I wanted to set the caption text before the call to DoModal() in my calling routine. I guess this is not possible as CEntitySummaryDlg dlg has yet to be created.
Thanks, I think I can work with this.
Johnny
|
|
|
|
|
john john mackey wrote:
However, I wanted to set the caption text before the call to DoModal() in my calling routine. I guess this is not possible as CEntitySummaryDlg dlg has yet to be created.
That's correct - you'd need to make a variable in the class, set it before creation, and use that variable to set the text in OnInitDialog.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Here's a general solution to performing dialog initialization when using modal/modeless dialogs.
- Put your initialization code in a member function, eg: CMyDialog::initialize().
- Add a command handler macro for a custom command (eg: WM_USER + 1), which executes initialize().
- In your dialog's OnInitDialog(), post a WM_COMMAND with WPARAM = (WM_USER + 1).
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
I must be missing something - how is this better than just calling the function, or putting the code in OnInitDialog ? I understand that posting the message causes it to occur after the init message is processed, but the usual thing is to call the base method *first* so that the dialog is initialised.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
If you subclass controls, the initialization can fail in the case of modeless dialogs, since the controls' windows aren't always created when a modeless dialog's OnInitDialog() executes. Hence the deferred initialization.
The problem doesn't exist with modal dialogs, but because there's no harm in deferring initialization for modal dialogs, the same method (no pun intended) can be used.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Hi Guys,
how can i get the font face name if i just have the file name of the font.
For Example: i have the file "Comic.ttf" and i want to find out the font face name. How can I ????
Please Help me its urgent...
regards
Sonu
|
|
|
|
|
this is silly. i dont know the answer. but i found that all font file contain their name in the first line. so open and read the file charecter by charecter till u get enf of line and u can get font name. i am sorry for being stupid.
Ganesh Ramaswamy
|
|
|
|
|
I have checked your idea it but the fontface name is not always in the first line and that´s not the solution. Please try an another solution.
How can i get the file Properties ???
Maybe that will help...
Thanx anyway....
regards
Sonu
|
|
|
|
|
Please Help me with this Problem !!! Its really Urgent. I am going Angry !!!
regards
Sonu
|
|
|
|
|
I have overriden the OnEraseBkgrd function of CStatic
also postcreatewindow and drawitem are overriden, this is for the control of my static text box so i can draw directly to the box.
I would like to know how to update the box, after OnPaint does not call the OneraseBkgrd function which is where the drawing code is contained. I'm wondering if i could send a windows message with WindowProc(WM_ERASEBKGND,1918,0); could u tell me if this is the best way to update the box's content as i think it may update the entire window.
Actually that doesnt want to work... Please Help!;)
|
|
|
|
|
just call Cstatic::Invalidat(true);
|
|
|
|
|
Mmmm... if your static is on a dialog, have a look at the docs for CDialog::OnCtlColor. Might be able to do some work there if its called.
If pWnd->GetDlgCtrlID() shows up as the id of your static, you're set.
|
|
|
|
|
Hi all,
I want to select and show all records in my report,
That >= 05/10/2001 and <= 11/10/2001
What i must write in Selection formula ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello..
I want to know how to hook all mouse messages in the windows system.
(I'm writing an application that gets text input from where a mouse is pointed in every windows.) Guide me, please.
|
|
|
|
|
|
search on MSDN. They have good article and sample on hooks.
|
|
|
|
|
They tall that there are a version of Install Shield in
VC++6.0.
Is anybody know how it works?
Thanks for help.
|
|
|
|
|
You should see it in your start menu if it came with your installation.
I know it comes with the Enterprise edition of VS.
You should be able to get the basic stuff going if you read the help.
From there I guess it is trial and error.
I have done a small installer that installs some DLLs and writes some keys in the registry. It did take some time, but once you have done one, it is pretty much the same for the next one.
Cheers,
/Fredrik
|
|
|
|
|
Good morning/afternoon/night to everyone... Whereever you are. I'm developing an MFC app that will give the user audible feedback. The software needs to know whether to use the sound card (for .wav files) or use the PC speaker. The target platforms will be Win98/2000/NT/ME.
Does anyone know how to reliably detect the presence of a sound card? Thanks.
Mark
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
What functions were you intended to use to play the wav, Windows Multimedia or DirectX?
I think PlaySound returns FALSE if it can't play the wav file, you could then play a BEEP if it failed.
Michael
|
|
|
|
|
I hadn't looked too deep into what function I would use. This "sounds" (ha ha) like a nice simple solution. Thanks.
If any knows of any other methods, please let me know.
Regards,
Mark
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
You could use UINT waveOutGetNumDevs() to know if any
wave device is installed and then call the appropriate function or
use Michael P. Butler method.
|
|
|
|
|
I think this was more of what I was looking for. Thanks to all!
Mark
Make no little plans; they have no magic to stir your blood to action. Make big plans, aim high in work and hope
-- Daniel Burnham
|
|
|
|
|
hi
i think you have sound to clear my problem.
i.e i want to disable my sound card. how do i do that?
do u have any idea, reply me
Thanks in advance
regards
Halid
|
|
|
|