|
Anybody knows how to change window (or dialog window)
font in Visual C++ after it has been created?
Thank you,
Goran
|
|
|
|
|
Hi!
You need to send the WM_SETFONT message to the window. See MSDN for more details...
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Here is sample for dialog..
// get dialog font and create thin variation for control contents
HFONT hFont = (HFONT)::SendMessage(m_hWnd, WM_GETFONT, 0, 0L);
if( hFont ){
LOGFONT lf;
::GetObject(hFont, sizeof(LOGFONT), &lf);
lf.lfWeight = FW_LIGHT;
// check for attached font object already existing
if( m_cfFont.m_hObject || m_cfFont.CreateFontIndirect(&lf) ){
// if supposed to set the thin font
if( m_bThinFont ){
OnSetFont((CFont *)&m_cfFont);
}
}
}
void CGCDialog::OnSetFont(CFont *pFont)
{
HWND hWndChild = ::GetWindow(GetSafeHwnd(), GW_CHILD);
while( hWndChild ){
CWnd::FromHandle(hWndChild)->SetFont(pFont);
hWndChild = ::GetNextWindow(hWndChild, GW_HWNDNEXT);
}
}
|
|
|
|
|
Wow! That's terrific-after just voicing the idea of having a virtual development team, it's great to see so much enthusiasm! And to top it all, Chris-thank you for your support as well-especially for going the whole hog to express your interest in setting up mailing lists, project discussion boards et al. Thank you once again-we all really appreciate it
Okay, now I must say we have the following who are interested:
1. Frank Deo
2. Franky Braem
3. Myself (Shanker)
4. Chris-are you interested? Or are you too busy? It'd be an honor to have you.
5. And Widi....??
Okay, now...I need to know at what point we should start-how many folks should we have as part of the team? Or should we let it grow on an ad-hoc basis? (this can mean experiencing difficulties sync-ing people new to the team with what previous members have already been doing)
Once we have the team strength sorted out, WE NEED SOMETHING TO WORK ON!! Any ideas? Chris? Can you point us towards some interesting areas we could venture into? Once we have a bunch of items to select from, we could all vote on it to pick which one comes out tops.
So everyone, don't be shy-whatever your project idea-be it small or H-U-G-E, just post it in. But bear in mind that eager though we all are, we cannot start on it UNTIL we get a stronger team (strength-wise). I would assume we need atleast 7-10 people to start with. Once we have the team, we can work out other issues as where we shall be voicing our stuff-such as discussion/mailing areas-Chris has expressed his desire to help us in this regard.
Thanks all, and keep up the great spirit!
|
|
|
|
|
Well, here's a suggestion. How about an MFC extension library. Or, how about a Windows Installer (similar to Wise, or Installshield).
Let me know how you want to stay in contact...either email, or icq works for me.
Cheers,
Frank
|
|
|
|
|
I vote for the Windows Installer.
|
|
|
|
|
How about working on one of the emerging technologies, like SOAP? Seems like a cool way to work together and build something that's brand new.
I think just about all the class libraries in the world have been done already, Dundas and Stingray and CodeProject and CodeGuru *and* CodeJockey have pretty much beaten that to death.
What do you think?
|
|
|
|
|
Shanker,
I like the idea
Some Thoughts,
1. Windows Installer sounds good useful,
also I think a small project is best to start with,
As it would be good to have a project that can be finished, Unfortunatly MFC extension classes can never be finished.
Nobody says we have to stop after one project is done.
2. NonProfit sure,
However it could be useful to make the project,
in a shareware/freeware form,
have a Nag-screen to register it for a small fee
to give a registration donation to an International
Aid agency eg ( RedCross/Unicef )
It'd give that expression, "I gave at the office" some
validity for some of us.
Also it would give some of us a valid excuse for doing
research during quiet periods and using resources with
the management
3. I believe this sort of project will pay it's way for
thecodeproject.com , So don't be embarrased asking
Chris for assistance
4. Don't limit the number of Developers involved, As
somebody might wish to join who does have a vital key to
the teams success, However it is necessary to have a solid core of developers.
5. A charter or mission statement about the e-team and project would be useful, and will stop our forumn/discussion group being cluttered up with silly questions and of topic posts, eg What's this about ? , Can you do this ?, I need a free program to .. ? etc
6. I nominate Shanker as provisional team leader
(someone has to do it )
Obs: All my thoughts above are purely thoughts and opinions,
apart from the last one. So debunk them if you care.
Regardz
Colin Davies
|
|
|
|
|
I think the best way to approach this is to start with something manageable. With our first Project, 90% of time and effort will most likely be in coordinating everyone and managing issues like version control and admin. If we use the initial project to sort out issues involved then the next project should go a little smoother. Plus, having that warm fuzzy feeling of a job well done (no matter how small) will help enormously when starting on something bigger.
I can certainly help with raw coding, but I think my greatest contribution to this will be to do the leg work of organising mailing lists, announcements on the homepage/newsletter, searching for useful code that's already on the site and generally just making things easier for everyone.
As for ideas, we have two ways of going: something that we can use in future projects (a windows installer is certainly an option, as many have suggested), or something small that flexes our talents and introduces us to new technologies such as a SOAP or XML-based project (as Grant suggested).
|
|
|
|
|
Chris,
Total agreement with you,
However I'm left wondering about you Chris having to commit far to much time to this.
Unfortunatly a lot of projects like this often have the problem of a few persons having to do the bulk of the work,
for many people to take the credit. (Sometimes the organizers are to blame for this, sometimes the volunteers).
Anyhow the key to this is delegation ! (by you or whoever)
eg. select an editor for a newsletter,
eg. Maybe someone here is also a whiz at version control
(not me)
eg. Other things will certainly arise that you can farm out.
(my 2 cents)
Regardz
Colin Davies
|
|
|
|
|
Chris, I agree with you. Collin Davies has made lots of useful suggestions-for ex, charge a small registration fee for use of the program. Anyways, as far as the projects themselves go I think a Windows Installer sounds good too. Or maybe even and ATL Chat control (client and server) exclusively for use at codeproject across members. Or how about an XML parser? Any more useful ideas on what we can work on? I do agree that starting off on a small to mid-size project is better as we can reap the results faster.
Hopefully, members will vote for a project that is really useful. Looks like we're already 4-5 strong-hope it gets bigger. Once we get the team strength sorted out, we shall decide on what to work on. After that, we can move on to other issues like organizing lists for discussions, etc. ICQ and e-mail are great ways to communicate too. Not to mention Yahoo or MSN messenger.
As noted before, we need IDEAS!! Let's hear more!
|
|
|
|
|
Here's a few more suggestions.
1. Something (?) using ADSI. I know...kind of vague.
2. Port a unix (linux) tool. Pick your favorite.
3. An ASP script editor.
4. A tool that takes advantage of WMI using COM+
5. A distributed computing project?
6. A simple project management application. Ex: TODO list, Bug lists, feature request database. Perhaps, a plugin to the VC ide to integrate it.
I'll try to think up some more.
Cheers,
Frank
|
|
|
|
|
Hi,
I can convert the value of a CString to a float with sscanf:
sscanf( strnumber, "%f", &m_dAg);
I have tried to do this wiht a double, but it doesn't work.
Is it possible to do that ?
Thanks for any help,
Claude
|
|
|
|
|
|
Try using:
sscanf( strnumber, "%lf", &m_dAg);
lf should be used for doubles
|
|
|
|
|
You might also try strtod() function.
Regards,
Andrei zenkovitch
Dundas Software
|
|
|
|
|
The problem is related to ATL Wizard in VC 6.0.
When we add some interface, we have to specify its threaded model. There are four threaded models are given.
1. Single
2. Apartment
3. Both
4. Free
My COM take data as input and passes it to corresponding server, and I m using this COM in ASP. I have confusion of which threaded model should I have to use so that the COM can fullfill multiple requests at the same time.
Thanks!
|
|
|
|
|
Hi!
You have a choice of using Both or Apartment depending on the object's scope on the ASP and the way you are going to use it.
There is a very good article by Don Box about the threading models (http://www.develop.com/dbox/aspapt.asp), you also can have a look at the Microsoft's articles (http://msdn.microsoft.com/workshop/server/asp/server01242000.asp).
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
hai all
i am using a list ctrl and 4 buttons(first,prev,next,last) for scrolling the items in the list ctrl.
what i want is whatever item selected previously (by clicking any of those 4 buttons)
should be deselect again if any of the button is pressed.And also the selected item is in gray colour.
i want to set my own color.this is not owner draw list ctrl.
but i am not able to get that.i used setitemstate to set the selection.
pls any of u can help me.
it's very urgent.
bye
satheesh
|
|
|
|
|
I have visual studio 6.0 installed. and i tried installing visual interdev. but it says version conflict.....what do I do??
Please help!!!!
|
|
|
|
|
Hi folks.
Okay, this is more of an idea that I have, so it should probably have been in the general discussion area. But however, this is fully to do with VC++, hence you're reading it here.
It so happens that most of us,in what little spare time we have, try to learn new things related to our work. The internet has changed the way we work too. My idea is to take advantage of this, and form a virtual developer team over the internet that likes to work on fun things in spare time-which would no doubt have intellectual value to the developer.
I suggest we can write a small program as a team, but while working across the internet. Communication will be primarily by e-mail, also by way of excellent electronic group sites, such as www.egroups.com. Finally, after we complete the program, we shall post it in Codeproject for the benefit of others. As noted before, the program will be written in VC++; hence a requirement becomes that the anyone joining this e-team is atleast a little familiar with VC++. As this program will be written by many working together across the net, the program will have to be of reasonable size.
Anyone interested? If so what program can we write? Come on, I am sure some folks would be more than interested in this-after all, Linux was made this way
Let me know what you think!! If I get enough responses that communicate interest, I shall create an e-group for all of us. We can take it from there. Bear in mind that SHOULD we form a team, the development of the program might be a fairly slow process-as we will be communicating across the net, as well as be working on this in only our spare time.
Please be aware that this venture is a NON-PROFIT one, solely cooked up for the fun of doing it, as well as for the learning value. Remember, if the e-team does come up with something interesting, we will be posting it in CodeProject for the benefit of others.
Hope to hear from y'all-we need IDEAS! Hope we gain some critical mass here.
Shanker.
|
|
|
|
|
Hi,
it's a cool idea.
Can you tell me more ?
|
|
|
|
|
Excellent idea!
This kinda goes along the lines of something I was thinking about for CodeProject but you've taken it a step further.
I will support this fully and if there is enough interest I can supply a dedicated mailing list, a section in the "Libraries and Projects", and some scripts to allow versions to be uploaded and updated.
Who's in?
|
|
|
|
|
Great Idea,
I really want to try this out. I can't work on it everyday, but it seems interesting to work on something with other people around the world.
|
|
|
|
|
Count me in!
I'm not totally familiar with SourceSafe...but, if it is possible...Chris could you run a SourceSafe server?
Frank
|
|
|
|
|