 |
|
 |
Hello, I found a problem with the keyboard navigation: If I press the enter key while the focus is on the "message" button (has the focus frame) nothing happens, if I press the button with the mouse a message box is opened. Also I can't switch the tabs by pressing STRG-TAB STRG-SHIFT-TAB that normally works in windows dialogs with tab controls. Best Regards, Andreas.
|
|
|
|
 |
|
 |
Hello, very good job. But can you explain me the meaning of the constants 5 and 6 passed to SetWindowPos that are subtracted from width and height in function setPage. It seems to be the size of a frame. Isn't is possible to get this value programmatically? I ask this because I want to use this class also in a themed application and I think that the trick with 5 and 6 doesn't work there anymore, or am I wrong? And 6 must be 7, or in the bottom frame is a line missing (on Windows Vista Prof. 32 bit). Thanks, Andreas.
-- Modified Thursday, August 19, 2010 5:32 AM
|
|
|
|
 |
|
 |
Hi
I did not checked this in windows vista. 7 may be correct. These constant values used align the
pages. If given values did not bring expected results you can use as you wish.
Hope its served to your purpose.
Sincerely
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
Hello, Do you know a way to get these constants programmatically? Andreas.
|
|
|
|
 |
|
 |
Hi
In C# those things a possible. But I failed on VC++. Sorry for I could not able
to help you on this.
Sincerely,
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
Hello, Can you tell me how this works in C# (which functions names I have to use), may be I can call some API functions in VC++ or google about it. Thanks, Andreas.
|
|
|
|
 |
|
 |
Hi,
Is there any possibility to hide/show tab pages instead of insert/remove them ?
Thanks,
Cornel.
|
|
|
|
 |
|
 |
Hi Cornel,
I also tried to find an answer to your question when I am doing this. But I failed.
Because of that I used this insert and remove functionality. But if you find an answer
please remember to share it with me.
Sincerely,
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
Hi Venura,
When a user choses a tab, this function runs
void CIbTabCtrl::OnTcnSelchange(NMHDR *pNMHDR, LRESULT *pResult)
When we arrive in to this function is there a easy way to figure out which PP the user clicked on?
Like PPTWO, so that I can call a static member function from that CPPTwo class?
Cheers
Ranga
|
|
|
|
 |
|
 |
Hi,
I am using vc++ 8.0. The associated dialogs in CTabCtrl are not visible.
They are visible only if i click on the particular tab or move the dialog.
Why is it so? Any Help.
Thanks in Advance,
Senthil
|
|
|
|
 |
|
 |
I have written a Dialogue VC++ 7.1.
I have created Tab in main window and it works fautlessly. I have created another Tab in one of the window within the main Tab and unfortunately created sub- pages are not visible at all. Could you possibly explain me what causes the problem? Thank you in advance.
Regards
Adamacka
|
|
|
|
 |
|
 |
Hi Venura,
The situation I ran into because I had to create a menu in the main dialog.
I have a Edit control and CComboBox in my Property page PPOne.
In my file menu, I do File Open, through which I can open a file and read its contents, am able to populate memory,then I perform the step m_oPPOne.Create(IDD_PP_ONE) I see the tab appear, now
how can I make the the data for the controls on this PP appear in their field.
Example: Normally if I click a button when I am on the PP, this below function works fine.
Void CPPOne::OnBtnRefreshClicked
{
CString str;
str.Format("%d",some_int1);
cs_my_edit_control = str;
UpdateData(TRUE);
ccb_my_combo_box.SelectString(0,*(&my_predef_Str[0+some_int2]));
}
But if I call this above function from my main dialog, it fails with a assertion failure in line 4184 on wincore.cpp saying doing UpdateData before DoModal.
How can I overcome this? any suggestion would help.
Best Regards
RV
|
|
|
|
 |
|
 |
Please send me your code, I can look at it. Coz it is difficult
to think what the problem is.
Thank You
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
Hello Venura:
You Tab Ctrl app is brilliant, hats off for it.
I have written a Dialogue(VC++ 7.0) which opens a comm port and does data exchange.
In my main dialogue I have written a lot of code, I am trying to convert it into a Prpoerty page without having to recode all of the items on the Dialogue....This property page, I want to use as my first Tab or opening tab.....
Can you suggest a quick and easy way to do this....
Appreciate your suggestion.
Best Regards
Ranga
|
|
|
|
 |
|
 |
Hi,
I think you can do it like this, property pages are derived from CDialog if I correct. You
can simpley derived your Dialog class to a property page class... or you can type cast... This can be done first as a trial.
If its work you can do it for your actual...
Hope you can do some thing like this, you do not need to write every thing from scratch
in a property page.
Sincerely
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
This is exactly what im looking for. - You saved me some time. Thanks.
|
|
|
|
 |
|
 |
Hi
Yes It is possible to remove pages after add. But it is not a
recomended method to do so. If you realy want to do so, what I can
propose is hide the relevant tab in tab control. No need to hide the page
if it is not currently selected. otherwise you have to hide that too.
Anyway I will impliment that too.. and update code project most probably today.
Thank You
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
Yeah this has been of great help in a small side project.
thanks a lot
5 from me
|
|
|
|
 |
|
 |
Hi I am having trouble in getting the tabs to display the associated dialogs on the page. Instead, it shows a gray box. What might be causing this? I ensured that the Dialog IDs were the same as the associated classes and I also made sure that the properties of the dialog were the same as the demo project. I have tabs, but no content. I'm kind of stump as how to corect this.
Any help would be most appriciated.
Take care,
Jeff
|
|
|
|
 |
|
 |
Hi
If I could see your code I can help you in a straighter way. Have you added the tab control?
And you should use property pages instead of dialogs
Try with the given sample code. If the problem is still existing let me know?
Thank you
Venura
VENURA GOONATILLAKE, SRI LANKA
|
|
|
|
 |
|
 |
Well, I am not sure what exactly the problem is. I renamed all of my sample code so that it allined directly with the sample project code. I think I might try creating new dialogs and see if that works. I noticed in VS 2003 it the resource generator has major problems when one changes the underlying code that it created. (Thanks MS).
Thanks for your help thus far.
~Jeff
|
|
|
|
 |
|
 |
Still no luck. I have no clue what the reason is and I am presently having a problem with VS 2003 creating a class for a property sheet dialog when you right click and call the class wizard to create a class file for the dialog. I have no idea how to fix this.
Regards,
Jeff
|
|
|
|
 |
|
 |
Hi
I got the same problem as Jeff ...
Is it because I use Visual Studio 2005, or Windows XP Pro SP2 ?
Anyway, I found a way to make it work;
hopefully it may help Jeff and others !
In addNewPage(), I added pPage->SetParent(this->GetParent());
and
In setPage(), I added pWnd->ShowWindow(SW_SHOW); // at the end
Cheers
-- modified at 10:03 Tuesday 5th December, 2006
Patrick
|
|
|
|
 |
|
 |
Thanks Patrick. I'm using VS 2003 on XP Svc. Pack 1 and the tabs finally display properly. I still have problems with positioning for which I need figure out. I had the same problem using this as well on Windows 2000. I think it might be a bug in Venura's code. Pehaps he should make this addition so that others will not have this same problem.
Thanks for again for your help.
~Jeff
|
|
|
|
 |
|
 |
Patrick,
I still have one problem. My event handlers are not responding now with the property pages as they were responding before. Basically, for example, the checkbox is unable to be clicked. Any idea how to fix this?
~Jeff
|
|
|
|
 |