News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

window creation questions!!

Started by Rainstorm, July 16, 2007, 02:31:24 PM

Previous topic - Next topic

Rainstorm

I've successfully manged to create windows & play with them slightly.. but there are some things I don't understand. - from the SDK..
QuoteThe WinMain function is called by the system as the initial entry point for a Windows-based application
In my windows code I use invokee & call the WinMain function,......I can't see how the System is calling it....Can someone explain this to me ?

Another question..From the SDK
QuotehWndParent
[in] Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows
In my code this is the first window am creating.. so it has no Parent window...therefore no handle for a parent window, so what do i put here ? (in my code I've supplied the instance module for a value & it still works fine......in the generic example I just checked & a NULL  is supplied there..) Can someone explain this to me a bit ?

Thank-you

Rainstorm


Tedd

Quote from: Rainstorm on July 16, 2007, 02:31:24 PM
I've successfully manged to create windows & play with them slightly.. but there are some things I don't understand. - from the SDK..
QuoteThe WinMain function is called by the system as the initial entry point for a Windows-based application
In my windows code I use invokee & call the WinMain function,......I can't see how the System is calling it....Can someone explain this to me ?
That refers to the runtime system (not the operating system) - it's aimed at C/C++ programmers - you don't need to worry about it. When you compile a C program, a lot of other 'house-keeping' functions are included to deal with the command-line and environment, when that's finished it calls your 'main' function. In asm we do it ourselves without the runtime.

Quote
Another question..From the SDK
QuotehWndParent
[in] Handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows
In my code this is the first window am creating.. so it has no Parent window...therefore no handle for a parent window, so what do i put here ? (in my code I've supplied the instance module for a value & it still works fine......in the generic example I just checked & a NULL  is supplied there..) Can someone explain this to me a bit ?
This is for 'CreateWindow' ? -- For your top-level window just supply NULL. It's meant for child-windows, for which you provide the handle to the parent/owner window that the child (e.g. button, edit, etc) appears on (for where to send notifications.)
No snowflake in an avalanche feels responsible.

Rainstorm

edd wrote
QuoteThat refers to the runtime system (not the operating system) - it's aimed at C/C++ programmers - you don't need to worry about it. When you compile a C program, a lot of other 'house-keeping' functions are included to deal with the command-line and environment, when that's finished it calls your 'main' function. In asm we do it ourselves without the runtime.

tedd, thanks a lot..! .....*whew*.. i was racking my head on that one lol..thinking that the winmain must be working in some weird way etc. - so it is what it looks like,..the winmain is called using the invoke in my code before the function.

QuoteThis is for 'CreateWindow' ? -- For your top-level window just supply NULL.
yes its for 'CreateWindow' 

t y

Rainstorm.

Rainstorm

Hi.
,.. didn't wanna start a seperate thread for this question.

What's the concept surrounding things like     wxyz.h in the SDK   ....is the concept similar to the PROTO (prototype)  concept in assembly ?

thanks

Rainstorm.

-

Vortex

Hi Rainstorm,

Yes, C header files with the .h extension have the same functionality with the .inc files used with assembly. The .h files are containing function prototypes, equates and structure definitions. The master MASM include file windows.inc and the other include files like kernel32.inc are providing the same services.

Rainstorm

many thanks vortex..

Rainstorm.

-