I want create many tab in one windows. And a SpreadSheet in every tab, The tab is same, I must to create many tab?
Posted on 2005-09-12 13:18:52 by gt2000
Here is an example.

KetilO
Attachments:
Posted on 2005-09-13 06:03:51 by KetilO
ok?thanks 8)
Posted on 2005-09-13 12:40:25 by gt2000

Here is an example.

KetilO


a lots of tab in the one windows,how about to transact the sizeborder? I want sizeborder true.
I must be make all the spreadsheet's size to fit the windows?
Posted on 2005-09-18 12:52:29 by gt2000
Hi gt2000

You guessed it.
You have to resize the tabcontrol itselp and also all of the dialogs and spread sheet controls.

KetilO
Posted on 2005-09-18 17:07:58 by KetilO
Hi KetilO,

  I write in this way,but can't resized the tab fit to the windows. why?  :sad:

.elseif eax==WM_INITDIALOG
;Create the tabs
invoke GetDlgItem,hWin,IDC_TAB1
mov hTab,eax
invoke GetDlgItem, hWin, IDC_SPR1
mov spr1,eax
invoke GetDlgItem, hWin, IDD_TAB1
mov htab1, eax
invoke GetDlgItem, hWin, IDD_TABTEST
mov tabtest, eax
                                ...
.elseif eax==WM_SIZE
invoke GetClientRect, hWin, addr @rect
invoke MoveWindow, hTab, 0, 48, @rect.right, @rect.bottom-5, TRUE
invoke MoveWindow, spr1, 0, 48, @rect.right, @rect.bottom-5, TRUE
invoke MoveWindow, tabtest, 0, 48, @rect.right, @rect.bottom-5, TRUE
invoke MoveWindow, htab1, 0, 48, @rect.right, @rect.bottom-5, TRUE


Posted on 2005-09-20 18:07:08 by gt2000
Hi

You forgot to resize each of the child dialogs.

Here is how you can do it.

KetilO
Attachments:
Posted on 2005-09-20 18:26:55 by KetilO
thx KetilO,

I want clicked the right mouse button within the spreadsheet. but don't chack it.why?

.elseif eax==WM_NOTIFY
mov edx,lParam
mov eax,.NMHDR.hwndFrom
.if eax==hSpr
mov eax,.NMHDR.code
.if eax==NM_RCLICK
                                                  ...
                                                  ...
                                                  ...

Posted on 2005-09-24 02:13:33 by gt2000
Hi

The spreadsheet control does not have the NM_RCLICK notification.

KetilO
Posted on 2005-09-25 15:26:55 by KetilO

Hi

You forgot to resize each of the child dialogs.

Here is how you can do it.

KetilO


In this sample have a trouble,run this sample,at the very start ticked “tab4??? and input any data?but you can not input the data into "tab4",in nature the data into "tab2",why? how to put right?
Posted on 2005-09-28 19:09:44 by gt2000
Hi

The problem was that all tab dialogs was created visible.

Here is one that works.

KetilO
Attachments:
Posted on 2005-09-29 04:23:13 by KetilO

Hi

The problem was that all tab dialogs was created visible.

Here is one that works.

KetilO


thanks, WS_VISIBLE must be false!
hei
Posted on 2005-09-30 02:17:44 by gt2000
Hi,KetilO
 
    I can del one tab,but I can't del the sheet in tab,and donot free the memory.
how it was done to free the memory?


gt2000
Posted on 2005-11-24 12:14:24 by gt2000
Just removing a tab is not enough.
You must also destroy the child dialog and the sheet window will also be destroyed.

KetilO
Posted on 2005-11-24 16:03:03 by KetilO
Hi Ketilo,
   I try it,the sheet don't destroyed after destroy the child dialog.and the memory cannot be free.
and remove tab and the child dialog,the tab with the sheet can't synchronization, :mad:

.elseif eax==WM_INITDIALOG
;Create the tabs
invoke GetDlgItem,hWin,IDC_TAB1
mov hTab,eax
mov ts.imask,TCIF_TEXT
mov ts.lpReserved1,0
mov ts.lpReserved2,0
mov ts.iImage,-1
mov ts.lParam,0
mov ts.pszText,offset TabTitle1
mov ts.cchTextMax,sizeof TabTitle1
invoke SendMessage,hTab,TCM_INSERTITEM,0,addr ts
mov ts.pszText,offset TabTitle2
mov ts.cchTextMax,sizeof TabTitle2
invoke SendMessage,hTab,TCM_INSERTITEM,1,addr ts
mov ts.pszText,offset TabTitle3
mov ts.cchTextMax,sizeof TabTitle3
invoke SendMessage,hTab,TCM_INSERTITEM,2,addr ts
mov ts.pszText,offset TabTitle4
mov ts.cchTextMax,sizeof TabTitle4
invoke SendMessage,hTab,TCM_INSERTITEM,3,addr ts
;Create the tab dialogs
invoke CreateDialogParam,hInstance,IDD_TAB1,hTab,addr TabProc,0
mov hTabDlg,eax
invoke CreateDialogParam,hInstance,IDD_TAB1,hTab,addr TabProc,0
mov hTabDlg[4],eax
invoke CreateDialogParam,hInstance,IDD_TAB1,hTab,addr TabProc,0
mov hTabDlg[8],eax
invoke CreateDialogParam,hInstance,IDD_TAB1,hTab,addr TabProc,0
mov hTabDlg[12],eax
invoke ShowWindow,,SW_SHOWDEFAULT
                                ...
                                ...
.elseif eax==REMOVE_SHEET
invoke SendMessage, hTab, TCM_GETCURSEL, 0, 0
push eax
invoke SendMessage, hTab, TCM_DELETEITEM, eax, 0
pop eax
push eax
invoke DestroyWindow,
pop eax
.if eax>=1
dec eax
.endif
invoke SendMessage, hTab, TCM_SETCURSEL, eax, 0




  gt2000
Posted on 2005-11-25 14:06:09 by gt2000