Win32API Interview Questions and Answers

Win32API Questions and Answers:

1 :: What is GDI object?

GDI object (is a graphical device object) used to write on a
device context for graphical output.
GDI objects are: Pen, Brush, Font,Line, Rectangle etc.
These objects are created using their corresponding win32
function. For eg, CreatePen, CreatePenIndirect are used to
create a pen object.
After these objects are created they would need to be
selected to the device context before processing using
"SelectObject" function.
GDI objects are not associated with any device context
during its creation. SelectObject function does that
assocaition.
Once an object is selected into the device context it would
be available until the object is destroyed through
DeleteObject or the program exits.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

2 :: Message to limit the size of window?

BOOL MoveWindow(
HWND hWnd, // handle to window
int X, // horizontal position
int Y, // vertical position
int nWidth, // width
int nHeight, // height
BOOL bRepaint // repaint option
);

This cud be used in the WM_PAINT event section and in
WM_INITDIALOG section.

WM_SIZE message is received by the window procedure when a
user resizes a window. In order to limite the size of a
window, you could handle the WM_SIZE message appropriately.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

3 :: What is the function to repaint a window immediately?

Invalidate() -- To repaint the entire client area
InvalidateRect() -- To repaint a specific portion of the
client area.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

4 :: Write About send message and post message?

SendMessage is a blocking call. ie., when a SendMessage()
API is called from an application, the lines written after
this API call cannot be executed until the message is
processed and returned by the window procedure.

Whereas PostMessage() just posts the message into the
windows corresponding message queue and returns immediately
irrespective of the message is processed or not.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

5 :: what Message displayed when a window is destroyed?

WM_QUIT message in the program message queue is posted.
This causes WinMain to drop out of message loop and exit
the runing application.
0/5 Rating (0 vote)
Is This Answer Correct?    0 Yes 0 No
Place Your Answer

Rate This Category:
0/5 Rating (0 vote)
Place Your Question



Top: Win32API Interview Questions and Answers
Win32API Interview Questions and Answers

Top Frequently Asked Win32API Question
Frequently Asked Win32API Job Interview Question


Top Frequently opened Computer Programming Job Interview categories
Most popular Computer Programming Job Interview categories

Comments About Win32API Interview Questions and Answers

Share your valuable opinions, ideas and suggestions about Win32API Interview Questions and Answers
While placing your comment your email address is required but won't be published any where else; Personal information will be kept confidential; we do not sell or release our respective visitors private information.
  1. Webmaster 23rd of May 2012

    Webmaster Said

    Tell us what you feel about Win32API Interview Questions and Answers
    All comments will be published after review. No login or registration is required to post a comment on Win32API Interview Questions and Answers We offer and invite you to submit your valuable comment now; Please be respectful of others when commenting. Insulting others, self-promotional comments, website promotional comments, marketing stuff, SEO Techniques, SMS-style content and off-topic comments will not be approved at this information portal.
    So start sharing your thoughts regarding Win32API Interview Questions and Answers
    Thank you.

Leave a Comment

Leave a Comment
  1.  Enter This Verification Code  Regenerate Verification Code  



Your reply will be added to the comment above (Below any other replies to this comment) -

Top Comments About: Win32API Interview Questions and Answers
Comments on Win32API Interview Questions and Answers

 
Top of Link batk to Win32API Interview Questions and Answers
Link batk to Win32API Interview Questions and Answers