Question : ScrollText In DialgBox? - Delphi

Hello Experts,
I have a DialogBox and i am trying to add ScrollText on the form but its not moving if i not move the mouse, i want it to move all the time, even if the user did not give any msg,
here is a sample code:


Ressource1.rc:
1:
2:
3:
4:
5:
6:
7:
8:
PROGRAM1 DIALOGEX 100, 100, 198, 87
STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "PROGRAM1"
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
FONT 10, "TAHOMA"
{
   CONTROL "", 1000, STATIC, SS_CENTER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP, 39, 6, 126, 11 
}


Project1.dpr
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
program Project1;

uses
  Windows
  Messages;

 {$R Res\Ressource1.res}
{function SetDlgItemText(hDlg: HWND; nIDDlgItem: Integer; lpString: PChar): BOOL; stdcall;
function DialogBox(hInstance: HINST; lpTemplate: PChar;
  hWndParent: HWND; lpDialogFunc: TFNDlgProc): Integer;
function DialogBoxParam(hInstance: HINST; lpTemplateName: PChar;
  hWndParent: HWND; lpDialogFunc: TFNDlgProc; dwInitParam: LPARAM): Integer; stdcall;}

{function DialogBoxParam; external user32 name 'DialogBoxParamA';
function MessageBoxA; external user32 name 'MessageBoxA';
function SetDlgItemText; external user32 name 'SetDlgItemTextA';
function EndDialog; external user32 name 'EndDialog';}

Function Dialog(HWnd, Msg, wParam, lParam: integer): integer; stdcall;
begin
  Result := 1;
  if wParam = sc_close Then EndDialog(HWnd, 1);
  Case Msg of
    WM_INITDIALOG: 
       begin


       end;

    WM_MOUSEMOVE: 
       Begin
            SetDlgItemText(HWND,1000 , PChar('Scrooling Text'));
       end;

    WM_LBUTTONDOWN: {On Mouse Left button click}
      Begin

      end;

    WM_DESTROY:
      begin
      end;

     Else Result := 0;
  End;
end;

begin
    DialogBox(0, 'PROGRAM1', 0, @Dialog);
end.


Any Help is Appreceated,

Regards.

Answer : ScrollText In DialgBox? - Delphi

My goof. I meant to use a Range variable as the input.
1:
2:
3:
4:
5:
Function ForecastValue(rgValues As Range) As Double
Dim n As Long
n = rgValues.Cells.Count
ForecastValue = Evaluate("TREND(" & rgValues.Address(external:=True) & ",," & (n + 1) & ")")(1)
End Function
Random Solutions  
 
programming4us programming4us