|
Mark Salsbery wrote: (or sticking my nose in something not my
business, depending on how one looks at it).
That's what we all do - note that I hadn't been involved in this thread until I responded to you. You usually seem to know what you're doing and you sounded confused, so I stuck my nose in to rememdy your confusion.
Judy
|
|
|
|
|
I think this comment in MSDN is pretty poor:
--------------------------------------------------------
This behavior can lead to compiler errors that do not seem to make sense, because it appears that you are including all the needed declarations and header files in the .CPP file. For example, some of the errors that may result are the following:
• error C2065: 'CTestClass' : undeclared identifier
• error C2146: syntax error : missing ';' before identifier 'tc'
• error C2064: term does not evaluate to a function
--------------------------------------------------------
surely this should have been a signal to someone that their precompiled header logic needs some improvement - simply checking that the headers precompiled in the top level file would trap most mistakes.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
cp9876 wrote: By the way, what is a 'public class', I know that for nested classes you can have public / private etc, but in global scope? What would a private class do?
Having public there isn't legal C++, it's probably the poster's Java and/or C# habits showing in his C++
|
|
|
|
|
Hi everybody,
i add controls dynamically on a CDialog.
The font of each control is bold and too big. (CStatic,CComboBox and CEdit)
The font of the Dialog is set to "Ms Shell Dlg (8)" ... not bold or too big
Does anyone have an idea?
Thanks
|
|
|
|
|
Hi!
May be you should get font of dialog and set it on all child controlls manually. I mean some like that:
CDialog * pDlg; //already init
CFont * pF = 0;
pDlg->GetFont(pF);
...
ChildWindowPtr->SetFont(pF);
Best regards,
Baron
|
|
|
|
|
If you want to change font you can use of SetFont and also you can use of CreateFont for new font.Is this helpfuls?
|
|
|
|
|
Thanks for your replies.
The way over the pointer to the Font of the Dialog seems not to work
CDialog * pDlg; //already init
CFont * pF = 0;
pDlg->GetFont(pF);
I created my own Font and associate it to new controls, which works now
|
|
|
|
|
And when you create font in the end use of DeleteObject function to delete it.;)
|
|
|
|
|
Hi All,
How do i know whether DHCP(Dynamic Host Configuration Protocol)is complete after an ethernet cable is plugged into my system?
I am using VC++(VS2005). Is there any kind of callback or any API to determine this?
Any suggestions? Please help
Sunil
|
|
|
|
|
Hi
I want to open a form from a running form, how is that done ?
Regards
|
|
|
|
|
Hi,
you try to open a CDialog deriven form, or change a view into a Frame, or
open a new Frame within a new view?
I try to help you at my best
|
|
|
|
|
are you talking about .NET Windows Forms ?
if so, you're on the wrong forum.
but if using mfc, use the DoModal() function for instance. see an example[^]
|
|
|
|
|
I used CColorDialog for choosing colour but the color chossen should be displayed in mainframe
S.Yamini
|
|
|
|
|
See Here[^]
Read some of the comments as well, cause there are some solutions too.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Do you want to show selected color or apply this color for background color ?
|
|
|
|
|
yes thats correct
S.Yamini
|
|
|
|
|
yaminisridaran wrote: yes thats correct
oh but Which? not problem
For apply selected color use of WM_CTLCOLOR </code message and you need to a variable for hold return value that is COLORREF for use in the <code>SetBkColor .
-----------------------------------------
For show an intensity value of selected color GetRValue for red GetGValue for green GetBValue for blue .
|
|
|
|
|
Hello all,
I have made a SDI application.On close window of that SDI application(i.e Cross in the upper right corner) i want to show a Message Box when i click on that.
How to do it???
Thanks in Advance...
|
|
|
|
|
Doesn't handling WM_CLOSE message for main frame window helped you ?
Prasad
MS MVP - VC++
|
|
|
|
|
i have written code on ExitInstance
but it first exit the window n then shows the MessageBox....
|
|
|
|
|
Try whatever I said in my oroginal reply.
Prasad
MS MVP - VC++
|
|
|
|
|
Can you just tell me the way of using it
|
|
|
|
|
Add WM_CLOSE message handler for you CMainFrame class. This is the handler called, when you click on cross button.
Prasad
MS MVP - VC++
|
|
|
|
|
Thank you very much
It solved my problem
|
|
|
|
|
Hi All,
I want to generate different GUIDs in my ANSI C++ application. Can anyone help me to do this or can point to a library which i can use?
Regards,
Aamir
Aamir Zia
|
|
|
|