-
CMFCPropertySheet::AddPage doesn't Create Dlg
Hello guys :)
Well, in short, im calling this function CMFCPropertySheet::AddPage()5 time with 5 CPropertyPage !
Now, all the 5 pages are added but not created as MSDN say:
Quote:
AddPage adds the
CPropertyPage object to the
CPropertySheet object's list of pages but
does not actually create the window for the page. The framework postpones creation of the window for the page until the user selects that page.
My Problem now is that My PropertySheet need to update an EditBox in one of those page, but that page isn't created yet, so also the EditBox !
How can i create the pages window manually ?
Thanks from advance !
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
No one know the solution ???
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
You cannot update "an EditBox in one of those page" that does NOT exist yet.
You, however, can update the text you are going to display in this box.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
I know i cannot update that EditBox which isnt created yet.
But since i am loading configs and i will need to update many controls to their config stats !!!
and also its not an editboc but a listview...
Creating the page (window) manually would be great !
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
It creates the page when you activate them by selecting that tab. If the tab isn't selected, the page isn't visible, so updating the edit control doesn't make sense. You could put your code in OnInitDialog or OnActivate for the appropriate page.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
OMG !!!
Guys, if the user wont click on the tab for the first time , that tab wont be created !!!
So i want to create it manually and not waiting for the user to do it !
Must be a function to create it manually...
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
OMG !!!
Guys, if the user wont click on the tab for the first time , that tab wont be created !!!
Correct! :thumb:
Quote:
Originally Posted by yoni1993
So i want to create it manually and not waiting for the user to do it !
Why do you think you need it? :confused:
Quote:
Originally Posted by yoni1993
Must be a function to create it manually...
CPropertySheet::SetActivePage
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
I need it casue i need to access to the controls which are located in that page !
if the page isnt created. so also the controls !
And i cant use alternate ways since here i am talking about more than 40~ controls !
+ some logs ListView which im writing to them sometimmes...
PS: i called SetActivePage to every page, and its still didnt create them !!! (excpect the one i see currently [the last SetActivePage called page] )
its so hard to create them manually :S ???
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
I need it casue i need to access to the controls which are located in that page !
if the page isnt created. so also the controls !
It does not make any sense!:mad:
You cannot access something that does NOT exist!
And why don't you want to understand it?:confused:
Quote:
Originally Posted by yoni1993
And i cant use alternate ways since here i am talking about more than 40~ controls !
+ some logs ListView which im writing to them sometimmes...
It does NOT matter how many controls are there: one or "more than 40~".
The only thing that matters is whether it/they exist(s) or not.
Quote:
Originally Posted by yoni1993
PS: i called SetActivePage to every page, and its still didnt create them !!! (excpect the one i see currently [the last SetActivePage called page] )
its so hard to create them manually :S ???
What is/were the return value(s) of SetActivePage call(s)?
Where did you call it from?
Show your code.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Why don't you use the member variables associated with the controls instead of the controls themselves?
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
@GCDEF: with your way, samething happen, the control is still nto created since its part of the page !
@VictorN: of course i understand it, just you guys keep sayign samethings again and again !
The controls in that page are still NOT CREATED !
So im searchign an alternative way TO CREATE THEM and not waiting the user to click on the page !
All SetActivePage calls have returned "true" !
PS2: is there a way to create another CMFCPropertySheet withotu the dialog frame and locate it in another dialog ? (a smal size PropertySheet)
Thanks
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
@GCDEF: with your way, samething happen, the control is still nto created since its part of the page !
@VictorN: of course i understand it, just you guys keep sayign samethings again and again !
The controls in that page are still NOT CREATED !
So im searchign an alternative way TO CREATE THEM and not waiting the user to click on the page !
All SetActivePage calls have returned "true" !
PS2: is there a way to create another CMFCPropertySheet withotu the dialog frame and locate it in another dialog ? (a smal size PropertySheet)
Thanks
My way doesn't need the controls. Just use the variables that are associated with the controls that store the data. Set up members using the DDX mechanism to exchange data with the controls and use them instead of the controls directly.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
:mad:
I ask you again: Why do you think you need it (to create property pages before user activates them)?
Quote:
So im searchign an alternative way TO CREATE THEM
...
All SetActivePage calls have returned "true" !
Could you show your code?
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Like GCDEF says, why don't you seperate the UI from the data ? All you need at initialization time is to make sure that the data in all the C++ objects representing the propertypages ( CPropertyPage objects ) properly populated. When the pages do get created , if ever, they simply show the data in the corresponding C++ object in the windows.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
@kirants, GCEDF: well, they doesnt !. i have some sontrols which are acting as a listview (report), and im writing to it about every 500ms.
PLEASE dont ask why, I JUST NEED IT THATS ALL !
so i need to create the pager manually and not waiting the user to create it !
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
@kirants, GCEDF: well, they doesnt !. i have some sontrols which are acting as a listview (report), and im writing to it about every 500ms.
Just do NOT do it until the control will be created!
Again: it does not make any sense to update a control that User cannot or does NOT want to see.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
@kirants, GCEDF: well, they doesnt !. i have some sontrols which are acting as a listview (report), and im writing to it about every 500ms.
PLEASE dont ask why, I JUST NEED IT THATS ALL !
so i need to create the pager manually and not waiting the user to create it !
A good programmer has to know when he's headed down the wrong path. Stubbornly sticking to or looking for the wrong solution is never productive. As has been said, the solution is to focus on the data, not the windows that may or may not be displaying it.
You have to tell all the pages what to display, so obviously you know what the data is. Use that information.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
@VictorN: its a log page !, the user will maybe want to look at it latter ? isnt it ? he will be mad if he will see an empty log ...
@GCDEF: how i can add lines to report listview without touching the control O_o (since its not created) ???
All this is useless, why not just explaining me how to create it manually and finish with it ?
Thank you.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
@VictorN: its a log page !, the user will maybe want to look at it latter ? isnt it ? he will be mad if he will see an empty log ...
You cannot put a book on a table until this table won't be manufactured! :cool:
The same - with your control and log data.
Quote:
Originally Posted by yoni1993
All this is useless, why not just explaining me how to create it manually and finish with it ?
We are trying!
But you don't want to understand the basics. :sick:
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
You cannot put a book on a table until this table won't be manufactured!
The same - with your control and log data.
You said it right !!!
And thats why i want to create the table and not waiting the user to create the table !
Get me ?
It must be possible if the user create it...
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Quote:
Originally Posted by
yoni1993
... And thats why i want to create the table and not waiting the user to create the table !
...
It must be possible if the user create it...
Yes, I agree. See my replies in the posts ##7, 9 and 13
-
When CMFCPropertySheet::PropSheetLook_List option is used , scroll bars are not disp
When CMFCPropertySheet::PropSheetLook_List option is used , scroll bars are not displayed
----------------------------------------------------------------------------------------------------------------------
According to MSDN :
For PropSheetLook_List
The framework displays scroll arrows if there are more list items than will fit in the visible area of the list.
Unfortunately, scroll bars are not displayed when there are many items presents outside visible area.
-
Re: CMFCPropertySheet::AddPage doesn't Create Dlg
Dear amitgpatil,
what does your post have to do with this thread where we discussed the problem "CMFCPropertySheet::AddPage doesn't Create Dlg"?
Please, don't revive the old threads if they don't need it!
PS: note that you may be banned for such type of posts! :cool: