D - How to include Win32 function
- Anatoliy Shevelev (9/9) Jun 07 2004 How to include into progect the Win32 function:
- Walter (3/12) Jun 07 2004 import std.c.windows.windows;
- Anatoliy Shevelev (3/21) Jun 08 2004 I'm use thise command at my project but not all function work properly
-
Stewart Gordon
(10/11)
Jun 09 2004
- Anatoliy Shevelev (67/67) Jun 09 2004 I'm understand, if function missing to including it's to the project as
-
Carlos Santander B.
(26/26)
Jun 09 2004
"Anatoliy Shevelev"
escribió en el mensaje - Anatoliy Shevelev (4/7) Jun 10 2004 Thanks Carlos,
-
Carlos Santander B.
(12/12)
Jun 10 2004
"Anatoliy Shevelev"
escribió en el mensaje - Anatoliy Shevelev (10/13) Jun 11 2004 I'm will but can't solve the problem with, for example
- Sean Kelly (5/7) Jun 11 2004 change it to:
- Matthew (4/12) Jun 11 2004 You forgot "Is necessary in C, "
- Sean Kelly (3/4) Jun 12 2004 That requirement is still in place? I was hoping it had been removed in...
- The Dr ... who? (7/12) Jun 12 2004 Interesting point. I have to say I can't imagine that to be the case - t...
- Anatoliy Shevelev (10/10) Jun 12 2004 change
- J C Calvarese (6/18) Jun 21 2004 You need to add a lib to the compile command on the command line. I
How to include into progect the Win32 function: ShowWindow() MoveWindow() GetWindowLong() SetWindowText() SendMessage() EnumChildWindows() Anatoliy Shevelev http://esk.lgg.ru
Jun 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
Jun 07 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
Jun 08 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.
Jun 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
Jun 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
Jun 09 2004
Thanks Carlos, and last version EnumChildWindows(hWnd,(WNDENUMPROC) &IxbProc, (LPARAM) &rcClient); AnatoliyEnumChildWindows(hWnd, &myProc, (LPARAM) &rcClient); ----------------------- Carlos Santander Bernal
Jun 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
Jun 10 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 AnatoliyFinally, you'll want to change those C-style casts to D-style. ----------------------- Carlos Santander Bernal
Jun 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
Jun 11 2004
"Sean Kelly" <sean f4.ca> wrote in message news:cact6g$2440$1 digitaldaemon.com...In article <cacsa7$22uv$1 digitaldaemon.com>, Anatoliy Shevelev says...You forgot "Is necessary in C, " :)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.
Jun 11 2004
In article <cae6m3$ug5$1 digitaldaemon.com>, Matthew says...You forgot "Is necessary in C, "That requirement is still in place? I was hoping it had been removed in C99 :) Sean
Jun 12 2004
Interesting point. I have to say I can't imagine that to be the case - too much back compat - but you never know. If I was sufficiently motivated I'd boot up Acrobat and have a scour, but I'm not. Maybe I'll just try it with Comeau and --strict. (But Walter might bite me for not trusting DMC++!! <G>) "Sean Kelly" <sean f4.ca> wrote in message news:caf79o$2je6$1 digitaldaemon.com...In article <cae6m3$ug5$1 digitaldaemon.com>, Matthew says...You forgot "Is necessary in C, "That requirement is still in place? I was hoping it had been removed in C99 :) Sean
Jun 12 2004
change but next error export void InitCommonControls(void); to export void InitCommonControls(); but next error C:\dmd\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _InitCommonControls 0 --- errorlevel 1 Anatoliy
Jun 12 2004
Anatoliy Shevelev wrote:change but next error export void InitCommonControls(void); to export void InitCommonControls(); but next error C:\dmd\bin\..\lib\phobos.lib(dmain2) Error 42: Symbol Undefined _InitCommonControls 0 --- errorlevel 1 AnatoliyYou need to add a lib to the compile command on the command line. I think you need to use "comctl32.lib", but I'm not certain. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jun 21 2004