|
|
Thanks for the reply.
But the HSL Value i will get through that function won't match with the value displayed in the window standard color dialog box.
|
|
|
|
|
|
|
I use an owner drawn menu class. I'd like to subclass the system menu of my dialog based app. Any ideas how I can do it please? Thanks
Jeremy Davis
http://www.astad.org
|
|
|
|
|
I've never done that, so treat this as educated guess
Use SetMenuItemInfo and pass MFT_OWNERDRAW in the fType field of MENUITEMINFO struct. This makes menu item owner-drawn. Have no idea how your class works, but you should at least get WM_MEASUREITEM and WM_DRAWITEM messages.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I need to create a window, dialog, ... that shows a single string to a user. all this in 1 object, no resources, and this should work on modal and modeless parents.
what kind of MFC object should I use ?
Does Anyone has an example or suggestion ?
|
|
|
|
|
Busy == what? There will be some background work when dialog will be displayed?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz Sowinski wrote:
Busy == what? There will be some background work when dialog will be displayed?
yes, window needs to be modeless
|
|
|
|
|
What kind of background activity do you have? Is it a worker thread, or idle time processing or something else?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Something like this:
(like the MFC class CWaitCursor)
{
CWaitDialog Wait(_T("Wait a moment"));
//Perform heavy operation
} //destructor is called, Close Dialog
|
|
|
|
|
There's a problem with this approach. While your program performs 'heavy operation', no window - including main one and even your dialog - can be repainter. So your app will be basically frozen; all you can do is display a dialog with progress bar, but can't even have Cancel button.
You may consider moving background work into separate worker thread. Or - you can pump the messages periodically during 'heavy operation'.
Check the CWaitDialog class described by Jeff Prosise in the Wicked Code column in Feb'97 issue of MSJ. This article may be included in the MSDN installed on your harddisk; search for 'CWaitDialog'. If it isn't there, you'll should be able to find the article at msdn.microsoft.com
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks,
But, I've already tried this approach.
The class works fine.
The problem is that a resource template is needed.
That is not preferrable, because the class is
shared over lots of different projects
|
|
|
|
|
NikoTanghe wrote:
The problem is that a resource template is needed.
That is not preferrable, because the class is
shared over lots of different projects
Check CDialog::CreateIndirect then. It allows you to create dialog template in memory - no resources required.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks,
I've completely overlooked this feature.
|
|
|
|
|
How to use the RichText Object Classes in order to parse Win Word docs ?
Thanks.
Aziz Rajim
|
|
|
|
|
Probably better off to use the Word object.
|
|
|
|
|
HiGuys
Iam new to VC++.Today i was trying out the mtgdi example from the MSDN,butikeep getting the follwing linker error
LINK : fatal error LNK1104: cannot open file "mfc42ud.lib"
cant figure out why its happening
Help appreciated,thanx in advance
Agni
|
|
|
|
|
You're doing a unicode build in debug mode and the unicode debug MFC dll is not present.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
I want to make an animation with an image list. But how?
I have NO idea where to start.....
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Well, you need to create a timer, and then step through your images with no flicker, which means double buffering. I dunno that they need to be in an image list. The most common approach is to put all the individual frames into one bitmap and calculate your position within that bitmap ( i.e. they are positioned evenly so that jumping your across and down positions by a constant value creates frames that animate ) and do a bitblt of the part you need.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
I extracted the system32\vbscript.dll to get the type library(named RegExp.tlb). Then I add the new classes from this tlb to my project! Then I want to new one class of them named IRegExp(derived from COleDispatchDriver), but i don't know whether i need to attach the LPDISPATCH to this instance and how can i do! When i didn't attached it, that is called its default constructor, and run it, I can't not execute it normally! This program is too emengent, so i need ur warmhearted help in time!
[ccode]
void CInetSessionDlg::ParsePage(CString szPattern, CString szContent)
{
//m_regExp's declaration is on other place link this: IRegExp m_regExp;
//The class IMatchCollection and IMatch are both got from the tlb
IMatchCollection * temp;
m_regExp.SetIgnoreCase(TRUE);
m_regExp.SetPattern(szPattern);
if(m_regExp.Test(szContent))
{
temp=new IMatchCollection(m_regExp.Execute(szContent));
for(long i = 0; i < 3/*matches.GetCount()*/; i++)
{
//IMatch match = matches.GetItem(i);
IMatch match = temp->GetItem(i);
CString strLink = match.GetValue();
m_cbHref.AddString(strLink);
}
}
}
[/ccode]
Thanks u very much!
Sincerely, Davidlou
davidlou68@hotmail.com
|
|
|
|
|
http://windows.tucows.com/mmedia/preview/245548.html
|
|
|
|
|
Is this a promo-AD?
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
In answer to your question, no I wouldn't ever consider buying a product that used the forums to advertise itself instead of supporting the site by buying ad space.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|