Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1:/tmp/cvs-serv10254/src/cbits/Win32
Modified Files:
Button.c CheckBox.c EditBox.c GroupBox.c Label.c ListBox.c
Notebook.c PopUp.c ProgressBar.c RadioBox.c Slider.c
Log Message:
Any control must be hidden by default. The control will be show if it is
contained in the window layout
Index: Button.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Button.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Button.c 24 Aug 2003 21:07:48 -0000 1.6
--- Button.c 8 Oct 2003 22:21:57 -0000 1.7
***************
*** 1,60 ****
! #include "Button.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateButton(WindowHandle form)
! {
! HWND hButton;
!
! hButton = CreateWindow(
! "BUTTON",
! NULL,
! WS_CHILD | WS_VISIBLE | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hButton, "BUTTON");
! };
!
! void osGetButtonReqSize(WindowHandle button, int *res)
! {
! SIZE sz;
! HDC hDC = GetDC(button);
! HFONT hFont = (HFONT) SendMessage(button,WM_GETFONT,0,0);
! int nLen = GetWindowTextLength(button);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(button, buffer, nLen+1);
!
! if (hFont)
! SelectObject(hDC, hFont);
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
! ReleaseDC(button, hDC);
!
! res[0] = sz.cx + GetSystemMetrics(SM_CXBORDER)*2 + 6;
! res[1] = sz.cy + GetSystemMetrics(SM_CYBORDER)*2 + 6;
! }
!
! char *osGetButtonText(WindowHandle button)
! {
! int nLen = GetWindowTextLength(button);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(button, buffer, nLen+1);
! return buffer;
! };
!
! void osSetButtonText(WindowHandle button, char *txt)
! {
! SetWindowText(button, txt);
! osForceContainerReLayout(button);
! };
!
! void osChangeButtonFont(WindowHandle button, FontHandle font)
! {
! SendMessage(button, WM_SETFONT, (WPARAM) font, MAKELPARAM (TRUE,0));
! osForceContainerReLayout(button);
! };
--- 1,60 ----
! #include "Button.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateButton(WindowHandle form)
! {
! HWND hButton;
!
! hButton = CreateWindow(
! "BUTTON",
! NULL,
! WS_CHILD | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hButton, "BUTTON");
! };
!
! void osGetButtonReqSize(WindowHandle button, int *res)
! {
! SIZE sz;
! HDC hDC = GetDC(button);
! HFONT hFont = (HFONT) SendMessage(button,WM_GETFONT,0,0);
! int nLen = GetWindowTextLength(button);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(button, buffer, nLen+1);
!
! if (hFont)
! SelectObject(hDC, hFont);
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
! ReleaseDC(button, hDC);
!
! res[0] = sz.cx + GetSystemMetrics(SM_CXBORDER)*2 + 6;
! res[1] = sz.cy + GetSystemMetrics(SM_CYBORDER)*2 + 6;
! }
!
! char *osGetButtonText(WindowHandle button)
! {
! int nLen = GetWindowTextLength(button);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(button, buffer, nLen+1);
! return buffer;
! };
!
! void osSetButtonText(WindowHandle button, char *txt)
! {
! SetWindowText(button, txt);
! osForceContainerReLayout(button);
! };
!
! void osChangeButtonFont(WindowHandle button, FontHandle font)
! {
! SendMessage(button, WM_SETFONT, (WPARAM) font, MAKELPARAM (TRUE,0));
! osForceContainerReLayout(button);
! };
Index: CheckBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/CheckBox.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CheckBox.c 24 Aug 2003 21:07:48 -0000 1.7
--- CheckBox.c 8 Oct 2003 22:21:57 -0000 1.8
***************
*** 1,68 ****
! #include "CheckBox.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateCheckBox(WindowHandle window)
! {
! HWND hCheckBox;
!
! hCheckBox = CreateWindow(
! "BUTTON",
! NULL,
! WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX | WS_TABSTOP,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hCheckBox, "CHECKBOX");
! };
!
! void osGetCheckBoxReqSize(WindowHandle checkbox, int *res)
! {
! SIZE sz;
! TEXTMETRIC tm;
! HFONT hOldFont;
! HDC hDC = GetDC(checkbox);
! int nLen = GetWindowTextLength(checkbox);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(checkbox, buffer, nLen+1);
!
! hOldFont = SelectObject(hDC, (HFONT) SendMessage(checkbox, WM_GETFONT, 0, 0));
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
! GetTextMetrics(hDC, &tm);
!
! SelectObject(hDC, hOldFont);
!
! rfree(buffer);
! ReleaseDC(checkbox, hDC);
!
! res[0] = sz.cx + 32;
! res[1] = tm.tmHeight+tm.tmDescent;
! };
!
! char *osGetCheckBoxText(WindowHandle checkbox)
! {
! int nLen = GetWindowTextLength(checkbox);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(checkbox, buffer, nLen+1);
! return buffer;
! };
!
! void osSetCheckBoxText(WindowHandle checkbox, char *txt)
! {
! SetWindowText(checkbox, txt);
! osForceContainerReLayout(checkbox);
! };
!
! BOOL osGetCheckBoxState(WindowHandle checkbox)
! {
! return SendMessage(checkbox,BM_GETCHECK,0,0) == BST_CHECKED;
! };
!
! void osSetCheckBoxState(WindowHandle checkbox, BOOL state)
! {
! SendMessage(checkbox,BM_SETCHECK,state ? BST_CHECKED : BST_UNCHECKED,0);
! };
--- 1,68 ----
! #include "CheckBox.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateCheckBox(WindowHandle window)
! {
! HWND hCheckBox;
!
! hCheckBox = CreateWindow(
! "BUTTON",
! NULL,
! WS_CHILD | BS_AUTOCHECKBOX | WS_TABSTOP,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hCheckBox, "CHECKBOX");
! };
!
! void osGetCheckBoxReqSize(WindowHandle checkbox, int *res)
! {
! SIZE sz;
! TEXTMETRIC tm;
! HFONT hOldFont;
! HDC hDC = GetDC(checkbox);
! int nLen = GetWindowTextLength(checkbox);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(checkbox, buffer, nLen+1);
!
! hOldFont = SelectObject(hDC, (HFONT) SendMessage(checkbox, WM_GETFONT, 0, 0));
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
! GetTextMetrics(hDC, &tm);
!
! SelectObject(hDC, hOldFont);
!
! rfree(buffer);
! ReleaseDC(checkbox, hDC);
!
! res[0] = sz.cx + 32;
! res[1] = tm.tmHeight+tm.tmDescent;
! };
!
! char *osGetCheckBoxText(WindowHandle checkbox)
! {
! int nLen = GetWindowTextLength(checkbox);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(checkbox, buffer, nLen+1);
! return buffer;
! };
!
! void osSetCheckBoxText(WindowHandle checkbox, char *txt)
! {
! SetWindowText(checkbox, txt);
! osForceContainerReLayout(checkbox);
! };
!
! BOOL osGetCheckBoxState(WindowHandle checkbox)
! {
! return SendMessage(checkbox,BM_GETCHECK,0,0) == BST_CHECKED;
! };
!
! void osSetCheckBoxState(WindowHandle checkbox, BOOL state)
! {
! SendMessage(checkbox,BM_SETCHECK,state ? BST_CHECKED : BST_UNCHECKED,0);
! };
Index: EditBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/EditBox.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** EditBox.c 7 Oct 2003 20:20:42 -0000 1.10
--- EditBox.c 8 Oct 2003 22:21:57 -0000 1.11
***************
*** 11,15 ****
"EDIT",
NULL,
! WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL | WS_TABSTOP,
0,0,0,0,
window,
--- 11,15 ----
"EDIT",
NULL,
! WS_CHILD | WS_BORDER | ES_AUTOHSCROLL | WS_TABSTOP,
0,0,0,0,
window,
Index: GroupBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/GroupBox.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GroupBox.c 1 Sep 2003 20:27:49 -0000 1.1
--- GroupBox.c 8 Oct 2003 22:21:57 -0000 1.2
***************
*** 13,17 ****
return CallWindowProc(DefGroupBoxProc, hWnd, uMsg, wParam, lParam);
};
!
return HWindowSharedFunction(DefGroupBoxProc, hWnd, uMsg, wParam, lParam);
}
--- 13,17 ----
return CallWindowProc(DefGroupBoxProc, hWnd, uMsg, wParam, lParam);
};
!
return HWindowSharedFunction(DefGroupBoxProc, hWnd, uMsg, wParam, lParam);
}
***************
*** 24,28 ****
"HGROUPBOX",
NULL,
! WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
0,0,0,0,
form,
--- 24,28 ----
"HGROUPBOX",
NULL,
! WS_CHILD | BS_GROUPBOX,
0,0,0,0,
form,
Index: Label.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Label.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Label.c 24 Aug 2003 21:07:48 -0000 1.7
--- Label.c 8 Oct 2003 22:21:57 -0000 1.8
***************
*** 1,60 ****
! #include "Label.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateLabel(WindowHandle window)
! {
! HWND hText;
!
! hText = CreateWindow(
! "STATIC",
! NULL,
! WS_CHILD | WS_VISIBLE,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hText, "TEXT");
! };
!
! void osGetLabelReqSize(WindowHandle label, int *res)
! {
! SIZE sz;
! HDC hDC = GetDC(label);
! HFONT hFont = (HFONT) SendMessage(label,WM_GETFONT,0,0);
! int nLen = GetWindowTextLength(label);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(label, buffer, nLen+1);
!
! if (hFont)
! SelectObject(hDC, hFont);
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
! ReleaseDC(label, hDC);
!
! res[0] = sz.cx;
! res[1] = sz.cy;
! }
!
! char *osGetLabelText(WindowHandle label)
! {
! int nLen = GetWindowTextLength(label);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(label, buffer, nLen+1);
! return buffer;
! };
!
! void osSetLabelText(WindowHandle label, char *txt)
! {
! SetWindowText(label, txt);
! osForceContainerReLayout(label);
! };
!
! void osChangeLabelFont(WindowHandle label, FontHandle font)
! {
! SendMessage(label, WM_SETFONT, (WPARAM) font, MAKELPARAM (TRUE,0));
! osForceContainerReLayout(label);
! };
--- 1,60 ----
! #include "Label.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateLabel(WindowHandle window)
! {
! HWND hText;
!
! hText = CreateWindow(
! "STATIC",
! NULL,
! WS_CHILD,
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hText, "TEXT");
! };
!
! void osGetLabelReqSize(WindowHandle label, int *res)
! {
! SIZE sz;
! HDC hDC = GetDC(label);
! HFONT hFont = (HFONT) SendMessage(label,WM_GETFONT,0,0);
! int nLen = GetWindowTextLength(label);
! char *buffer = (char *) rmalloc(nLen+1);
! nLen = GetWindowText(label, buffer, nLen+1);
!
! if (hFont)
! SelectObject(hDC, hFont);
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
! ReleaseDC(label, hDC);
!
! res[0] = sz.cx;
! res[1] = sz.cy;
! }
!
! char *osGetLabelText(WindowHandle label)
! {
! int nLen = GetWindowTextLength(label);
! char *buffer = (char *) rmalloc(nLen+1);
! GetWindowText(label, buffer, nLen+1);
! return buffer;
! };
!
! void osSetLabelText(WindowHandle label, char *txt)
! {
! SetWindowText(label, txt);
! osForceContainerReLayout(label);
! };
!
! void osChangeLabelFont(WindowHandle label, FontHandle font)
! {
! SendMessage(label, WM_SETFONT, (WPARAM) font, MAKELPARAM (TRUE,0));
! osForceContainerReLayout(label);
! };
Index: ListBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ListBox.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ListBox.c 24 Aug 2003 21:07:48 -0000 1.6
--- ListBox.c 8 Oct 2003 22:21:57 -0000 1.7
***************
*** 1,105 ****
! #include "ListBox.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateListBox(WindowHandle window, BOOL multisel)
! {
! HWND hListBox;
!
! hListBox = CreateWindowEx(
! WS_EX_CLIENTEDGE,
! "LISTBOX",
! NULL,
! WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_BORDER | LBS_NOTIFY | WS_TABSTOP | (multisel ? LBS_EXTENDEDSEL : 0),
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hListBox, "LISTBOX");
! };
!
! void osAppendListBoxItem(WindowHandle listbox, char *title)
! {
! SendMessage(listbox, LB_ADDSTRING, 0, (LPARAM) title);
! osForceContainerReLayout(listbox);
! };
!
! void osInsertListBoxItem(WindowHandle listbox, int index, char *title)
! {
! SendMessage(listbox, LB_INSERTSTRING, index, (LPARAM) title);
! osForceContainerReLayout(listbox);
! };
!
! void osRemoveListBoxItem(WindowHandle listbox, int index)
! {
! SendMessage(listbox, LB_DELETESTRING, index, 0);
! osForceContainerReLayout(listbox);
! };
!
! void osRemoveAllListBoxItems(WindowHandle listbox)
! {
! SendMessage(listbox, LB_RESETCONTENT,0,0);
! osForceContainerReLayout(listbox);
! };
!
! void osGetListBoxReqSize(WindowHandle listbox, int *res)
! {
! SIZE sz;
! int i,nCount, nLen, width, height;
! char *buffer;
! HDC hDC = GetDC(listbox);
! HFONT hFont = (HFONT) SendMessage(listbox,WM_GETFONT,0,0);
!
! if (hFont)
! SelectObject(hDC, hFont);
!
! width = 10;
! height = 2;
! nCount = SendMessage(listbox,LB_GETCOUNT,0,0);
! for (i = 0; i < nCount; i++)
! {
! nLen = SendMessage(listbox,LB_GETTEXTLEN,i,0);
! buffer = (char *) rmalloc(nLen+1);
! nLen = SendMessage(listbox,LB_GETTEXT,i,(LPARAM)buffer);
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
!
! if (width < sz.cx) width = sz.cx;
! height += sz.cy;
! }
!
! ReleaseDC(listbox, hDC);
!
! res[0] = width + GetSystemMetrics(SM_CXBORDER)*2 + GetSystemMetrics(SM_CXVSCROLL);
! res[1] = height+ GetSystemMetrics(SM_CYBORDER)*2;
! };
!
! int osGetListBoxSingleSelection(WindowHandle listbox)
! {
! return SendMessage(listbox, LB_GETCURSEL, 0, 0);
! };
!
! BOOL osGetListBoxItemSelectState(WindowHandle listbox, int index)
! {
! return SendMessage(listbox, LB_GETSEL, index, 0) > 0;
! }
!
! void osSetListBoxSingleSelection(WindowHandle listbox, int index)
! {
! SendMessage(listbox, LB_SETCURSEL, index, 0);
! handleControlCommand(listbox);
! };
!
! void osSetListBoxItemSelectState(WindowHandle listbox, int index, BOOL state)
! {
! SendMessage(listbox, LB_SETSEL, state, index);
! };
!
! int osGetListBoxCurrentItem(WindowHandle listbox)
! {
! return SendMessage(listbox, LB_GETCARETINDEX, 0, 0);
! }
--- 1,105 ----
! #include "ListBox.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateListBox(WindowHandle window, BOOL multisel)
! {
! HWND hListBox;
!
! hListBox = CreateWindowEx(
! WS_EX_CLIENTEDGE,
! "LISTBOX",
! NULL,
! WS_CHILD | WS_VSCROLL | WS_BORDER | LBS_NOTIFY | WS_TABSTOP | (multisel ? LBS_EXTENDEDSEL : 0),
! 0,0,0,0,
! window,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hListBox, "LISTBOX");
! };
!
! void osAppendListBoxItem(WindowHandle listbox, char *title)
! {
! SendMessage(listbox, LB_ADDSTRING, 0, (LPARAM) title);
! osForceContainerReLayout(listbox);
! };
!
! void osInsertListBoxItem(WindowHandle listbox, int index, char *title)
! {
! SendMessage(listbox, LB_INSERTSTRING, index, (LPARAM) title);
! osForceContainerReLayout(listbox);
! };
!
! void osRemoveListBoxItem(WindowHandle listbox, int index)
! {
! SendMessage(listbox, LB_DELETESTRING, index, 0);
! osForceContainerReLayout(listbox);
! };
!
! void osRemoveAllListBoxItems(WindowHandle listbox)
! {
! SendMessage(listbox, LB_RESETCONTENT,0,0);
! osForceContainerReLayout(listbox);
! };
!
! void osGetListBoxReqSize(WindowHandle listbox, int *res)
! {
! SIZE sz;
! int i,nCount, nLen, width, height;
! char *buffer;
! HDC hDC = GetDC(listbox);
! HFONT hFont = (HFONT) SendMessage(listbox,WM_GETFONT,0,0);
!
! if (hFont)
! SelectObject(hDC, hFont);
!
! width = 10;
! height = 2;
! nCount = SendMessage(listbox,LB_GETCOUNT,0,0);
! for (i = 0; i < nCount; i++)
! {
! nLen = SendMessage(listbox,LB_GETTEXTLEN,i,0);
! buffer = (char *) rmalloc(nLen+1);
! nLen = SendMessage(listbox,LB_GETTEXT,i,(LPARAM)buffer);
!
! GetTextExtentPoint32(hDC, buffer, nLen, &sz);
!
! rfree(buffer);
!
! if (width < sz.cx) width = sz.cx;
! height += sz.cy;
! }
!
! ReleaseDC(listbox, hDC);
!
! res[0] = width + GetSystemMetrics(SM_CXBORDER)*2 + GetSystemMetrics(SM_CXVSCROLL);
! res[1] = height+ GetSystemMetrics(SM_CYBORDER)*2;
! };
!
! int osGetListBoxSingleSelection(WindowHandle listbox)
! {
! return SendMessage(listbox, LB_GETCURSEL, 0, 0);
! };
!
! BOOL osGetListBoxItemSelectState(WindowHandle listbox, int index)
! {
! return SendMessage(listbox, LB_GETSEL, index, 0) > 0;
! }
!
! void osSetListBoxSingleSelection(WindowHandle listbox, int index)
! {
! SendMessage(listbox, LB_SETCURSEL, index, 0);
! handleControlCommand(listbox);
! };
!
! void osSetListBoxItemSelectState(WindowHandle listbox, int index, BOOL state)
! {
! SendMessage(listbox, LB_SETSEL, state, index);
! };
!
! int osGetListBoxCurrentItem(WindowHandle listbox)
! {
! return SendMessage(listbox, LB_GETCARETINDEX, 0, 0);
! }
Index: Notebook.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Notebook.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Notebook.c 31 Aug 2003 13:23:58 -0000 1.6
--- Notebook.c 8 Oct 2003 22:21:57 -0000 1.7
***************
*** 31,35 ****
{
LRESULT lResult;
!
switch (uMsg)
{
--- 31,35 ----
{
LRESULT lResult;
!
switch (uMsg)
{
***************
*** 43,47 ****
TCITEM item;
HWND hNotebookPage;
!
if (pNMHDR->hwndFrom == hWnd)
{
--- 43,47 ----
TCITEM item;
HWND hNotebookPage;
!
if (pNMHDR->hwndFrom == hWnd)
{
***************
*** 62,66 ****
break;
}
!
return 0;
}
--- 62,66 ----
break;
}
!
return 0;
}
***************
*** 70,74 ****
lResult = CallWindowProc(DefTabCtrlProc, hWnd, uMsg, wParam, lParam);
!
switch (uMsg)
{
--- 70,74 ----
lResult = CallWindowProc(DefTabCtrlProc, hWnd, uMsg, wParam, lParam);
!
switch (uMsg)
{
***************
*** 81,85 ****
break;
}
!
return lResult;
}
--- 81,85 ----
break;
}
!
return lResult;
}
***************
*** 117,121 ****
"HNOTEBOOK",
NULL,
! WS_CHILD | WS_VISIBLE | WS_TABSTOP,
0,0,0,0,
form,
--- 117,121 ----
"HNOTEBOOK",
NULL,
! WS_CHILD | WS_TABSTOP,
0,0,0,0,
form,
Index: PopUp.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/PopUp.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PopUp.c 26 Aug 2003 21:23:52 -0000 1.6
--- PopUp.c 8 Oct 2003 22:21:57 -0000 1.7
***************
*** 10,14 ****
"COMBOBOX",
NULL,
! WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,
0,0,0,0,
window,
--- 10,14 ----
"COMBOBOX",
NULL,
! WS_CHILD | CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,
0,0,0,0,
window,
Index: ProgressBar.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ProgressBar.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ProgressBar.c 27 Mar 2003 13:36:22 -0000 1.1
--- ProgressBar.c 8 Oct 2003 22:21:57 -0000 1.2
***************
*** 1,65 ****
! #include "ProgressBar.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateHorzProgressBar(WindowHandle form, BOOL bSmooth)
! {
! HWND hBar;
!
! hBar = CreateWindow(
! PROGRESS_CLASS,
! NULL,
! (bSmooth ? PBS_SMOOTH : 0) | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hBar, PROGRESS_CLASS);
! };
!
! WindowHandle osCreateVertProgressBar(WindowHandle form, BOOL bSmooth)
! {
! HWND hBar;
!
! hBar = CreateWindow(
! PROGRESS_CLASS,
! NULL,
! (bSmooth ? PBS_SMOOTH : 0) | PBS_VERTICAL | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hBar, PROGRESS_CLASS);
! };
!
! void osGetProgressBarReqSize(WindowHandle bar, int *res)
! {
! LONG lStyle = GetWindowLong(bar,GWL_STYLE);
!
! if (lStyle & PBS_VERTICAL)
! {
! res[0] = GetSystemMetrics(SM_CXVSCROLL);
! res[1] = GetSystemMetrics(SM_CYVSCROLL)*2;
! }
! else
! {
! res[0] = GetSystemMetrics(SM_CXHSCROLL)*2;
! res[1] = GetSystemMetrics(SM_CYHSCROLL);
! }
! }
!
! void osSetProgressBarFraction(WindowHandle bar, int minPos, int maxPos, int pos)
! {
! SendMessage(bar, PBM_SETRANGE32, minPos, maxPos);
! SendMessage(bar, PBM_SETPOS, pos, 0);
! }
!
! int osGetProgressBarFraction(WindowHandle bar, int minPos, int maxPos)
! {
! return SendMessage(bar, PBM_GETPOS, 0, 0);
! }
!
--- 1,65 ----
! #include "ProgressBar.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateHorzProgressBar(WindowHandle form, BOOL bSmooth)
! {
! HWND hBar;
!
! hBar = CreateWindow(
! PROGRESS_CLASS,
! NULL,
! (bSmooth ? PBS_SMOOTH : 0) | WS_CHILD | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hBar, PROGRESS_CLASS);
! };
!
! WindowHandle osCreateVertProgressBar(WindowHandle form, BOOL bSmooth)
! {
! HWND hBar;
!
! hBar = CreateWindow(
! PROGRESS_CLASS,
! NULL,
! (bSmooth ? PBS_SMOOTH : 0) | PBS_VERTICAL | WS_CHILD | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hBar, PROGRESS_CLASS);
! };
!
! void osGetProgressBarReqSize(WindowHandle bar, int *res)
! {
! LONG lStyle = GetWindowLong(bar,GWL_STYLE);
!
! if (lStyle & PBS_VERTICAL)
! {
! res[0] = GetSystemMetrics(SM_CXVSCROLL);
! res[1] = GetSystemMetrics(SM_CYVSCROLL)*2;
! }
! else
! {
! res[0] = GetSystemMetrics(SM_CXHSCROLL)*2;
! res[1] = GetSystemMetrics(SM_CYHSCROLL);
! }
! }
!
! void osSetProgressBarFraction(WindowHandle bar, int minPos, int maxPos, int pos)
! {
! SendMessage(bar, PBM_SETRANGE32, minPos, maxPos);
! SendMessage(bar, PBM_SETPOS, pos, 0);
! }
!
! int osGetProgressBarFraction(WindowHandle bar, int minPos, int maxPos)
! {
! return SendMessage(bar, PBM_GETPOS, 0, 0);
! }
!
Index: RadioBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/RadioBox.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** RadioBox.c 26 Aug 2003 20:00:55 -0000 1.9
--- RadioBox.c 8 Oct 2003 22:21:57 -0000 1.10
***************
*** 10,14 ****
"BUTTON",
NULL,
! WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | WS_TABSTOP,
0,0,0,0,
window,
--- 10,14 ----
"BUTTON",
NULL,
! WS_CHILD | BS_AUTORADIOBUTTON | WS_TABSTOP,
0,0,0,0,
window,
Index: Slider.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Slider.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Slider.c 2 Jul 2003 20:11:16 -0000 1.2
--- Slider.c 8 Oct 2003 22:21:57 -0000 1.3
***************
*** 1,73 ****
! #include "Slider.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateHorzSlider(WindowHandle form)
! {
! HWND hSlider;
!
! hSlider = CreateWindow(
! TRACKBAR_CLASS,
! NULL,
! TBS_AUTOTICKS | TBS_HORZ | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hSlider, TRACKBAR_CLASS);
! };
!
! WindowHandle osCreateVertSlider(WindowHandle form)
! {
! HWND hSlider;
!
! hSlider = CreateWindow(
! TRACKBAR_CLASS,
! NULL,
! TBS_AUTOTICKS | TBS_VERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hSlider, TRACKBAR_CLASS);
! };
!
! void osGetSliderReqSize(WindowHandle slider, int *res)
! {
! if (GetWindowLong(slider,GWL_STYLE) & TBS_HORZ)
! {
! res[0] = 32;
! res[1] = GetSystemMetrics(SM_CYHSCROLL);
! }
! else
! {
! res[0] = GetSystemMetrics(SM_CXVSCROLL);
! res[1] = 32;
! }
! }
!
! void osSetSliderRange(WindowHandle slider, int minPos, int maxPos)
! {
! SendMessage(slider, TBM_SETRANGEMAX, FALSE, maxPos);
! SendMessage(slider, TBM_SETRANGEMIN, TRUE, minPos);
! }
!
! void osGetSliderRange(WindowHandle slider, int *minPos, int *maxPos)
! {
! *maxPos = SendMessage(slider, TBM_GETRANGEMAX, 0, 0);
! *minPos = SendMessage(slider, TBM_GETRANGEMIN, 0, 0);
! }
!
! int osGetSliderPosition(WindowHandle slider)
! {
! return SendMessage(slider, TBM_GETPOS, 0, 0);
! }
!
! void osSetSliderPosition(WindowHandle slider, int pos)
! {
! SendMessage(slider, TBM_SETPOS, TRUE, pos);
! }
--- 1,73 ----
! #include "Slider.h"
! #include "Internals.h"
! #include "Handlers_stub.h"
!
! WindowHandle osCreateHorzSlider(WindowHandle form)
! {
! HWND hSlider;
!
! hSlider = CreateWindow(
! TRACKBAR_CLASS,
! NULL,
! TBS_AUTOTICKS | TBS_HORZ | WS_CHILD | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hSlider, TRACKBAR_CLASS);
! };
!
! WindowHandle osCreateVertSlider(WindowHandle form)
! {
! HWND hSlider;
!
! hSlider = CreateWindow(
! TRACKBAR_CLASS,
! NULL,
! TBS_AUTOTICKS | TBS_VERT | WS_CHILD | WS_TABSTOP,
! 0,0,0,0,
! form,
! NULL,
! ghModule,
! NULL
! );
! return checkWindow(hSlider, TRACKBAR_CLASS);
! };
!
! void osGetSliderReqSize(WindowHandle slider, int *res)
! {
! if (GetWindowLong(slider,GWL_STYLE) & TBS_HORZ)
! {
! res[0] = 32;
! res[1] = GetSystemMetrics(SM_CYHSCROLL);
! }
! else
! {
! res[0] = GetSystemMetrics(SM_CXVSCROLL);
! res[1] = 32;
! }
! }
!
! void osSetSliderRange(WindowHandle slider, int minPos, int maxPos)
! {
! SendMessage(slider, TBM_SETRANGEMAX, FALSE, maxPos);
! SendMessage(slider, TBM_SETRANGEMIN, TRUE, minPos);
! }
!
! void osGetSliderRange(WindowHandle slider, int *minPos, int *maxPos)
! {
! *maxPos = SendMessage(slider, TBM_GETRANGEMAX, 0, 0);
! *minPos = SendMessage(slider, TBM_GETRANGEMIN, 0, 0);
! }
!
! int osGetSliderPosition(WindowHandle slider)
! {
! return SendMessage(slider, TBM_GETPOS, 0, 0);
! }
!
! void osSetSliderPosition(WindowHandle slider, int pos)
! {
! SendMessage(slider, TBM_SETPOS, TRUE, pos);
! }
|