15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


CPropertyPage & CFormViews

Larry Wall -- tech@clearguis.com
Thursday, January 11, 1996

I have a 16 bit project in which I am using tabbed CFormViews. The 
CTabView class was obtained quite a while ago off of the MSMFC 
CompuServe forum.

I am now in the process of converting the app to 32 bit and I am 
having trouble with the CTabView class. I think that it would be 
best to go to the CPropertySheet/CPropertyPage setups but I am 
concerned about the fact that I now use formviews instead of dialogs.

I discovered early on in the project that if I used dialogs, I could 
not print from within the dialog because of the lack of derivation 
from the CView class which seems to be directly involved in printing. 
So, instead, I spent the time converting the 
dialogs to views and I was able to set up a proper print engine.

Now, I can see that CPropertySheet is derived from CWnd but the 
CPropertyPage(s) are derived from CDialog.

I need to find out if the CPropertySheet has the capability of 
supporting CFormViews in the same way CPropertyPages are. I know 
that some of the functions such as AddPage
may not work, but again my concern is the overall strategy of my idea.

BTW, I am using VC++4.0.

Larry..




Terry Peterson -- petersot@motsat.sat.mot.com
Tuesday, January 16, 1996

I also used what I believe is the same CTabview class from the MSMFC forum.
The app started as a 16 bit app and I then successfully converted it to a
32 bit app using the CTabview class with formviews.  I had to make 
changes for it to work in the 32 bit world which are outlined below:

#if !defined(_WIN32)
if((char)(DWORD)AnsiUpper((LPSTR)MAKELP(0,pTab->m_tabLabel[i])) == pTab->m_mnemonic && i != (sLen -1))
#else  // 16 bit Windows
if((char)(DWORD)AnsiUpper((LPSTR)pTab->m_tabLabel[i]) == pTab->m_mnemonic && i != (sLen -1))
#endif

The reason for the changes is that the MAKELP (make long pointer) is not used
in WIN32 since all pointers are 32 bit.

There are 3 places in the CTabView .cpp file where this type of change needs to be made.

Hope this helps,

Terry Peterson

petersot@motsat.sat.mot.com
Terry_Peterson@msn.com




| Вернуться в корень Архива |