|
i think i know what you mean. i wrote:
CTEST d;
d.doModal();
now i must write:
CTEST d;
d.Create(..???..);
right?
but what must i write into the clasp from the function Create?????
sunny
|
|
|
|
|
You have online help installed, haven't you?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
i have, the msdn library. but my english is not so good.....sorry
|
|
|
|
|
when i write
CTEST d;
d.Create(IDD_DIALOG1);
or
CTEST d;
d.Create(IDD_DIALOG1, NULL);
there is no errors. but when i use the programm i cannot use the modeless dialog. nothing happens when i press the button for this dialog.
sunny
|
|
|
|
|
1) check the 'Visible' flag in dialog properties (in Dialog Editor)
2) ensure that d isn't local variable. If it is, your dialog is destroyed almost immediately.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
YEAH! Great.....thanks.
|
|
|
|
|
A dialog Based application is a modal dialog.
And the second dialog u created seems to be also modal.
Modal means that u cannot do an action outside the dialog, till u dissmiss it by "OK" or "Cancel" (OnOK () and OnCancel () to be more accurate)
U can simulate that ur first dialog is closed by just not showing it:
ShowWindow ( SW_HIDE );
//Create ur dialog here
OnOK(); // Will close the first dialog when u finish from the second one
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Just a quick Q.
Does anyone know if there are any problems with working with multiple instances of VC++?
Are there any known global dependencies that might break one instance if, for instance, I start to debug?
|
|
|
|
|
Not to me
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Also, not for me...
My experience include several sessions of VS6 and VS.NET at the same time...
Cheers
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Not for me as well
I often use multiple instances of VC++ and had not experienced any odd behavior so far
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
thanks for the responses.
|
|
|
|
|
I pretty much use multiple instances all the time.
Todd Smith
|
|
|
|
|
I want to sort a change the sorting of a listbox.I tryed it as "virtual int CompareItem....." and as "afx_msg int CompareItem...." but these functions are never called and the list is sorted normally. What is the problem?
(except my english)
|
|
|
|
|
MSDN:
Called by the framework to determine the relative position of a new item in a sorted owner-draw list box. By default, this member function does nothing. If you create an owner-draw list box with the LBS_SORT style, you must override this member function to assist the framework in sorting new items added to the list box.
Short:
Have u set LBS_SORT style for the listbox??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Only owner-draw listboxes use this message. If you have plain listbox and want to use non-standard sorting, then you'll have to sort yourself before adding items.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Listbox is owner-draw fixed and LBS_SORT is set. Other functions (DrawItem, MeasureItem) are working well. Sorting work, but only standard not my way
|
|
|
|
|
I guess you have LBS_HASSTRINGS style set. With this bit enabled, you won't get WM_COMPAREITEM, because listbox assumes that sorting means string sorting.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Listbox is owner-draw fixed and LBS_SORT is set. Other functions (DrawItem, MeasureItem) are working well. Sorting work, but only standard not my way
|
|
|
|
|
Does anyone know of a way to get the dialog units for the text in a CStatic control? I'm trying to dynamically resize some controls and what MSDN says to do seems to always return 25-50% too big.
Here is what I am trying:
CDC *pDC;
CSize cStringSize;
pDC = m_MyStaticControl.GetWindowDC();
cStringSize = pDC->GetTextExtent ("Some string I want the size of...");
I've also tried DrawText(...) but that returns the same size.
Thanks for the help,
David
|
|
|
|
|
You need to select the right font into DC first. Default font is larger than the one used by your control.
As a little OT note, you should also use CWindowDC or CClientDC instead of GetWindowDC call.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Tomasz,
Great! Thanks for the help, that did the trick. One more question, how do I figure out what font the CStatic is going to use? I ended creating a different font first (looks better anyway).
Thanks again,
David
|
|
|
|
|
|
Simple, thanks yet again.
|
|
|
|
|
I need to manipulate an array so that the first row is the last second row is next to last and so on with a 2d array.
do I need to make a tempArray or can it be done without creating another array? S ome code to help get started too would be helpful.
|
|
|
|