It's best asking in the Windows Programming section for this.
Basically, it tells Windows which window to draw/display. It sends a WM_PAINT message to the window's procedure( which jumps in front of the message queue ). The single argument is the handle to the window you wish to draw.
Nope, ShowWindow makes the window visible. Or, to be more precise, it sets the visibility state of the window that hWindow is the handle to to iCmdShow.
If this isn't of type HWND then you're wrong; the argument takes a HWND instance.
My post but re-phrased: It updates the client area of the given window( argument ). It still sends a WM_PAINT message to the front of the window's message queue.
ShowWindow( ) Determines how the window shall be shown. ( See the table for window display options: http://msdn.microsoft.com/en-us/library/ms633548(v=vs.85).aspx )
UpdateWindow( ) updates the client area of the given window( the argument is the handle to the window you want to update ). See here for information from Microsoft: http://msdn.microsoft.com/en-us/library/ms915501.aspx
I'm sorry, I should have said this before. This image represents the client area: http://www.codemorphis.com/articles/tip1/window_client_area.jpg Where the red box is the client area of the window.
Ive just been reading and ive come up with a new idea of what these two do:
ShowWindow() sets the "show-state". This function also DISPLAYS the window as we are setting the show state to a state which is displayed, so the window IS displayed because of this function.
UpdateWindow() does what it says on the tin. It updates the client area to make sure things such as strings and boxs are visible when the window is first created. Another thing which tells me that the updatewindow() does NOT display the window is that my application still displays if i remove the updatewindow().
Is this correct?
If so, why do need to make sure things such as strings and boxs are visible when the window is first created, why would they not be visible?
To sum up, showwindow is the one which actually displays the window, and updatewindow is the one which updates the client area for things like if ive modified a box
You don't really need to explicitly call UpdateWindow for the standard windows, like statics or pushbuttons, they do that themselves. Just do it once after calling ShowWindow.
If your static string changed, then you will need to update the client area. If nothing changes then there will be no need to update the client area. However, if you were creating custom elements, then you might have to update the client area. These are my thoughts, however.