|
This is because of the setting of "Display properties".
Change your setting of display in the control panel and set the header text font as non-bold font.
|
|
|
|
|
I'm not sure. First of all I don't see a setting for header text in the display properties, not in Windows 2000. I even tried selecting the Windows Classic BIG FONT setting, and it changed a lot of text all over the place, but not CHeaderCtrl's text.
And in any case, it makes no sense that a CHeaderCtrl should use non-bold when it's embedded in a CListCtrl (i.e. in just about every MFC app in the world) and bold when it's embedded in a CFrameWnd.
It seems to me it's either an MFC bug, or there's something magical that CListCtrl does to its CHeaderCtrl that I haven't figured out how to do.
~CK
|
|
|
|
|
Assuming m_Hdr is a member variable of type CHeaderCtrl, in whatever function creates m_Hdr, immediately after m_Hdr.Create(...), add this line:
m_Hdr.SendMessage(WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT));
***NOTE*** that the following does *NOT* work:
m_Hdr.SetFont((CFont *)GetStockObject(DEFAULT_GUI_FONT));
Why? I don't know. Maybe because SetFont posts the message, instead of sending it, so that the temporary font pointer returned by GetStockObject is already garbage by the time the header control receives the message?
~CK
|
|
|
|
|
Hello Guys,
i need some help regarding loading icons from a local directory in VC++, in my app there is a combo box... if i pass an directory name to the app.. then all the file names of the icon's in that directory should be loaded in the Combo Box.
post with some sample code toooo for the above question
Thanks in advance
Hariharan.S.N
ravi
|
|
|
|
|
1. construct the CFileFind class
2. Call FindFile()
3. enter a loop that ends if you can't do 4
4. Call FindNextFile()
5. use CFileFind's get procs to filter out the icons
and do whatever you want with those filenames
Phil
|
|
|
|
|
Hi guys
i have made resizable combo box. i need to display a bmp in the scroll bar.
Can any body tell me whch api to use
I have a handle of HDC in my combo box
Regards
Suneet Chandok
|
|
|
|
|
bhai phat legi is kaam me
you will have to derive a class from CScrollWnd and in onpaint call CScrollWnd's Onpaint and then paint ur bitmap , then use this new class and add scroll support to CCmboBox
|
|
|
|
|
How do you do to accomplish an object-oriented desing in a pure Win32 API written application? No, MFC, WTL or any other frameworks.
And don't post dummy questions and ask why I wanna do this etc etc etc...
Thanks!
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
I presume what you mean is actually
"How do I encapsulate the HWND in a C++ class and make a proper class hierarchy?"
Otherwise stop read here.
How you design the hierarchy depends on your own ability to design - if you have done it in another area, then you can do here also.
The tricky part encapsulating the HWND and maintaining window procedures is to associate a class instance with a particular physical window, i.e., HWND with this . This can be done in many ways: ATL/WTL uses thunking and MFC a hash map, but it can be as simple as stashing the this pointer in the userdata section of the window with ::SetWindowLong() or setting this as a window property with ::SetProp() or even using a global variable (but that would not get us very far...)
I would, however, recommend WTL.
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
|
Is there a such message for a dialog based program like "WM_SHOW" that indicates that the dialog has been shown on the screen ?
I would like perform a certain task just when the dialog has bee n displayed to the user. Cant use OnPaint (and have a "do once" flag) since the task waits for the user to put his finger on a fingerprint scanner. So if he then moves the window or something the program will hang ...
OnCreate, OnInitDialog, OnShowWindow all runs before the dialog is shown ... any ideas ?
Thanks, Daniel
|
|
|
|
|
What about OnActivate or OnFocus? (not 100% sure these are the exact names).
|
|
|
|
|
Hello there, I am Dennis.
I wanna ask you guys if you have any idea or suggestion on how to implement graphics interaction into c++.
What i mean is how do we put in the graphical interaction show a real time interaction within a network. (let say base station and few terminals, I want to show the interaction with base station and terminal. Where if i click the terminal button, it can show status like Qos or how much bytes sent/received. )
The graphical interaction can show how the process is going one.
If anyone have any idea what I am saying, please give me idea. ok? suggestion.I am very appreciated if you give me some ideas. Thanks.
|
|
|
|
|
I beginner programmer,
My problem is that i wont save a file associated at myView with a new name
I have used OnSaveDocument(newName) but a empy file is created how so?
can i take a Cfile associated at myView
My code is
void myView ::OnFileSave()
{
CString nomeFile= GetDocument ()->GetTitle();
CString szFilter = "All Files (*.*)|*.*||";
CFileDialog fd( FALSE, NULL, nomeFile ,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_FILEMUSTEXIST |OFN_PATHMUSTEXIST |OFN_EXPLORER ,szFilter, AfxGetMainWnd());
if(fd.DoModal()==IDOK)
{
CString pathNomeFile =fd.GetPathName();
myViewerDoc *appoDoc = GetDocument();
appoDoc->OnSaveDocument(fd.GetPathName ());
appoDoc->SetPathName(fd.GetPathName());
}
}
The file in myView already exist and at runtime it is modified maybe
Sorry for my English
|
|
|
|
|
That all looks OK. I suspect that you haven't implemented myViewerDoc::Serialize .
|
|
|
|
|
i have implemented the myViewerDoc::Serialize but in the Carchive object
i haven't the information about the file in the myView and i dont know as attack the record into the new file
|
|
|
|
|
hi,
i wish to change the size of the drawing area(black background in my case) so that can distinguish between this area and the grey background for putting dialog controls, is it possible? i do not want to use splitter windows... any solution will appreciate 
|
|
|
|
|
Hi Friends!
I am creating an VC++ application (Microsoft Visual studio Ver 6), OS is Win2K, for getting the mac address from local and remote machine. I am using UuidCreateSequential() for getting the MAC address. As per the msdn and from different sites, I have included rpc.h ,rpcdce.h and added link to the library rpcrt4.lib.
But I get Compilation error as
error C2065: 'UuidCreateSequential' : undeclared identifier
Does any body knows the cause for this?
The above function I am using for creating license key for my software products. Is there any other easy way to create the unique license key?
Thanking in advance.
Best Regards
Smita Duraphe
Keep your hearts free from hate, your mind from worry. Live
simply, expect little, and give much. Fill your life with love. Scatter sunshine. Forget self, think of others. Do as you would be done by.
|
|
|
|
|
You're probably trying to compile using the header files included with Visual C++ 6.0. This function didn't exist then. You'll need to get the current version of the SDK from Platform SDK Update[^]. You may need to update the directories in Tools > Options > Directories once the SDK has installed (I can't remember if this is done automatically).
This API was added in Windows 2000; if you call this function in your code, and try to run your application on Windows NT 4.0, it will not load.
|
|
|
|
|
I need to turn in by December 9th 4 programs and i don't know how to do them,,,they are for my introductary C++ class. they are very small...i am willing to pay if someone writes them for me,,,i need the programs to pass this class!
|
|
|
|
|
Cheap man Cheap, those programs are for you to learn c++ programming.
My God is more powerfull Than Your God.
|
|
|
|
|
What precisely do you need?
Phil
|
|
|
|
|
if they are so small and easy you can probably find them on the internet or, and this is just a crazy thought, actually take the time to do some studying and make them you self. How about that eh?
Er zit een korstje op mijn aars.
|
|
|
|
|
Pardon me for being obtuse, but isn't there a reason you're required to pass this class? Isn't it part of a degree program that (eventually) may lead to a job programming stuff? Or is it merely one of those elective things you're expected to do to round out your experience?
If you don't know how to do the programs by this stage of the term, you don't deserve to pass. When the school hands out a passing grade it is, in effect, issuing a guarantee that you have certain skills, and employers are entitled to depend upon that assumption. By attempting to circumvent actual learning and replace it by cheating, you are hurting not only yourself and your future employers, but are also reducing the credibility of your school.
If you can't do it, withdraw and take the class again, and earn a fair grade. Alternatively, you might consider changing majors to earn a degree in something that really interests you, or that you can grasp. Programming is much like Accounting - it can be boring, but it is also very complex at times. If you don't have the knack for it you really should move on to something that really excites you. It's not for everyone...
I wish you the best of luck, but buying grades is not a good way to acheive your goals. In the long term it will always backfire on you.
"Your village called - They're missing their idiot."
|
|
|
|
|
Roger Wright wrote:
buying grades is not a good way to acheive your goals
Even if he's planning to be a manager?
A quoi rêvent les personnes qui nous font vivre ce monde ?
|
|
|
|