|
Are you sure that m_gdiplusToken was not stepped on someplace (i.e. it contains the same value as when you initialized GDI+)?
Also, check to see of you have any unreleased GDI+ resources, like Brush or Image objects.
Peace!
-=- James.
"Some People Know How To Drive, Others Just Know How To Operate A Car."
(Try Check Favorites Sometime!)
|
|
|
|
|
I'm new in Visual C++...Really need help about how to make both parent & child windows appear automatically after running the program?
EENA
|
|
|
|
|
Go in the dialog editor, and in the properties of your windows, check "Visible".
In your OnInitDialog, put a ShowWindow(SW_SHOW);
~RaGE();
|
|
|
|
|
I'm sorry...I didn't get that! Would you please explain more details...Or you can write down some source code about it....
For your information I have no idea about Visual C++...Bad huh!
Anyway, thanks a lot Rage!
EENA
|
|
|
|
|
Well, OK, could you give me some precision then about your application (Is it MFC or "simply" Win32 ? Dialog ? MDI ? SDI ?) (or post a code sample ...)
~RaGE();
|
|
|
|
|
Thanks Rage...Actually I'm using MFC application..I'll post to you the code sample including the interface later in your e-mail...
EENA
|
|
|
|
|
Hello
I use the wizard to make new project and I select context sensitive Help, the question is: can I remove this option from my project? how??
Best Regards
|
|
|
|
|
In a dialog-based application, i have a listbox control
Which is used for display the related message. My problem
are
(1) how to set the font and the size of the text in the listbox show
area.
(2) I want to know how to put the message in the end of the previous message. In my case, it seems that the same message
will be inserted into the same position of the previous message.
Thanks in advance!
chen
|
|
|
|
|
You can use SetFont() to set the font of a List Box
As for the second one, use CListBox::InsertString
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks for your reply!
The first problem has been solved.
About the second one. For example, When a button is clicked,
the message will be displayed as:
xx1 xx2
yy1 yy2
xx3 yy3
As here, everything works well.
When i click the button once again,
the message becoms:
xx1 xx2
xx1 xx2
yy1 yy2
yy1 yy2
xx3 yy3
xx3 yy3
But i hope that the message will be
xx1 xx2
yy1 yy2
xx3 yy3
xx1 xx2
yy1 yy2
xx3 yy3
How can i do?
chen
|
|
|
|
|
In the dialog editor, right click on the list box, take Properties, take the Styles tab and un-check the Sort check box
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
OK, It worked!
Thanks a lot!!
chen
|
|
|
|
|
Could you post a sample (I first thought of an automatic sort problem, but seems - Nish, tell me if I´m wrong, - that InsertString is "stronger" than the sort option.) ?
~RaGE();
|
|
|
|
|
No, It is not a sort problem.
I would like to put the new same message at the end of
all the previous message when a same button is clicked
once again.
Thanks
chen
|
|
|
|
|
Go one more step,
Is there a method for show the colored text based on the
CListBox class? How to do it?
chen
|
|
|
|
|
Override OnCtlColor()
If nCtlColor == CTLCOLOR_LISTBOX
Then use the CDC* to set your own color
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Would you please say it in more detail?
chen
|
|
|
|
|
chen wrote:
Would you please say it in more detail?
HBRUSH CYourDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(CTLCOLOR_LISTBOX == nCtlColor)
{
pDC->SetTextColor(RGB(0,125,0));
}
return hbr;
}
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks Nish!
where and how to recall this function?
chen
|
|
|
|
|
In the class browser, right click on the YourDlg class, and choose Add Windows Message Handle. A dialog Box opens. In the left list double click on WM_CTLCOLOR until it is written in the right list, and click on Add and Edit button.
Here you are.
~RaGE();
|
|
|
|
|
Thanks for all the replys!
If i want to set some text lines with one color and
some text lines with another color, how can i do?
best Regards,
chen
|
|
|
|
|
I wrote a macro to deal with some rows of codes, and after that I want to mark those lines, can anyone tell me how to select several rows with vbscript in visual studio 6.
I'm learning vc
|
|
|
|
|
Hopefully this question isnt too silly.
I've got a thread that I want to get the exit code from. I started it using
CWinThread* pMyThread = AfxBeginThread(ThreadProc, (LPVOID)this,0,0,CREATE_SUSPENDED), after which I set the AutoDelete to false and Resumed the thread.
Once I have the ExitCode from the thread, is calling delete pMyThread ok for cleaning up the thread that I created? Or is there something else to do or a better way of doing this?
Thanks,
Mark
|
|
|
|
|
Well, if you are sure of what you´re thread is doing at the moment when you kill it, use TerminateThread ...
~RaGE();
|
|
|
|
|
I believe TerminateThread is never recommended to use. You can try PostQuitMessage.
Best regards,
Alexandru Savescu
|
|
|
|