Tab Control (eVC++ 4.0) - problem - pomocy

  • 5 Odpowiedzi
  • 1203 Wyświetleń

0 użytkowników i 1 Gość przegląda ten wątek.

Tab Control (eVC++ 4.0) - problem - pomocy
« dnia: Marzec 24, 2006, 21:00:19 »
Witam

Jak w temacie mam problem związany z tą kontrolką - a właściwie kilka.
1) Gdzie zmienia się etykiety (nazwy) każdej zakładki???
2) Gdzie ustala się ilośc zakładek???
3) Jak zrobić aby inna kontrolka (EditBox, Static, RadioButton, ComboBox) prznalezala do danej zakladki ???
4) Po skapilowaniu w ogole nie ma zakladek (nie widac ich)???

Poradzcie prosze.

Pozdrawiam.

Tab Control (eVC++ 4.0) - problem - pomocy
« Odpowiedź #1 dnia: Marzec 25, 2006, 21:47:28 »
Może by tak ktos w końcu odpowiedział do jak widze do tej pory wszyscy tylko oglądają temat a nikt się nie wypowie (podobnie jak z moim tematem o menu contextowym - zinteresowanie marne). Już mi lepiej jak to napisałem ...........

Wiem że w VC++ należy do każdej zakładki dodać Dialog (jako Child i bez Title Bar) i dopiero wtedy będzie można kontrolki kłaśc na tych Dialogach. Niestety nie wiem jak to powiązać. Nie wiem również gdzie zmienia się etykiety każdej zakładki. W VB to jest proste a w VC++ jest problem i to bardzo duży.

Bardzo bym prosił o link do strony z łopatologicznym przykładem skąd można byłoby się nauczyć. Prosze nie pisać że jest MSDN bo tam akurat nie ma przykładu tylko suchy opis metod - z resztą słabo dla mnie zrozumiały. Link nie musi byc do strony konkretnie związany z PocketPC, może dotyczyć komputerów stacjonarnych - chodzi o to żeby tłumaczył problem. Z drugiej strony nie musi być link tylko ktoś mógły wypowiedzieć się na ten temat.

Niepozdrawiam.

Tab Control (eVC++ 4.0) - problem - pomocy
« Odpowiedź #2 dnia: Marzec 26, 2006, 11:08:27 »
Witam.

Staram sobie jakos radzić ale niestety nie idzi mi to za dobrze. Znalazłem pewien łopatologiczny przykład ale niestety mimo postepując krok po kroku program nie chce mi działać (wyskakuje bardzo dużo błędów kompilacji). Podaje link do strony
http://www.codersource.net/mfc_ctabctrl.html

Błędy sa nastepujące.
--------------------Configuration: TabControl - Win32 (WCE emulator) Debug--------------------
Compiling...
MyTabCtrl.cpp
D:\projekty\TabControl\MyTabCtrl.cpp(25) : error C2061: syntax error : identifier 'Dialog1'
D:\projekty\TabControl\MyTabCtrl.cpp(26) : error C2061: syntax error : identifier 'Dialog2'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : error C2143: syntax error : missing ';' before '}'
D:\projekty\TabControl\MyTabCtrl.cpp(29) : fatal error C1003: error count exceeds 100; stopping compilation
TabControl.cpp
D:\projekty\TabControl\TabControlDlg.h(23) : error C2146: syntax error : missing ';' before identifier 'm_tbCtrl'
D:\projekty\TabControl\TabControlDlg.h(23) : error C2501: 'CMyTabCtrl' : missing storage-class or type specifiers
D:\projekty\TabControl\TabControlDlg.h(23) : error C2501: 'm_tbCtrl' : missing storage-class or type specifiers
TabControlDlg.cpp
D:\projekty\TabControl\TabControlDlg.h(23) : error C2146: syntax error : missing ';' before identifier 'm_tbCtrl'
D:\projekty\TabControl\TabControlDlg.h(23) : error C2501: 'CMyTabCtrl' : missing storage-class or type specifiers
D:\projekty\TabControl\TabControlDlg.h(23) : error C2501: 'm_tbCtrl' : missing storage-class or type specifiers
D:\projekty\TabControl\TabControlDlg.cpp(31) : error C2065: 'm_tbCtrl' : undeclared identifier
D:\projekty\TabControl\TabControlDlg.cpp(56) : error C2228: left of '.InitDialogs' must have class/struct/union type
D:\projekty\TabControl\TabControlDlg.cpp(57) : error C2228: left of '.InsertItem' must have class/struct/union type
D:\projekty\TabControl\TabControlDlg.cpp(58) : error C2228: left of '.InsertItem' must have class/struct/union type
D:\projekty\TabControl\TabControlDlg.cpp(60) : error C2228: left of '.ActivateTabDialogs' must have class/struct/union type
Generating Code...
Error executing cl.exe.

TabControl.exe - 113 error(s), 0 warning(s)


Jak widać jest 100 błedów dotyczących braku średnika. Dodam że ten przykład zrobiłem a raczej ściągnąłem z tamtej strony i odpaliłem w VC++ 6.0 i wszystko ładnie działa, a eVC++ 4.0 TAKIE RRZECZY się dzieją.

Bardzo prosze o pomoc.

Pozdrawiam.

Tab Control (eVC++ 4.0) - problem - pomocy
« Odpowiedź #3 dnia: Marzec 27, 2006, 01:15:16 »
Witam

Oświadczam z zadowoleniem, że udało mi się obejść problem Tab Control. Mianowicie zastąpiłem to klasą CPropertySheet dzieki której można imitować zakładki z Tab Control. Podaje link do strony gdzie ten problem jest dobrze opisany. Nie ma łopatologicznego wytłumaczenia Krok-po-kroku ale wzorując się na przykładzie tam załączonym problem rozwiązać można.

Link do strony:
http://www.pocketpcdn.com/articles/propsheetmenubar.html

Mam nadzieję ze komuś to pomoże. Najgorsze jest to że nikt nie skomentował problemu, ech ..........

Pozdrawiam.

Tab Control (eVC++ 4.0) - problem - pomocy
« Odpowiedź #4 dnia: Grudzień 14, 2006, 09:26:42 »
witam sprawdziłem ten przykład i działa tylko że należy go zrobić zgodnie z opisem.

Błędy sa nastepujące.

D:\projekty\TabControl\MyTabCtrl.cpp(25) : error C2061: syntax error : identifier 'Dialog1'
D:\projekty\TabControl\MyTabCtrl.cpp(26) : error C2061: syntax error : identifier 'Dialog2'

Z tych błędów wynika iż nie masz zrobionch dialogów, które zostaną umieszczone na poszczególnych zakładkach tabcontrol bądź nazwałeś je inaczej. Dalsze błędy są wynikiem "pogubienia się" kompilatora

Pozdrawiam :)

Tab Control (eVC++ 4.0) - problem - pomocy
« Odpowiedź #5 dnia: Grudzień 17, 2006, 23:16:21 »
Jeszcze ważne w metodzie
CTabExample1Dlg::OnInitDialog()
//zamiast
//m_tbCtrl.InsertItem(0,"Sample Tab 1");
//m_tbCtrl.InsertItem(1,"Sample Tab 2");
//należy użyć
TCITEM tcItem;
tcItem.mask = TCIF_TEXT;
tcItem.pszText = _T("Sample Tab 1");
m_tbCtrl.InsertItem(0, &tcItem);
tcItem.pszText = _T("Sample Tab 2");
m_tbCtrl.InsertItem(0, &tcItem);

No i to chyba wszystko :)
Pozdrawiam