|
Hi,
As it is possible to hide or disable the PropertyPage in the PropertySheet!
How do it!?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I cover this in a demo in my MFC book (see sig). It's a fairly involved process, but here are the basic steps. Let me know if you need any additional help and I'll send you a demo app.
(All of these steps pertain to the property sheet class)
- Create a member variable to store the current tab index.
- Create an array member variable to hold all of the index values for the currently disabled tabs.
- Handle the
TCN_SELCHANGING notification message to set the current tab index.
- Handle the
TCN_SELCHANGED notification message to decide if you want to enable the tab to be activated. If you don’t, you must post a PSM_SETCURSEL message. In this message, the last active tab index is specified.
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
|
|
|
|
|
You could not, to told above, at once to send demo (VC5.0 or VC6.0) to me that I could understand better with the specified steps.
I still have questions be relative CPropertySheet , and I hope to find on them answers
Best regards,
Eugene Pustovoyt
pustovoyt@inbox.ru
|
|
|
|
|
|
Thank you!
But these projects are written probably under VC.NET, and I have a VC ++ 6.0. Whether I can read them (are absent .dsp and .dsw). If yes, then how?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Did you try opening the project file instead of the solution? If that doesn't work, let me know and I'll send you the demo steps (including the code to type in) straight from the chapter.
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
|
|
|
|
|
As I can open the project not having files *.dsp or *.dsw!?
Or you has in view of to look through files separately, instead of the general project?
Eugene Pustovoyt
|
|
|
|
|
The project file is the .dsp and I believe you can open it in VC6.
In addition, you can also just open the CFindSheet file of the ModelDemo project.
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
|
|
|
|
|
Excuse for my English, but any of the projects sent by you, have not files *.dsp or *.dsw
Eugene Pustovoyt
|
|
|
|
|
|
Hi Tom,
Thanks for examples! I have understood how to disable tab!
I have some more questions if I yet have not bothered with the questions answer them please!
1. Whether it is possible to hide tab.
2. At me with application PSheetWithinADialog
I have a more tabs derivatives from one template, but with different labels.
Code of realization in OnInitDialog() the following.
m_sheet.AddPage(&m_pageMyPage1);
m_sheet.AddPage(&m_pageMyPage2);
m_sheet.AddPage(&m_pageMyPage3);
m_sheet.AddPage(&m_pageMyPage4);
m_sheet.AddPage(&m_pageMyPage5);
m_sheet.AddPage(&m_pageMyPage6);
m_sheet.AddPage(&m_pageMyPage7);
m_sheet.Create(this, WS_CHILD | WS_VISIBLE);
m_sheet.ModifyStyleEx (0, WS_EX_CONTROLPARENT);
TC_ITEM item;
item.mask = TCIF_TEXT;
TCHAR szText [100];
CString sTitle;
for (int i = 0; i < 7; i++)
{
sTitle.Format(_T("Long label %d"), i);
lstrcpy(szText, sTitle);
item.pszText = szText;
m_sheet.GetTabControl ()->SetItem (i, &item);
}
RECT rect;
HWND hwnd;
GetDlgItem(IDC_PROPSHEET_WINDOW, &hwnd);
ASSERT(hwnd);
if (hwnd)
{
::GetWindowRect(hwnd, &rect);
ScreenToClient(&rect);
m_sheet.SetWindowPos(NULL, rect.left, rect.top, 0, 0,
SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
}
Tabs begin it is deduced in two or three lines and it is wrong draw.
How of it to get rid?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
see CPropertySheet::GetTabControl
and operate on the Tab- Ctrl
|
|
|
|
|
And how can I hide or disable the tab???
Eugene Pustovoyt
|
|
|
|
|
Hi,
Any one can explain the difference between break and continue?
Regard
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
NicholasCougar wrote:
Any one can explain the difference between break and continue?
break gets out of the loop immediately.
continue will break out of the current iteration.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Hi,
the difference between loop and iteration?
Regard
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
A loop is the whole thing, an iteration is once through the loop.
for (int i = 0; i < 10; ++i)
{
if ( 5 ==i) continue;
cout << i;
}
will print 012346789.
for (int i = 0; i < 10; ++i)
{
if ( 5 ==i) break;
cout << i;
}
will print 01234.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
When I copy multiple lines and paste them into a CEdit, only the first line is visible everything else is ignored.
Can I make my CEdit calling a method when it finds a '\n' and then receive the next line from the clipboard etc?
|
|
|
|
|
|
Sorry, I dont want to enter multiple lines, I want to paste multiple lines into it.
Still can only paste first line into it. For multiple selected and copied lines (from another control or window), the edit control should act on pasting like this: enter a line, press enter, enter next line, press enter.... etc.
|
|
|
|
|
I wrote an article recently which demonstrates this, but I forget which one it was.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
I wrote an article recently which demonstrates this, but I forget which one it was.
some hints?
|
|
|
|
|
If you have the ES_MULTILINE style set (or the Multiline property in Visual Studio) as well as ES_AUTOVSCROLL (AutoVScroll = True), it should work. Look at my clipboard article. The demo has two edit controls and data is being pasted into the second control.
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
|
|
|
|
|
Hi,
In a dialog based application, there are a number of pop-menus.
I really want to set toolbars for them. How to setting these toolbars for dialog-based application?
Thanks in advance!
xyz
|
|
|
|
|
Creating toolbars in dialogs is same as in normal frame windows, except that you might want to resize the dialog to accodmodate the toolbar. Alternatively you can leave enough space on top when you add your controls.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|