From: <mie...@us...> - 2007-08-24 16:43:57
|
Revision: 698 http://oorexx.svn.sourceforge.net/oorexx/?rev=698&view=rev Author: miesfeld Date: 2007-08-24 09:43:59 -0700 (Fri, 24 Aug 2007) Log Message: ----------- Back out incorrect commit (697) Modified Paths: -------------- interpreter-3.x/trunk/platform/windows/oodialog/advctrl.cls interpreter-3.x/trunk/platform/windows/oodialog/dyndlg.cls interpreter-3.x/trunk/platform/windows/oodialog/oovdraw.c interpreter-3.x/trunk/platform/windows/oodialog/oovmsg.c interpreter-3.x/trunk/platform/windows/oodialog/oovother.c interpreter-3.x/trunk/platform/windows/oodialog/oovtext.c interpreter-3.x/trunk/platform/windows/oodialog/oovuser.c interpreter-3.x/trunk/platform/windows/oodialog/oovutil.c interpreter-3.x/trunk/platform/windows/oodialog/oovutil.def interpreter-3.x/trunk/platform/windows/oodialog/oovutil.h Modified: interpreter-3.x/trunk/platform/windows/oodialog/advctrl.cls =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/advctrl.cls 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/advctrl.cls 2007-08-24 16:43:59 UTC (rev 698) @@ -1511,7 +1511,7 @@ else return "" ::Method FirstVisibleLine - return self~Message2Parent(0x00CE, 0, 0) + 1 + return self~Message2Parent(0x00CE, 0, 0) ::Method SetReadOnly use arg bool Modified: interpreter-3.x/trunk/platform/windows/oodialog/dyndlg.cls =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/dyndlg.cls 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/dyndlg.cls 2007-08-24 16:43:59 UTC (rev 698) @@ -191,11 +191,10 @@ if style~wordpos("BS_LEFTTEXT") > 0 then ret = ret || " LEFTTEXT" if style~wordpos("BS_BITMAP") > 0 then ret = ret || " BITMAP" if style~wordpos("BS_ICON") > 0 then ret = ret || " BITMAP" - if style~wordpos("WS_BORDER") > 0 then ret = ret || " BORDER" - if style~wordpos("NOT WS_TABSTOP") > 0 then ret = ret || " NOTAB" - if spec_kind == "R" then do /* radio buttons need explicit WS_TABSTOP to be tab stops */ - if style~wordpos("WS_TABSTOP") = 0 then ret = ret || " NOTAB" + if spec_kind \= "R" then do /* not a radio button */ + if style~wordpos("NOT WS_TABSTOP") > 0 then ret = ret || " NOTAB" end + else if style~wordpos("WS_TABSTOP") = 0 then ret = ret || " NOTAB" end else if kind = "EDIT" then do if style~wordpos("ES_AUTOHSCROLL") > 0 then ret = ret || " AUTOSCROLLH" @@ -235,17 +234,15 @@ end else if kind = "ST" then do if style~wordpos("WS_BORDER") > 0 then ret = ret || " BORDER" - if style~wordpos("WS_TABSTOP") > 0 then ret = ret || " TAB" end else if kind = "SB" then do if style~wordpos("SBS_HORZ") > 0 then ret = ret || " HORIZONTAL" if style~wordpos("SBS_TOPALIGN") > 0 then ret = ret || " TOPLEFT" if style~wordpos("SBS_BOTTOMALIGN") > 0 then ret = ret || " BOTTOMRIGHT" if style~wordpos("WS_TABSTOP") > 0 then ret = ret || " TAB" - if style~wordpos("WS_BORDER") > 0 then ret = ret || " BORDER" end - if kind = "EDIT" | kind = "LB" | kind = "CB" then + if kind = "EDIT" | kind = "LB" then if style~wordpos("NOT WS_BORDER") > 0 then ret = ret || " NOBORDER" if kind = "EDIT" | kind = "CB" | kind = "LB" | kind = "DLG" then do if style~wordpos("WS_VSCROLL") > 0 then ret = ret || " VSCROLL" Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovdraw.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovdraw.c 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovdraw.c 2007-08-24 16:43:59 UTC (rev 698) @@ -216,7 +216,6 @@ else RETC(1) } - RETERR } @@ -263,11 +262,7 @@ else if (argv[0].strptr[0] == 'D') /* delete a graphic object (pen, brush, font) */ { - int ret; - - ret = DeleteObject((HGDIOBJ)atol(argv[1].strptr)); - /*if ( ret == 0 )*/ printf("DeleteObject ret: %d last err: %d\n", ret, GetLastError()); - RETC(!ret) + RETC(!DeleteObject((HGDIOBJ)atol(argv[1].strptr))) } else if (argv[0].strptr[0] == 'P') /* Create a pen */ @@ -332,8 +327,6 @@ } else if (argc == 2) /* color brush */ hB = CreateSolidBrush(PALETTEINDEX(atoi(argv[1].strptr))); - // hB = GetSysColorBrush(COLOR_BTNFACE); DFX TODO add createSystemBrush - // to ooDialog. else hB = (HBRUSH)GetStockObject(HOLLOW_BRUSH); RETVAL((ULONG)hB) @@ -584,8 +577,6 @@ dlgAdm->ColorTab[dlgAdm->CT_size].ColorBk = atoi(argv[3].strptr); if (argc == 5) dlgAdm->ColorTab[i].ColorFG = atoi(argv[4].strptr); else dlgAdm->ColorTab[i].ColorFG = -1; dlgAdm->ColorTab[dlgAdm->CT_size].ColorBrush = (HBRUSH)CreateSolidBrush(PALETTEINDEX(dlgAdm->ColorTab[dlgAdm->CT_size].ColorBk)); - //dlgAdm->ColorTab[dlgAdm->CT_size].ColorBrush = (HBRUSH)GetSysColorBrush(dlgAdm->ColorTab[dlgAdm->CT_size].ColorBk); - // DFX TODO add method for setting colore to system color. dlgAdm->CT_size++; } } Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovmsg.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovmsg.c 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovmsg.c 2007-08-24 16:43:59 UTC (rev 698) @@ -52,7 +52,6 @@ extern CRITICAL_SECTION crit_sec; /* defined in OOVUTIL.C */ extern BOOL DialogInAdminTable(DIALOGADMIN * Dlg); -extern BOOL AddDialogMessage(CHAR *, CHAR *); BOOL AddDialogMessage(CHAR * msg, CHAR * Qptr) @@ -131,9 +130,6 @@ && ( ((message == WM_NOTIFY) && ((ULONG)(((NMHDR *)lparam)->code & m[i].filterL) == m[i].lParam)) || ((message != WM_NOTIFY) && ( (ULONG)(lparam & m[i].filterL) == m[i].lParam)) ) ) { - //if ( message == WM_COMMAND ) printf("WM_COMMAND: wparam: %u lparam: %u lparam low: 0x%08x hi: 0x%08x\n", - // param, lparam, (int)(short)LOWORD(lparam), (int)(short)HIWORD(lparam)); - if (param || lparam) /* if one of the params is <> 0, build argument string */ { char msgstr[512]; Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovother.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovother.c 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovother.c 2007-08-24 16:43:59 UTC (rev 698) @@ -55,7 +55,6 @@ WORD NumDIBColorEntries(LPBITMAPINFO lpBmpInfo); extern LPBITMAPINFO LoadDIB(LPSTR szFile); extern LONG EvaluateListStyle(CHAR * styledesc); -extern BOOL AddDialogMessage(CHAR *, CHAR *); /* Local functions */ static LONG SetStyle(HWND, LONG); @@ -955,69 +954,6 @@ return 0; } -/* - * Initialize lfHeight to 10 times the desired point size. Pass a HDC to use - * to convert to logical units, or NULL to use a screen DC. -*/ -HFONT CreatePointFontIndirect(const LOGFONT *pLF, HDC hDC) -{ - LOGFONT lf = *pLF; - POINT pt, ptOrg = {0,0}; - BOOL bScreenDC = (hDC == NULL); - - if (bScreenDC) - hDC = GetDC(NULL); /* Get screen DC */ - - pt.y = MulDiv(lf.lfHeight, GetDeviceCaps(hDC, LOGPIXELSY), 720); - DPtoLP(hDC, &pt, 1); - DPtoLP(hDC, &ptOrg, 1); - lf.lfHeight = -abs(pt.y - ptOrg.y); - - if (bScreenDC) - ReleaseDC(NULL, hDC); - - return CreateFontIndirect(&lf); -} - -LRESULT CALLBACK EditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, - LPARAM lParam, UINT_PTR id, DWORD_PTR dwData) -{ - SUBCLASSDATA * pData = (SUBCLASSDATA *)dwData; - - switch ( msg ) - { - case WM_GETDLGCODE: - // Don't do anything for now. - break; - - case WM_KEYDOWN: - { - CHAR oodMsg[256]; - LRESULT ret = DefSubclassProc(hwnd, msg, wParam, lParam); - - //printf("Key down id: %u dwData: %p method: %s q: %p keyCode: %d\n", - // id, pData, pData->pNotifyMethod, pData->pMessageQueue, wParam); - - sprintf(oodMsg, "%s(%u,%u)", pData->pNotifyMethod, wParam, lParam); - AddDialogMessage((char *)oodMsg, pData->pMessageQueue); - return ret; - } - - case WM_NCDESTROY: - if ( pData ) - { - LocalFree(pData->pNotifyMethod); - LocalFree(pData); - } - RemoveWindowSubclass(hwnd, EditSubclassProc, id); - break; - - } - return DefSubclassProc(hwnd, msg, wParam, lParam); -} - - - /** * Extended Common Control functionality. This function implements capabilities * for the common controls that were not available at the time of the original @@ -1236,99 +1172,7 @@ } else RETERR } - else if ( argv[2].strptr[0] == 'S' ) /* Subclass control */ - { - SUBCLASSDATA * pData; - DIALOGADMIN * dlgAdm = (DIALOGADMIN *)atol(argv[3].strptr); - if ( ! dlgAdm ) RETVAL(-3) - if ( argc < 5 ) RETVAL(-3) - - pData = LocalAlloc(LPTR, sizeof(SUBCLASSDATA)); - if ( ! pData ) RETVAL(-4) - - pData->pNotifyMethod = LocalAlloc(LMEM_FIXED, argv[4].strlength + 1); - if ( ! pData->pNotifyMethod ) RETVAL(-4) - - rxstrlcpy(pData->pNotifyMethod, argv[4]); - pData->hCtrl = hCtrl; - pData->uID = id; - pData->pMessageQueue = dlgAdm->pMessageQueue; - - RETVAL(! SendMessage(hDlg, WM_USER_SUBCLASS, (WPARAM)&EditSubclassProc, (LPARAM)pData)) - } - else if ( argv[2].strptr[0] == 'F' ) /* Font */ - { - LOGFONT lf; - long lRet = 0; - HFONT hFont; - int ptSize; - //HDC hdc = GetWindowDC(hCtrl); - HDC hdc = GetDC(NULL); - static int ctr = 0; - - CHECKARG(5) - - if ( ctr == 0 ) - { - ctr++; - SetLastError(0); - } - ptSize = atol(argv[4].strptr); - strcpy(lf.lfFaceName, argv[3].strptr); - - //hFont = CreatePointFontIndirect(&lf, hdc); - - lf.lfHeight = -MulDiv(ptSize, GetDeviceCaps(hdc, LOGPIXELSY), 72); - ReleaseDC(NULL, hdc); - lf.lfHeight = abs(lf.lfHeight); - hFont = CreateFontIndirect(&lf); - - //lRet = SendMessage(hCtrl, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE); - lRet = SendMessage(hCtrl, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE); - printf("Font size: %d name: %s hFont: %u ret: %d last: %u\n", - lf.lfHeight, lf.lfFaceName, hFont, lRet, GetLastError()); - - ultoa((ULONG)hFont, retstr->strptr, 10); - retstr->strlength = strlen(retstr->strptr); - return 0; - } - else if ( argv[2].strptr[0] == 'M' ) /* MapDialogRect */ - { - RECT pixel; - RECT dtu; - double factorX, factorX2, factorY, factorY2; - - CHECKARG(7) - - pixel.left = atol(argv[3].strptr); - pixel.top = atol(argv[4].strptr); - pixel.right = atol(argv[5].strptr); - pixel.bottom = atol(argv[6].strptr); - - dtu.left = pixel.left; - dtu.top = pixel.top; - dtu.right = pixel.right; - dtu.bottom = pixel.bottom; - - if ( MapDialogRect(hDlg, &pixel) ) - { - factorX = (float)pixel.left / (float)dtu.left; - factorY = (float)pixel.top / (float)dtu.top; - factorX2 = (float)pixel.right / (float)dtu.right; - factorY2 = (float)pixel.bottom / (float)dtu.bottom; - - sprintf(retstr->strptr, "%d %d %d %d %5.3f %5.3f lower right %5.3f %5.3f", - pixel.left, pixel.top, pixel.right, pixel.bottom, factorX, factorY, factorX2, factorY2); - retstr->strlength = strlen(retstr->strptr); - return 0; - } - else - { - RETVAL(GetLastError()) - } - } - RETERR } @@ -1631,12 +1475,11 @@ { ULONG flag; LONG startItem; - INT i; CHECKARG(5); startItem = atol(argv[3].strptr); - printf("List control get next start: %d arg4: %s\n", startItem, argv[4].strptr); + if (!strcmp(argv[4].strptr, "FIRSTVISIBLE")) RETVAL(ListView_GetTopIndex(h)) @@ -1652,12 +1495,7 @@ else if (strstr(argv[4].strptr,"FOCUSED")) flag |= LVNI_FOCUSED; else if (strstr(argv[4].strptr,"SELECTED")) flag |= LVNI_SELECTED; - //flag = LVNI_ALL; - i = ListView_GetNextItem(h, startItem, flag); - printf("Got back: %d\n", i); - - RETVAL(i) - //RETVAL(ListView_GetNextItem(h, startItem, flag)) + RETVAL(ListView_GetNextItem(h, startItem, flag)) } else if (!strcmp(argv[1].strptr, "SETIMG")) Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovtext.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovtext.c 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovtext.c 2007-08-24 16:43:59 UTC (rev 698) @@ -201,21 +201,16 @@ (BOOL)strstr(opts, "STRIKEOUT"), DEFAULT_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DRAFT_QUALITY, FF_DONTCARE, argv[3].strptr); oldF = SelectObject(hDC, hFont); - if (dlgAdm) - //if (dlgAdm && dlgAdm->Use3DControls) + if (dlgAdm && dlgAdm->Use3DControls) { - printf("Using COLOR_BTNFACE pen\n"); hpen = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_BTNFACE)); hbr = CreateSolidBrush(GetSysColor(COLOR_BTNFACE)); SetBkColor(hDC, GetSysColor(COLOR_BTNFACE)); oP = SelectObject(hDC, hpen); oB = SelectObject(hDC, hbr); - } else { - printf("Using WHITE_PEN pen\n"); + } else oP = SelectObject(hDC, GetStockObject(WHITE_PEN)); - } - if (col > 0) SetTextColor(hDC, PALETTEINDEX(col)); sl = strlen(text); rc = GetTextExtentPoint32(hDC, text, sl, &s); @@ -310,8 +305,7 @@ SelectObject(hDC, oldF); SelectObject(hDC, oP); - if (dlgAdm) - //if (dlgAdm->Use3DControls) + if (dlgAdm->Use3DControls) { SelectObject(hDC, oB); DeleteObject(hpen); Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovuser.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovuser.c 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovuser.c 2007-08-24 16:43:59 UTC (rev 698) @@ -197,52 +197,12 @@ } -ULONG APIENTRY GetSysMetrics( - PUCHAR funcname, - ULONG argc, - RXSTRING argv[], - PUCHAR qname, - PRXSTRING retstr ) +void UCreateDlg(WORD ** template, WORD **p, INT NrItems, INT x, INT y, INT cx, INT cy, + CHAR * class, CHAR * title, CHAR * fontname, INT fontsize, ULONG lStyle) { - ULONG uVal; - - if ( argc == 1 ) - { - uVal = GetSystemMetrics(atoi(argv[0].strptr)); - - sprintf(retstr->strptr, "%d", uVal); - retstr->strlength = strlen(retstr->strptr); - } - else - { - PSZ token; - PSZ str; - - if ( argv[0].strlength == 0 ) RETVAL(-3) - - str = _strdup(argv[0].strptr); - printf("Starting string: %s\n", str); - - token = strtok(str, " "); - while( token != NULL ) - { - printf(" %s\n", token); - token = strtok(NULL, " "); - } - free(str); - RETVAL(0); - } - - return 0; -} - - -void UCreateDlg(WORD ** ppTemplate, WORD **p, INT NrItems, INT x, INT y, INT cx, INT cy, - CHAR * dlgClass, CHAR * title, CHAR * fontname, INT fontsize, ULONG lStyle) -{ int nchar; - *ppTemplate = *p = (PWORD) LocalAlloc(LPTR, (NrItems+3)*256); + *template = *p = (PWORD) LocalAlloc(LPTR, (NrItems+3)*256); /* start to fill in the dlgtemplate information. addressing by WORDs */ **p = LOWORD (lStyle); @@ -270,9 +230,9 @@ (*p)++; /* copy the class of the dialog */ - if ( !(lStyle & WS_CHILD) && (dlgClass)) + if ( !(lStyle & WS_CHILD) && (class)) { - nchar = nCopyAnsiToWideChar (*p, TEXT(dlgClass)); + nchar = nCopyAnsiToWideChar (*p, TEXT(class)); (*p) += nchar; } else @@ -643,7 +603,7 @@ if (!strcmp(argv[0].strptr,"BUT") || !strcmp(argv[0].strptr,"CH") || !strcmp(argv[0].strptr,"RB")) { CHECKARG(9); - printf("UsrAddControl button: %s styles: %s\n", argv[0].strptr, argv[8].strptr); + for (i=0;i<6;i++) buffer[i] = atoi(argv[i+1].strptr); p = (WORD *)buffer[0]; @@ -658,11 +618,11 @@ if (strstr(argv[8].strptr,"NOTIFY")) lStyle |= BS_NOTIFY; if (strstr(argv[8].strptr,"LEFTTEXT")) lStyle |= BS_LEFTTEXT; if (strstr(argv[8].strptr,"BITMAP")) lStyle |= BS_BITMAP; - if (!strstr(argv[8].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; - if (strstr(argv[8].strptr,"GROUP")) lStyle |= WS_GROUP; - if (strstr(argv[8].strptr,"DISABLED")) lStyle |= WS_DISABLED; if (strstr(argv[8].strptr,"BORDER")) lStyle |= WS_BORDER; + if (strstr(argv[8].strptr,"DISABLED")) lStyle |= WS_DISABLED; + if (!strstr(argv[8].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; if (!strstr(argv[8].strptr,"NOTAB")) lStyle |= WS_TABSTOP; + if (strstr(argv[8].strptr,"GROUP")) lStyle |= WS_GROUP; /* id x y cx cy */ UAddControl(&p, 0x0080, buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], argv[7].strptr, lStyle); @@ -690,6 +650,7 @@ if (strstr(argv[7].strptr,"VSCROLL")) lStyle |= WS_VSCROLL; if (strstr(argv[7].strptr,"READONLY")) lStyle |= ES_READONLY; if (strstr(argv[7].strptr,"KEEPSELECTION")) lStyle |= ES_NOHIDESEL; + if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; if (strstr(argv[7].strptr,"CENTER")) lStyle |= ES_CENTER; else if (strstr(argv[7].strptr,"RIGHT")) lStyle |= ES_RIGHT; else lStyle |= ES_LEFT; @@ -698,10 +659,9 @@ if (strstr(argv[7].strptr,"NUMBER")) lStyle |= ES_NUMBER; if (strstr(argv[7].strptr,"OEM")) lStyle |= ES_OEMCONVERT; if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; - if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; - if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; if (!strstr(argv[7].strptr,"NOBORDER")) lStyle |= WS_BORDER; if (!strstr(argv[7].strptr,"NOTAB")) lStyle |= WS_TABSTOP; + if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; /* id x y cx cy */ UAddControl(&p, 0x0081, buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], NULL, lStyle); @@ -720,18 +680,17 @@ else i = -1; lStyle = WS_CHILD; + if (!strstr(argv[6].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; + if (strstr(argv[6].strptr,"BORDER")) lStyle |= WS_BORDER; + if (strstr(argv[6].strptr,"GROUP")) lStyle |= WS_GROUP; + if (strstr(argv[6].strptr,"DISABLED")) lStyle |= WS_DISABLED; + if (strstr(argv[6].strptr,"CENTER")) lStyle |= SS_CENTER; else if (strstr(argv[6].strptr,"RIGHT")) lStyle |= SS_RIGHT; else if (strstr(argv[6].strptr,"SIMPLE")) lStyle |= SS_SIMPLE; else if (strstr(argv[6].strptr,"LEFTNOWRAP")) lStyle |= SS_LEFTNOWORDWRAP; else lStyle |= SS_LEFT; - if (!strstr(argv[6].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; - if (strstr(argv[6].strptr,"GROUP")) lStyle |= WS_GROUP; - if (strstr(argv[6].strptr,"DISABLED")) lStyle |= WS_DISABLED; - if (strstr(argv[6].strptr,"BORDER")) lStyle |= WS_BORDER; - if (strstr(argv[6].strptr,"TAB")) lStyle |= WS_TABSTOP; - /* id x y cx cy */ UAddControl(&p, 0x0082, i, buffer[1], buffer[2], buffer[3], buffer[4], argv[7].strptr, lStyle); } @@ -745,6 +704,7 @@ p = (WORD *)buffer[0]; lStyle = WS_CHILD; + if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; if (strstr(argv[7].strptr,"COLUMNS")) lStyle |= LBS_USETABSTOPS; if (strstr(argv[7].strptr,"VSCROLL")) lStyle |= WS_VSCROLL; if (strstr(argv[7].strptr,"HSCROLL")) lStyle |= WS_HSCROLL; @@ -756,11 +716,10 @@ if (strstr(argv[7].strptr,"SBALWAYS")) lStyle |= LBS_DISABLENOSCROLL; if (strstr(argv[7].strptr,"KEYINPUT")) lStyle |= LBS_WANTKEYBOARDINPUT; if (strstr(argv[7].strptr,"EXTSEL")) lStyle |= LBS_EXTENDEDSEL; - if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; - if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; - if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; if (!strstr(argv[7].strptr,"NOBORDER")) lStyle |= WS_BORDER; if (!strstr(argv[7].strptr,"NOTAB")) lStyle |= WS_TABSTOP; + if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; + if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; /* id x y cx cy */ UAddControl(&p, 0x0083, buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], NULL, lStyle); @@ -776,18 +735,18 @@ lStyle = WS_CHILD; + if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; if (!strstr(argv[7].strptr,"NOHSCROLL")) lStyle |= CBS_AUTOHSCROLL; if (strstr(argv[7].strptr,"VSCROLL")) lStyle |= WS_VSCROLL; if (strstr(argv[7].strptr,"SORT")) lStyle |= CBS_SORT; if (strstr(argv[7].strptr,"SIMPLE")) lStyle |= CBS_SIMPLE; else if (strstr(argv[7].strptr,"LIST")) lStyle |= CBS_DROPDOWNLIST; else lStyle |= CBS_DROPDOWN; - if (strstr(argv[7].strptr,"PARTIAL")) lStyle |= CBS_NOINTEGRALHEIGHT; - if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; - if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; - if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; if (!strstr(argv[7].strptr,"NOBORDER")) lStyle |= WS_BORDER; if (!strstr(argv[7].strptr,"NOTAB")) lStyle |= WS_TABSTOP; + if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; + if (strstr(argv[7].strptr,"PARTIAL")) lStyle |= CBS_NOINTEGRALHEIGHT; + if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; /* id x y cx cy */ UAddControl(&p, 0x0085, buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], NULL, lStyle); @@ -807,10 +766,9 @@ lStyle = WS_CHILD | BS_GROUPBOX; if (!strstr(argv[6].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; + if (strstr(argv[6].strptr,"BORDER")) lStyle |= WS_BORDER; if (strstr(argv[6].strptr,"GROUP")) lStyle |= WS_GROUP; if (strstr(argv[6].strptr,"DISABLED")) lStyle |= WS_DISABLED; - if (strstr(argv[6].strptr,"BORDER")) lStyle |= WS_BORDER; - if (strstr(argv[6].strptr,"TAB")) lStyle |= WS_TABSTOP; /* id x y cx cy */ UAddControl(&p, 0x0080, i, buffer[1], buffer[2], buffer[3], buffer[4], argv[7].strptr, lStyle); @@ -837,10 +795,9 @@ if (buffer[6] == 4) lStyle |= SS_GRAYFRAME; else lStyle |= SS_BLACKFRAME; if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; + if (strstr(argv[7].strptr,"BORDER")) lStyle |= WS_BORDER; if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; - if (strstr(argv[7].strptr,"BORDER")) lStyle |= WS_BORDER; - if (strstr(argv[7].strptr,"TAB")) lStyle |= WS_TABSTOP; /* id x y cx cy */ UAddControl(&p, 0x0082, i, buffer[1], buffer[2], buffer[3], buffer[4], NULL, lStyle); @@ -855,14 +812,13 @@ p = (WORD *)buffer[0]; lStyle = WS_CHILD; + if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; if (strstr(argv[7].strptr,"HORIZONTAL")) lStyle |= SBS_HORZ; else lStyle |= SBS_VERT; if (strstr(argv[7].strptr,"TOPLEFT")) lStyle |= SBS_TOPALIGN; if (strstr(argv[7].strptr,"BOTTOMRIGHT")) lStyle |= SBS_BOTTOMALIGN; - if (!strstr(argv[7].strptr,"HIDDEN")) lStyle |= WS_VISIBLE; + if (strstr(argv[7].strptr,"TAB")) lStyle |= WS_TABSTOP; if (strstr(argv[7].strptr,"GROUP")) lStyle |= WS_GROUP; if (strstr(argv[7].strptr,"DISABLED")) lStyle |= WS_DISABLED; - if (strstr(argv[7].strptr,"BORDER")) lStyle |= WS_BORDER; - if (strstr(argv[7].strptr,"TAB")) lStyle |= WS_TABSTOP; /* id x y cx cy */ UAddControl(&p, 0x0084, buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], NULL, lStyle); @@ -881,9 +837,9 @@ LONG lStyle = 0; if (!strstr(styledesc,"NOBORDER")) lStyle |= WS_BORDER; - if (!strstr(styledesc,"NOTAB")) lStyle |= WS_TABSTOP; if (strstr(styledesc,"VSCROLL")) lStyle |= WS_VSCROLL; if (strstr(styledesc,"HSCROLL")) lStyle |= WS_HSCROLL; + if (!strstr(styledesc,"NOTAB")) lStyle |= WS_TABSTOP; if (strstr(styledesc,"EDIT")) lStyle |= LVS_EDITLABELS; if (strstr(styledesc,"SHOWSELALWAYS")) lStyle |= LVS_SHOWSELALWAYS; if (strstr(styledesc,"ALIGNLEFT")) lStyle |= LVS_ALIGNLEFT; @@ -1033,9 +989,8 @@ else if (!strcmp(argv[0].strptr,"PROGRESS")) { - if (strstr(argv[7].strptr,"BORDER")) lStyle |= WS_BORDER; - if (strstr(argv[7].strptr,"TAB")) lStyle |= WS_TABSTOP; if (strstr(argv[7].strptr,"VERTICAL")) lStyle |= PBS_VERTICAL; + if (strstr(argv[7].strptr,"BORDER")) lStyle |= WS_BORDER; if (strstr(argv[7].strptr,"SMOOTH")) lStyle |= PBS_SMOOTH; /* id x y cx cy */ UAddNamedControl(&p, PROGRESS_CLASS, buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], NULL, lStyle); @@ -1190,7 +1145,7 @@ PRXSTRING retstr ) { INT i; - WORD *p, *pTemplate; + WORD *p, *template; HANDLE hMem; CHECKARGL(1); @@ -1204,7 +1159,7 @@ hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, (i+1)*128); - pTemplate = p = (PWORD) GlobalLock(hMem); + template = p = (PWORD) GlobalLock(hMem); if (!p) RETC(1) /* writing menu header */ @@ -1227,7 +1182,7 @@ p++; #endif - sprintf(retstr->strptr, "%ld %ld %ld", hMem, pTemplate, p); + sprintf(retstr->strptr, "%ld %ld %ld", hMem, template, p); retstr->strlength = strlen(retstr->strptr); return 0; } Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovutil.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovutil.c 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovutil.c 2007-08-24 16:43:59 UTC (rev 698) @@ -35,10 +35,6 @@ /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* */ /*----------------------------------------------------------------------------*/ -#define NTDDI_VERSION NTDDI_WINXPSP2 -#define _WIN32_WINNT 0x0501 -#define WINVER 0x0501 - #include <windows.h> #include <mmsystem.h> #include <shlwapi.h> @@ -234,19 +230,6 @@ case WM_USER_GETKEYSTATE: ReplyMessage((LRESULT)GetAsyncKeyState(wParam)); return (TRUE); - - case WM_USER_SUBCLASS: - { - SUBCLASSDATA * pData = (SUBCLASSDATA *)lParam; - SUBCLASSPROC pfnSubclass = (SUBCLASSPROC) wParam; - BOOL success; - - if ( pData ) - { - success = SetWindowSubclass(pData->hCtrl, pfnSubclass, pData->uID, (DWORD_PTR)pData); - ReplyMessage((LRESULT)success); - } - } return (TRUE); } } } @@ -1246,7 +1229,7 @@ "HandleScrollBar" \ }; -#define SFTS 20 +#define SFTS 19 CHAR * SpecialFuncTab[SFTS] = {\ "BmpButton", \ "DCDraw", \ @@ -1263,7 +1246,6 @@ "HandleListCtrlEx", \ "HandleControlEx", \ "HandleOtherNewCtrls", \ - "GetSysMetrics", \ "DialogMenu", \ "WinTimer", \ "HandleFont", \ @@ -1375,7 +1357,7 @@ INITCOMMONCONTROLSEX ctrlex; ctrlex.dwSize = sizeof(ctrlex); - ctrlex.dwICC = ICC_WIN95_CLASSES | ICC_STANDARD_CLASSES; + ctrlex.dwICC = ICC_WIN95_CLASSES; if ( ! InitCommonControlsEx(&ctrlex) ) { CHAR msg[128]; Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovutil.def =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovutil.def 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovutil.def 2007-08-24 16:43:59 UTC (rev 698) @@ -94,7 +94,6 @@ GETSCREENSIZE = GetScreenSize GETDIALOGFACTOR = GetDialogFactor GETSTDTEXTSIZE = GetStdTextSize - GETSYSMETRICS = GetSysMetrics INSTMMFUNCS = InstMMFuncs REMOVEMMFUNCS = RemoveMMFuncs Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovutil.h =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovutil.h 2007-08-24 16:38:51 UTC (rev 697) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovutil.h 2007-08-24 16:43:59 UTC (rev 698) @@ -61,23 +61,7 @@ #define WM_USER_GETFOCUS WM_USER + 0x0603 #define WM_USER_GETSETCAPTURE WM_USER + 0x0604 #define WM_USER_GETKEYSTATE WM_USER + 0x0605 -#define WM_USER_SUBCLASS WM_USER + 0x0606 - -typedef struct { - ULONG msg; - ULONG filterM; - ULONG wParam; - ULONG filterP; - ULONG lParam; - ULONG filterL; - ULONG tag; - HWND hCtrl; - UINT uID; - PCHAR pMessageQueue; - PCHAR pNotifyMethod; -} SUBCLASSDATA; - #define VISDLL "OODIALOG.DLL" #define DLLVER 2130 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |