Jump to page: 1 2
Thread overview
How to include Win32 function
Jun 07, 2004
Anatoliy Shevelev
Jun 07, 2004
Walter
Jun 08, 2004
Anatoliy Shevelev
Jun 09, 2004
Stewart Gordon
Jun 09, 2004
Anatoliy Shevelev
Jun 10, 2004
Anatoliy Shevelev
Jun 11, 2004
Anatoliy Shevelev
Jun 11, 2004
Sean Kelly
Jun 12, 2004
Matthew
Jun 12, 2004
Sean Kelly
Jun 12, 2004
The Dr ... who?
Jun 12, 2004
Anatoliy Shevelev
Jun 22, 2004
J C Calvarese
June 07, 2004
How to include into progect the Win32 function:

ShowWindow()
MoveWindow()
GetWindowLong()
SetWindowText()
SendMessage()
EnumChildWindows()


Anatoliy Shevelev
http://esk.lgg.ru



June 07, 2004
import std.c.windows.windows;

"Anatoliy Shevelev" <ixbase@insyg.kiev.ua> wrote in message news:ca2hp6$11su$1@digitaldaemon.com...
> How to include into progect the Win32 function:
>
> ShowWindow()
> MoveWindow()
> GetWindowLong()
> SetWindowText()
> SendMessage()
> EnumChildWindows()
>
>
> Anatoliy Shevelev
> http://esk.lgg.ru
>
>
>


June 08, 2004
I'm use thise command at my project but  not all function work properly

"Walter" <newshound@digitalmars.com> wrote in message news:ca2lfa$17r5$2@digitaldaemon.com...
> import std.c.windows.windows;
>
> "Anatoliy Shevelev" <ixbase@insyg.kiev.ua> wrote in message news:ca2hp6$11su$1@digitaldaemon.com...
> > How to include into progect the Win32 function:
> >
> > ShowWindow()
> > MoveWindow()
> > GetWindowLong()
> > SetWindowText()
> > SendMessage()
> > EnumChildWindows()
> >
> >
> > Anatoliy Shevelev
> > http://esk.lgg.ru
> >
> >
> >
>
>


June 09, 2004
Anatoliy Shevelev wrote:

> I'm use thise command at my project but  not all function work properly
<snip>

Well, with no information of what you're trying to do, or what they're doing instead of working, none of us can help you.

How about a code sample?

Stewart.

-- 
My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment.  Please keep replies on the 'group where everyone may benefit.
June 09, 2004
I'm understand, if function missing to including it's to the project as

but appear a new problem with function

??          EnumChildWindows(hWnd, myProc, (LPARAM) &rcClient);
error




C:\dmd\samples\d>\dmd\bin\shell ixb.sh
shell 1.00
\dmd\bin\dmd ixbase.d gdi32.lib
ixbase.d(25): function myProc (HANDLE hwndChild,int lParam) does not match
argument types ()

--- errorlevel 1


//----------------------------------------------------

import std.c.windows.windows;
import std.c.stdio;
import std.date;
export
{
 LRESULT SendMessage(HWND ,UINT ,WPARAM , LPARAM );
 BOOL SetWindowTextA(HWND hWnd,LPCSTR lpString);
}
//-----------------------------------------------------------
const int IDC_BTNCLICK = 101;
const int IDC_BTNDONTCLICK = 102;

HWND   hW,ghStatBar,hE,hFRM,hSTA,hCUR;
int    sock,hS=0,nCurEle=0,ixH=16;

extern(Windows)
int WindowProc(HWND hWnd, uint uMsg, WPARAM wParam, LPARAM lParam)
{
    switch (uMsg)
    {
 case WM_SIZE:
        {
          RECT rcClient;
          GetClientRect(hWnd, &rcClient);
??          EnumChildWindows(hWnd, myProc, (LPARAM) &rcClient);
        } break;
 case WM_KEYDOWN:
 {
         char [64] s;

          sprintf(s,"%3d",wParam);
          MaxRow();
         _X_STA("keyDown",s);
 } break;
 default:
  break;
 }
 return DefWindowProcA(hWnd, uMsg, wParam, lParam);
}
//--------------------------------------------------------

bool myProc(HWND hwndChild, LPARAM lParam)
{
    LPRECT rcParent;
    int i, idChild;

//    idChild = GetWindowLong(hwndChild, GWL_ID);
    rcParent = (LPRECT) lParam;

          if (idChild == 101){
//    MoveWindow(hwndChild,30,0,rcParent.right,16,TRUE);
    }else if (idChild == 102){
     i=0;
//     MoveWindow(hwndChild,0,40,rcParent->right,rcParent->bottom-56,TRUE);
    }else if (idChild == 1001){
//     MoveWindow(hwndChild,192,20,rcParent->right-340,16,TRUE);
    }else
        i = 2;
    ShowWindow(hwndChild, 1);
    return TRUE;
}


Anatoliy



June 09, 2004
"Anatoliy Shevelev" <ixbase@insyg.kiev.ua> escribió en el mensaje
news:ca7jdc$689$1@digitaldaemon.com
| I'm understand, if function missing to including it's to the project as
|
| but appear a new problem with function
|
| ??          EnumChildWindows(hWnd, myProc, (LPARAM) &rcClient);
| error
|
|
|
|
| C:\dmd\samples\d>\dmd\bin\shell ixb.sh
| shell 1.00
| \dmd\bin\dmd ixbase.d gdi32.lib
| ixbase.d(25): function myProc (HANDLE hwndChild,int lParam) does not match
| argument types ()
|
| --- errorlevel 1
|
| ...
|

You need an & before myProc:

EnumChildWindows(hWnd, &myProc, (LPARAM) &rcClient);

-----------------------
Carlos Santander Bernal


June 10, 2004
Thanks Carlos,
and last version
          EnumChildWindows(hWnd,(WNDENUMPROC) &IxbProc, (LPARAM) &rcClient);

Anatoliy

> EnumChildWindows(hWnd, &myProc, (LPARAM) &rcClient);
>
> -----------------------
> Carlos Santander Bernal
>
>


June 10, 2004
"Anatoliy Shevelev" <ixbase@insyg.kiev.ua> escribió en el mensaje
news:caa0s1$sgn$1@digitaldaemon.com
| Thanks Carlos,
| and last version
|           EnumChildWindows(hWnd,(WNDENUMPROC) &IxbProc, (LPARAM)
&rcClient);
|
| Anatoliy
|

Finally, you'll want to change those C-style casts to D-style.

-----------------------
Carlos Santander Bernal


June 11, 2004
I'm will but can't solve the problem with, for example

export void InitCommonControls(void);

error
C:\dmd\samples\d>\dmd\bin\shell ixb.sh
shell 1.00
\dmd\bin\dmd ixbase.d gdi32.lib
C:\dmd\bin\..\src\phobos\std\c\windows\windows.d(1818): cannot have
parameter of type void

--- errorlevel 1

Anatoliy

> Finally, you'll want to change those C-style casts to D-style.
>
> -----------------------
> Carlos Santander Bernal
>
>


June 11, 2004
In article <cacsa7$22uv$1@digitaldaemon.com>, Anatoliy Shevelev says...
>
>I'm will but can't solve the problem with, for example
>
>export void InitCommonControls(void);

change it to:

export void InitCommonControls();

A void parameter is optional in C++ but forbidden in D.

Sean Kelly


« First   ‹ Prev
1 2