flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vbVeryBeginner 03 Nov 2004, 07:41
hi,
i found the solution but it looks quite weird and i don't know why! Code: invoke LoadLibrary,ctlDllNameRe2 ; --------------------> Line A invoke CreateWindowEx,0,\ wndClsName,wndTitle,\ WS_OVERLAPPEDWINDOW + WS_VISIBLE,\ CW_USEDEFAULT,CW_USEDEFAULT,400,240,\ NULL,NULL,[insH],NULL mov [wndH],eax invoke LoadLibrary,ctlDllNameRe2 ; --------------------> Line B window_message_loop_start: .... ideally, the api LoadLibrary whether invoke from Line A or Line B should work as expected because the return value is NOT NULL but somehow, if we invoke LoadLibrary after we invoke CreateWindowEx, the below code then won't work! CreateWindowEx would return NULL. Code: wmCREATE: invoke LoadLibrary,ctlDllNameRe2 ; --------------------> Line C invoke CreateWindowEx,WS_EX_CLIENTEDGE,ctlClsNameRe2,0,\ WS_CHILD + WS_VISIBLE + ES_MULTILINE + WS_VSCROLL + WS_HSCROLL,\ 0,0,0,0,\ [hWnd],200,[insH],0 cmp eax,NULL jne @f invoke MessageBox,NULL,wndTitle,wndTitle,MB_OK @@: mov [re2H],eax jmp wmBYE Line A and Line C would works as expected but not Line B maybe it is a bug on my windows 95? |
|||
![]() |
|
vid 03 Nov 2004, 09:42
well, this is the feel of true windows coding - you do it other way than showed in M$ examples and it doesn't work even if it should due to documentation. It is even bigger fun with directX.
|
|||
![]() |
|
crc 03 Nov 2004, 12:10
Quote: well, this is the feel of true windows coding - you do it other way than showed in M$ examples and it doesn't work even if it should due to documentation. Vid is very accurate on this: I spent several hours working to get my Win32 console programs working under all versions of Windows, only to discover that the documentation and the implementation details don't always match up ![]() |
|||
![]() |
|
vbVeryBeginner 04 Nov 2004, 03:19
maybe there should be a site contained information on weird windows api! if it is weird, i guess it should be bug :p
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.