•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 402,503 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,741 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
I've often wondered why M$ didn't make creating a window a simple as registering a class in that only one 32 bit value need be passed to calling routine. Although this is not ground breaking code design it does facilitate calling code only set EBX to point to all values required by CreateWindowEx.
; *** CREATE_WND *** ; ENTRY: EBX = Pointer to structure CreateWindowEx structure ; LEAVE: EAX = Handle to window, or null if failed ; CY = 0 Successful, 1 otherwise. ; ============================================================================================ Create_Wnd mov ecx, 48 sub esp, ecx ; Create stack frame for CreateWindowEx mov edx, esp ; Need this pointer in EDI push esi push edi ; Save registers mov edi, edx mov esi, ebx ; Setup for movsd shr ecx, 2 ; Number of dwords to move cld rep movsd ; Copy parameters into stack area pop edi pop esi ; Restore index registers and create call _CreateWindowExA@48 ; window and eax, eax jnz .Done + 1 ; If non zero, then was successful ; Error handling code will eventually go here .Done stc ; Set error flag ret
Comments (Newest First)
vegaseat | Kickbutt Moderator | Feb 12th, 2005
•
•
•
•
The thread is not limited to console only. Please go ahead and give us a good one! Thanks.
Tight_Coder_Ex | Junior Poster | Feb 11th, 2005
vegaseat | Kickbutt Moderator | Feb 11th, 2005
•
•
•
•
Nice idea!
We have a little thread going on DaniWeb under: http://www.daniweb.com/techtalkforums/thread18331.html
Would be nice to get the asm Hello World! from you.
We have a little thread going on DaniWeb under: http://www.daniweb.com/techtalkforums/thread18331.html
Would be nice to get the asm Hello World! from you.
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)