|
Erik Kallen has written an impresive clone of this APIs working in Win9x systems. Check his article Updating Resources on Win9x.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanx
In my dream, I was dorwning in my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
Hi Guys,
i am creating an app with a doc/view architecture. The base class of my view class is CListView. Now i am using the InsertColumn function of CListCtrl. After that i am inserting some strings with the InsertItem function. The problem now us that i am changing the font, and the font of the Column also changes. WHY ?? I want that the Column Font stay always same and only the inserted String font wwould be changed...
Please see code:
void CFVCtrlView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
CListCtrl &lCtrl=GetListCtrl();
lCtrl.InsertColumn(0,"Header",LVCFMT_LEFT,300);
lCtrl.ModifyStyle(0, LVS_SORTASCENDING | LVS_REPORT | LVS_EX_FULLROWSELECT );
lCtrl.SetBkColor(RGB(160, 184, 207));
}
.
.
.
void CFVCtrlView::SetFonts()
{
CListCtrl &lCtrl=GetListCtrl();
CFont *font=(CFont *)this;
font->CreatePointFont(100,"arial");
lCtrl.SetFont(font);
lCtrl.InsertItem(1,"Hello World",0);
}
Please help if anybody can...
Its really urgent.
regards
sonu
|
|
|
|
|
It's really obvious when you think about it - you've set the font for the list control, so the list control uses that font.
I don't know of any way to fix this apart from making the list owner drawn and storing a font, or font details, for each cell that doesn't use the standard font of the control as a whole. That doesn't mean there *isn't* another way, I've never tried to do what you're doing.
Chris's grid control in a form view may provide the answer, I'm not sure if it does per cell fonts or not.
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
|
|
|
|
|
How can I change the title caption of a dialog (CDialog) object?
I want to do the following:
CSetupDlg::OnShowSummary()
{
CString sMyTitle;
CSummaryDlg dlg;
// Somehow, set the title of the Summary Dialog
// with sMyTitle, today's date, or "The Summary is..."
dlg.doModal(); // I might use modeless case - must work both ways.
}
Thanks all!
Happy Holidays (BTW, http://www.crackermatic.com was funny )
|
|
|
|
|
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
|
|
|
|