|
Hi Tomasz,
I did as you suggested and it works beautifully! Thank for helps & very fast solutions!
Many thanks,
Anh
|
|
|
|
|
Hi,
I have inserted an ActiveX MSChart control onto my PropertyPage. I set the properties to xy scatter and am trying to display a simple non linear line graph for y = x*x
How can I do this in a message handler?
Do all the classes need to be registered when i add the activex control as there are quite a few?
I'm also looking for documentation regarding chart control.
Cheers
kash
|
|
|
|
|
|
created this sample application to reproduce the modal dialogs problem:
- Created SDI application
- Added derived from CPropertySheet, CPropertyPage and CDialog classes
- Created CPropertySheet in 2 steps, using constructor and Create, where I passed NULL as parent, which actually is a DeskTopWnd. Added MyPropertyPage with button to run MyModalDialog.
- To reproduce it - from File menu -> New - run MyPropertySheet, then run MyModalDialog, the first one, again go to New and open another sheet, run second modal dialog from it.
- The problem is: if you go back to first modal dialog and click OK to close it - it will be closed but really won't return from DoModal() modal loop and stay waiting in the CWnd::RunModalLoop() till the second modal dialog would be processed. After processing the second modal dialog the CWnd::RunModalLoop continues for the first one, successfully exiting and returning DoModal() of the dialog which has been already closed and destroyed.
If somebody had this issue before, please help!
|
|
|
|
|
Na russkom mogeh scazat' problemu?
|
|
|
|
|
In case if you didn't recieve my email... pasting it here:
Zdravstvui, spasibo za bistii otvet!
konechno mogu u dazhe predostavlui moi primer...
Cozdala SDI, dobavila classes derived ot CPropertySheet, CDialog u CPropertyPage... MyPropertySheet sozdau dynamically na File,new v dva etapa:
snachala constructor, standard, potom dynamically MyPropertyPage, AddPage(), potom pMyPropertySheet->Create(NULL), NULL znachit the Parent window budet DeskTopWnd. Microsoft pozvolyaet eto delat' 8) dazhe v SDI... Takim obrazom esli zapuskat' s takix property sheets modal dialogs - oni poluchautsya modal'nie tol'ko dlya parent, t.e. MyPropertySheet! eto pozvolyaet prodolzat' rabotat' so vsei application normal'no. Problema pri zakritii - t.k. elsi ih zakrivat' v poryadke otkritiya (ot bolee rannego k bolee posdnemy) DoModal ne rabotaet! na (DoModal == OK) naprimer ti mozhesh uvidet' ti ne popadaesh v breakpoint. U nas project starii i ochen' razroshiisya i menyat' modal'nie dialogs to modeless would be headache... delat' threads dlya kazhdogo modal dialog eche bol'she headache... Vot takaya problema... Esli hochesh posmotret' v deistvii - attachment prilozhen. Spasibo ogromnoe. Nadeus' uslishat'...
|
|
|
|
|
Is it possible to assign multiple images to a tree item in a CTreeCtrl? Basically, I'd like to have more images than the two that are possible now.
If not, is it possible to assign images instead of text? I don't know that I need code snippets (although they'd be appreciated). Just some clues as to what I need to do.
|
|
|
|
|
Rob_PSU wrote:
Just some clues as to what I need to do.
Clue: use NM_CUSTOMDRAW.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
That's what I was afraid of.
Thanks!
|
|
|
|
|
My code like this:
CUIntArray CMyClass::CMyFunc(CUIntArray caArrayA,
CUIntArray caArrayB)
{
return m_ncaBinaryResult;
}
CMyClass derived from CObject. CUintArray is almost same as CArray, but only contain UINT elements.
I got "class 'CUIntArray' : no copy constructor available" compile error at the 'return m_ncaBinaryResult'. How to fix it. Thanks.
mIchAel Liu
__________________________________________________________
The secret of business is to know something that nobody else knows.
|
|
|
|
|
Pass the arguments as const references - it's much more efficient, since compiler doesn't need to create copies of arguments. You should also avoid returning objects like CArray by value - rather, pass 3rd argument as non-const reference.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Tomasz is cool!
it has to be said, I see him answering so many questions!
|
|
|
|
|
good morning,
i have a dialogbased programm. when i open a first and then a second dialog (after i pressed a few buttons), i cannot close the first dialog, before i have closed the second dialog.
what must i change, that i can close the first dialog while the second dialog is still open.
sunny
|
|
|
|
|
You are opeen modal dialogs or modaless dialogs?
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
a modal dialog!
CTest d;
d.doModal();
|
|
|
|
|
You need to use modeless dialog. Instead of CDialog::DoModal() use CDialog::Create.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
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 ) ;
|
|
|
|