Top 100+ Win32 API Interview Questions And Answers
Question 1. What Is Gdi Object?
Answer :
GDI object (is a graphical gadget object) used to compose on a gadget setting for graphical yield.
GDI objects are: Pen, Brush, Font,Line, Rectangle and so on.
These articles are made utilizing their comparing win32 work. For eg, CreatePen, reatePenIndirect are utilized to make a pen object.
After these articles are made they would should be chosen to the gadget setting before preparing utilizing "SelectObject" work.
GDI objects are not related with any gadget setting during its creation. SelectObject work does that assocaition.
When an article is chosen into the gadget setting it would be accessible until the item is crushed through DeleteObject or the program exits.
Question 2. Message To Limit The Size Of Window?
Answer :
BOOL MoveWindow(
hWnd,/handle to window
int X,/even position
int Y,/vertical position
int nWidth,/width
int nHeight,/stature
BOOL bRepaint/repaint choice
);
This cud be utilized in the WM_PAINT occasion area and in WM_INITDIALOG segment. WM_SIZE message is gotten by the window technique when a client resizes a window. So as to limite the size of a window, you could deal with the WM_SIZE message properly.
WinRunner Interview Questions
Question 3. What Is The Function To Repaint A Window Immediately?
Answer :
Invalidate():To repaint the whole customer zone
InvalidateRect():To repaint a particular bit of the customer territory.
Question 4. Expound On Send Message And Post Message?
Answer :
SendMessage is a blocking call. ie., when a SendMessage() API is called from an application, the lines composed after this API call can't be executed until the message is prepared and returned by the window system.
Though PostMessage() just posts the message into the windows relating message line and returns quickly regardless of the message is prepared or not.
WinRunner Tutorial
Question 5. What Message Displayed When A Window Is Destroyed?
Answer :
WM_QUIT message in the program message line is posted. This causes WinMain to drop out of message circle and leave the runing application.
Android Interview Questions
Question 6. What Is Preemption And Context Switching?
Answer :
Pre emption is discharging the procedure so as to serve another procedure to use a similar asset. Setting exchanging is the exchange of asset from once procedure to another procedure.
Question 7. What Is Use Of The Createwindow Object?
Answer :
createWindow() truly makes the Window in memory dependent on the previousy enlisted WNDCLASS structure and returns a vaild HANDLE for that Window.
Android Tutorial Windows Administration Interview Questions
Question 8. Java Is Pure Object Oriented Programming Language Why?
Answer :
Java just uses object situated principals however it isn't simply object arranged , on the grounds that int is a crude information type in Java yet not an article also all crude information types an unadulterated item arranged language ought not bolster a non object arranged viewpoints.
Question 9. In Win32 Application If Defining A Variable Of Cstring Then It Gives The Error "cstring:undeclared Identifier" How To Solve The Problem? What Headerfile Need To Include?
Answer :
A faik CString is a MFC class. You can't utilize it in win32 application except if you set your application to utilize MFC libraries. To utilize MFC in win32 application, go to extend settings and when all is said in done tab, set it to utilize MFC libraries in shared DLL. At that point you can incorporate MFC structure documents like afxwin.h.
MVC Framework Interview Questions
Question 10. How To Load Bitmap In Dialog Background In A Mfc Application?
Answer :
In OnInitDialog:
- -
1. Make CBitmap from the bitmap.
2. Make a memory DC (CDC)
3. Put the CBitmap into the memory DC (Use CDC::SelectObject work).
In OnPaint:
-
4. Get your discourse DC (CDialog::GetDC)
5. Do BitBlt or StretchBlt on discourse DC with memory DC as source DC (this will paint the bitmap on your exchange).
6. Discharge discourse DC (ReleaseDC work)
MVC Framework Tutorial
Question 11. What Api Used To Hide Window?
Answer :
ShowWindow(hwnd, SW_HIDE);/to conceal window
ShowWindow(hwnd, SW_SHOW);/to show window
Windows CE .NET Interview Questions
Question 12. In Win32 Application Can We Use Cstring Datatype?
Answer :
A faik CString is a MFC class. You can't utilize it in win32 application except if you set your application to utilize MFC libraries. To utilize MFC in win32 application, go to extend settings and as a rule tab, set it to utilize MFC libraries in shared DLL. At that point you can incorporate MFC system documents like afxwin.h.
WinRunner Interview Questions
Question 13. What Are The Design Patterns Of A Mfc Application?
Answer :
It utilizes principle three examples,
Singleton design - Application object(CWinApp and its determined classes)
Extension design - Serialization
Onlooker patten - Document/View Architecture
On the off chance that we dive further into the MFC classes, it might utilize some different examples moreover.
Microsoft Foundation Class Library (MFC) Tutorial
Question 14. What Is The Difference Between Mfc And Win32?
Answer :
Win32 is a lot of Windows APIs written in C and MFC is a system manufactured arround Win32. All MFC capacities inside use Win32 APIs. Furthermore, MFC is written in C++.
Question 15. How To Initialize Contents Of A Dialog?
Answer :
In MFC, the substance of a discourse are introduced on the off chance that they are related with their comparing information individuals. This is done through "UpdateData(FALSE)" work. The control information is moved to the information individuals through "UpdateData(TRUE)".
In WIN32, the discourse information in controls can be introduced during WM_INITDIALOG call. The control information can be refreshed to the exchange individuals utilizing apppropriate "SendMessage" capacities.
Microsoft Foundation Class Library (MFC) Interview Questions
Question 16. What Are The Com Components?
Answer :
It advanced like this when u compose a CLASS to reuse in an application, numerous intances of the class exists with each example of utilization, Next u need to keep away from it so u make a class and put it in DLL now just one case exists however different occurrences of uses exists Applicatoin should be recompiled at whatever point Dll is changed, SO came COM. COM is free segment that inside handles organizing, assets and so on, COM utilizes IDL to convey to various dialects.
Dynamic Link Library (DLL) Tutorial
Question 17. Win 3.1 Supports Which Type Of Multi Tasking?
Answer :
Win3.1 underpins co-employable performing multiple tasks. When a procedure is given the control for execution, different assignments need to hold up until the current has surrendered its execution.
WinNT is preemptive performing multiple tasks. A procedure can be halted in the center if another procedure needs CPU cycle. This is taken care of by the windows OS.
Dynamic Link Library (DLL) Interview Questions
Question 18. What Is System Call Executable Binary File Into A Process?
Answer :
In any case, WinExec() is good with 16-piece Windows.
Applications should utilize the CreateProcess function.http://msdn.microsoft.com/en-us/library/ms687393(VS.85).aspx
Android Interview Questions
Question 19. What Is Function Entry For Dll In Win3.1?
Answer :
Ought to be LibMain in win3.1
Windows 10 Tutorial
Question 20. What Is Win32?
Answer :
Win32 alludes to Microsoft 32 piece Windows API. Win32 Applications are programs which are worked with the Win32 API.
Progressed C++ Interview Questions

