|
Hi,
I have written a class, CWizardSheet, which extends CPropertySheet. It is set to wizard mode. An instance of CWizardSheet, contains several pages, which extend CPropertyPage, so naturally I have to do directive includes for these pages in the CWizardSheetClass. However, CWizardSheet has a variable, info, which I would like each of the pages to be able to access.
I have tried to do a directive include of the CWizardSheet in the pages, but that causes problems because of cyclic redefinition. I have also tried to add a 'set' method in each of the pages so that I can 'send' a pointer to the variable from the CWizardSheet's OnInit() method.
The problem with the second approach is that after I leave a page (clicking next), if I decide to come back to it (clicking back), if I make changes to the variable, it no longer changes the info variable in the CWizardSheet.
To solve this, I have decided that instead of 'setting' the variable in the OnInit() method in the CWizardSheet class, I should do it in another method which is called every time that the wizard changes to another page (set the top level page's variable).
My question is: Is there a method in CPropertySheet that I can override to catch the event when the wizard changes the top page, and if so, how do I use it and is it possible to get a pointer to that page? Other suggestions to solve this problem are also welcome.
Thanks in advance,
-----------------
Genaro
\\\|
_ _
@ @
_\\
--|
_/
|
|
|
|
|
picazo wrote:
However, CWizardSheet has a variable, info, which I would like each of the pages to be able to access.
In the CPropertyPage -derived class, call GetParent() , and cast the result to a pointer to your CPropertySheet derived class.
picazo wrote:
My question is: Is there a method in CPropertySheet that I can override to catch the event when the wizard changes the top page
No, but you can handle OnSetActive in the CPropertyPage -derived class.
|
|
|
|
|
Thank you very much for your response. I had already figured it out, but its good to know that you would have done it the same way.
|
|
|
|
|
Hi,
I'm trying to implement a dialog bar in my MDI application. First, for some reason any ON_BN_CLICKED handler that I add to the CDialogBar derrived class doesn't get handled. The buttons are still greyed out. I have to manually add ON_BN_CLICKED handler to the CMainFrame at which point the function inside CMainFrame never gets called but the one inside CDialogBar does. That's weird.
What I really want is to be able to handle dialog bar commands inside the CDocument. Do I have to route them manually from CMainFrame? I was hoping a DialogBar would behave like a control bar and I could easily add handlers inside the CDocument, but that doesn't look like it.
Thanks.
|
|
|
|
|
Also I have a class that I derrived from CDialogBar. Inside it I have a function to disable my controls that contains something like:
CWnd *test = this->GetDlgItem(IDC_ADDKEYFRAME);
test->EnableWindow(FALSE);
this doesn't disable the button. Why not?
I've also tried adding control variables and initialize them using DDX. The variables get initialized, the HWND value match what I get from GetDlgItem call, but the button never gets disabled.
|
|
|
|
|
I want to get a file name back from the saveFileDialog box and store it as a global variable. What Type should I declare this varialbe as? Seems like the return type for the saveFileDialog file name is String and the compliler is not liking this Type..
Anyone have a simple VC++ .NET example on how to get the user selected file name back from the saveFileDialog box and stored in a variable?
Thanks.
|
|
|
|
|
Here's what I have used:
CString strFile;
CFileDialog fSave(parameters);
if ( fSave.DoModal() == IDOK )
{
strFile = fSave.GetFileName();
}
|
|
|
|
|
For whatever reason, my .NET compiler is not liking the declaration of a variable as CString Type. I wonder if there needs to be included another .h file to be able to use String type?
Compiler does not like this:
CString myFileName;
|
|
|
|
|
I figured out what I was doing wrong.
I did not realize that the return type of the file name is a pointer, so it needs to be declated like this.
String *myFileName;
|
|
|
|
|
I understand what this does, but I was wondering how people felt about it.
Is it better to have incremental linking on or off?
and
Do you, personally, prefer to have incremental linking on or off?
|
|
|
|
|
I have "Incremental linking" on, and "Edit and Continue" off by choice.
Link times are notably smaller (and the only glitch that happens is finding a function that no longer exists). E&C is for veebees.
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
Why is it that when an XML file is has a root node that looks like this:
-(Test xmlns="urn:response"\)
(MyTest)test data(MyTest)
I can't seem to select singlenode on //Test//MyTest to get the text. But if the 'xmlns="urn:response' is removed to look like:
-(Test\)
(MyTest)test data(MyTest)
then i can selectsinglenode and get the text.
How would i read an xml file with root having a namespace definition??
Please Help
|
|
|
|
|
if no ns means default ns. sepcify in both line ns and it going to work.
|
|
|
|
|
I do not understand.
When i define my tag it is like this
_bstr_t mybstrtagTestText = ("//Test//MyTest");
The above does not work when i do a
MSXML2::IXMLDOMDocument2Ptr pDocument;
MSXML2::IXMLDOMElementPtr pDocRoot;
MSXML2::IXMLDOMNodePtr pTag;
pDocRoot= pDocument->documentElement;
pTag = pDocRoot->selectSingleNode(mybstrtagTestText);
This is because the XML file that i am reading has has a root that looks like
(Test xmlns="urn:response") - I can't change this part
what should i do differently in my code?
|
|
|
|
|
Promlem is in XML
This is invalid XML
<Test xmlns="urn:response"/>
<MyTest>test data</MyTest>
XML document mast have one root node in first case you have two
Test and MyTest
This is valid XML
<Test xmlns="urn:response">
<MyTest>test data</MyTest>
</Test>
|
|
|
|
|
I am using threads and when I compile, it says I have to include /clr in the command line. I added in the managed extension option and saw that /clr had been added. Now, I get the error that says /RTC and /clr cannot both be in the command line. I can not seem to get rid of /RTC. I have tried to use this: #pragma runtime_checks( "", off ) --but it doesn't seem to do anything. Can anyone help me?
|
|
|
|
|
what type 2 i use to add numbers in hex
i have a hex number and i need 2 add 8 in hex each time in a loop
/\|-||\/|/\|)
|
|
|
|
|
Hello
But what types are using for decimal addition ?
int a = 0x12;<br />
int b = 0x56;<br />
int c = a + b;<br />
Does it what you need ? So, you can use any numeric type.
Andrew
|
|
|
|
|
hex is a way to represent values. If you work with integers then you can do:
int a = 0x0a;
for (int i = 0; i < 10 ; i++)
a += 0x08;
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi
I am interested to get a handle to the directory that consists the root of a logical drive. E.g. I want a handle on C:\ I noticed that FileFirstFile will refuse to give me back such handle. Also do time attributes (i.e. creation, modification, last access) have any meaning for the root directory? They certainly have meaning for the subdirectories but what about the root.
Thanks for any given help
Simple questions...
|
|
|
|
|
The GetFileAttributesEx function retrieves attributes for the specified file or directory. Probably what you want to know.
|
|
|
|
|
Simply use:
HANDLE h = CreateFile("\\\\.\\C:", ...);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
what do you call "caption bar" ? an edit box ? or the title bar ?
the title bar cannot get the focus, never.
if you want to set the focus into a specific control on the dialog, do this :
(GetDlgItem(IDC_MY_CONTROL))->SetFocus();
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
hai,
Help me...
i want to develop a new Media player plugin for decrypting the encrypted wave file before playing. So how to develop a media player plugin? How to register this media player plugin? Any sample code for media player plugin?
Thanks
Jefy
|
|
|
|
|
I am trying to set the TAB order through Code. It’s not enough setting the Tab Order initially using Layout - > Tab Order. As the TAB order needs to be set to a different order during run time. How can I do this exactly?
Any help will be greatly appreciated.
|
|
|
|