What is Win32?

Answers were Sorted based on User's Feedback



What is Win32?..

Answer / btech

Win32 refers to Microsoft 32 bit Windows API. Win32
Applications are programs which are built with the Win32
API.

Is This Answer Correct ?    41 Yes 9 No

What is Win32?..

Answer / praveen patel

Win32 is the 32-bit API for modern versions of Windows.The
core set of application programming interfaces available in
the Microsoft Windows operating systems is called Win32 .It
can be a collection of function ,method,predefine classes or
headers.The core DLLs of Win32 are kernel32.dll, user32.dll,
and gdi32.dll. Win32 was introduced with Windows NT.

Is This Answer Correct ?    16 Yes 3 No

What is Win32?..

Answer / kiran

The actual answer is, Win32 is a set of functions supported
my Microsoft Windows to do Windows programming.

Is This Answer Correct ?    22 Yes 10 No

What is Win32?..

Answer / kuldeep raaj sharma

The Windows API, informally WinAPI, is Microsoft's core set
of application programming interfaces (APIs) available in
the Microsoft Windows operating systems. It was formerly
called the Win32 API; however, the name Windows API more
accurately reflects its roots in 16-bit Windows and its
support on 64-bit Windows. All Windows programs must
interact with the Windows API regardless of the language.

The Microsoft Windows SDK (Software Development Kit) is
available for Windows, which provides documentation and
tools to enable developers to create software using the
Windows API and associated Windows technologies.
---
The functionality provided by the Windows API can be
grouped into eight categories:
--
[1]Base Services
Provide access to the fundamental resources available to a
Windows system. Included are things like file systems,
devices, processes and threads, and error handling. These
functions reside in kernel.exe, krnl286.exe or krnl386.exe
files on 16-bit Windows, and kernel32.dll and advapi32.dll
on 32-bit Windows.
--
[2] Advanced Services
Provide access to functionality that is an addition on the
kernel. Included are things like the Windows registry,
shutdown/restart the system (or abort), start/stop/create a
Windows service, manage user accounts. These functions
reside in advapi32.dll on 32-bit Windows.
--
[3] Graphics Device Interface
Provide the functionality for outputting graphical content
to monitors, printers and other output devices. It resides
in gdi.exe on 16-bit Windows, and gdi32.dll on 32-bit
Windows.
--
[4]User Interface
Provides the functionality to create and manage screen
windows and most basic controls, such as buttons and
scrollbars, receive mouse and keyboard input, and other
functionality associated with the GUI part of Windows. This
functional unit resides in user.exe on 16-bit Windows, and
user32.dll on 32-bit Windows. Since Windows XP versions,
the basic controls reside in comctl32.dll, together with
the common controls (Common Control Library).
--
[5] Common Dialog Box Library
Provides applications the standard dialog boxes for opening
and saving files, choosing color and font, etc. The library
resides in a file called commdlg.dll on 16-bit Windows, and
comdlg32.dll on 32-bit Windows. It is grouped under the
User Interface category of the API.
--
[6] Common Control Library
Gives applications access to some advanced controls
provided by the operating system. These include things like
status bars, progress bars, toolbars and tabs. The library
resides in a DLL file called commctrl.dll on 16-bit
Windows, and comctl32.dll on 32-bit Windows. It is grouped
under the User Interface category of the API.
--
[7][8] Windows Shell
Component of the Windows API allows applications to access
the functionality provided by the operating system shell,
as well as change and enhance it. The component resides in
shell.dll on 16-bit Windows, and shell32.dll and later in
Windows 95 shlwapi.dll on 32-bit Windows. It is grouped
under the User Interface category of the API.
--
[9] Network Services
Give access to the various networking capabilities of the
operating system. Its sub-components include NetBIOS,
Winsock, NetDDE, RPC and many others.

----
Almost every new version of Microsoft Windows has
introduced its own additions and changes to the Windows API.
[14] The name of the API however was kept consistent
between different Windows version, and name changes were
kept limited to major architectural and platform changes
for Windows. Microsoft eventually changed the name of the
then current Win32 API family into Windows API, and made it
into a catch-all term for both past and future versions of
the API.[15]

Win16 is the API for the first, 16-bit versions of
Microsoft Windows. These were initially referred to as
simply the Windows API, but were later renamed to Win16 in
an effort to distinguish it from the newer, 32-bit version
of the Windows API. The functions of Win16 API mainly
reside in the core files of the OS: kernel.exe (or
krnl286.exe or krnl386.exe), user.exe and gdi.exe. Despite
the file extension of exe, these actually are dynamically
linked libraries.

Win32 is the 32-bit API for modern versions of Windows. The
API consists of functions implemented, as with Win16, in
system DLLs. The core DLLs of Win32 are kernel32.dll,
user32.dll, and gdi32.dll. Win32 was introduced with
Windows NT. The version of Win32 that was shipped with
Windows 95 was initially referred to as Win32c, with
the "c" standing for "compatibility", but this term was
later abandoned by Microsoft in favour of Win32. In Windows
NT 4.0 and its successors (including all modern Windows
versions), Win32 calls are executed by two modules,
csrss.exe (Client/Server Runtime Server Subsystem) in user
mode and win32k.sys in kernel mode.[citation needed]

Win32s is an extension for the Windows 3.1x family of
Microsoft Windows that implemented a subset of the Win32
API for these systems. The "s" stands for "subset".
Win32 for 64-bit Windows, previously known as Win64, is the
variant of the API implemented on 64-bit platforms of the
Windows architecture (currently AMD64 and IA64.)[16][17]
[18] There are no new user-mode functions specific to the
64-bit platform, so both 32-bit and 64-bit versions of an
application can be still compiled from a single codebase,
although some older APIs have been deprecated. All memory
pointers are 64-bit by default (the LLP64 model), so the
source code has to be checked for compatibility with 64-bit
pointer arithmetic and rewritten as necessary [19].

Is This Answer Correct ?    16 Yes 7 No

What is Win32?..

Answer / jeker

Win32 is 32-bit windows.

Is This Answer Correct ?    3 Yes 2 No

What is Win32?..

Answer / naveen kumar

Win32 is used for developing 32-bit applications. It is the set of Microsoft Windows API(Application Programming Interface).

Is This Answer Correct ?    1 Yes 0 No

What is Win32?..

Answer / nandu

// basic8.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "basic8.h"
#include "resource.h"
#include <windows.h>
#include "stdio.h"
//#include <string.h>
#include "stdlib.h"
#include <string>

#define ID_EDIT 1

#define MAX_LOADSTRING 100
HWND hWnd1;
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window
class name

// Forward declarations of functions included in this code
module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);

TCHAR szAppName[] = TEXT ("PopPad1") ;
WNDPROC OldEdit ;
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);

// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;

// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_BASIC8, szWindowClass,
MAX_LOADSTRING);
MyRegisterClass(hInstance);

// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}

hAccelTable = LoadAccelerators(hInstance,
MAKEINTRESOURCE(IDC_BASIC8));

// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

return (int) msg.wParam;
}



/
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;

wcex.cbSize = sizeof(WNDCLASSEX);

wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance,
MAKEINTRESOURCE(IDI_BASIC8));
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = MAKEINTRESOURCE(IDC_BASIC8);
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance,
MAKEINTRESOURCE(IDI_SMALL));

return RegisterClassEx(&wcex);
}


BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;

hInst = hInstance; // Store instance handle in our global
variable

hWnd = CreateWindow(szWindowClass, szTitle,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL,
hInstance, NULL);

if (!hWnd)
{
return FALSE;
}

ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);

return TRUE;
}


LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM
wParam, LPARAM lParam)
{

hWnd1 = hWnd;
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
static HWND hwndEdit ;

switch (message)
{
case WM_CREATE :
hwndEdit = CreateWindow (TEXT ("edit"), NULL,
WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
WS_BORDER |
ES_MULTILINE |
ES_AUTOHSCROLL | ES_AUTOVSCROLL,
0, 0, 0, 0, hWnd, (HMENU) ID_EDIT,
((LPCREATESTRUCT) lParam) -> hInstance, NULL) ;

return 0 ;
case WM_SIZE :
MoveWindow (hwndEdit, 0, 0, LOWORD (lParam), HIWORD
(lParam), TRUE) ;
return 0 ;

case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);

switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
case ID_CHILD_SHOW:
//if (LOWORD(wParam) == ID_CHILD_SHOW)
DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG1), hWnd, About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;

default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
//hWnd1 = hwndEdit;
return 0;
}

void TextPrint(HWND hWn,std::wstring Name)
{
//(LPCWSTR)
LPCWSTR Insert = &Name[0];

SetDlgItemText(hWnd1, ID_EDIT, Insert);

}

// Message handler for about box.
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM
wParam, LPARAM lParam)
{
static HWND hCtrlText ;
static TCHAR Name;
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
return (INT_PTR)TRUE;

case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
if (LOWORD(wParam) == IDC_PRINT)
{
std::wstring STR;
std::wstring STR1;
std::wstring STR2;
std::wstring MIX;
LPWSTR st;
TCHAR* str1;
TCHAR Name[100];
TCHAR ARR[100];
TCHAR ARR1[100];
TCHAR ARR2[100];
int LEN = 100;

GetDlgItemText(hDlg, IDC_EDIT_NAME, ARR, LEN);
GetDlgItemText(hDlg, IDC_EDIT_AGE, ARR1, LEN);
GetDlgItemText(hDlg, IDC_EDIT_POST, ARR2, LEN);

STR = ARR;
//st = STR;
STR1 = ARR1;
STR2 = ARR2;
MIX = L"Name : " + STR + L"\r\n\r\n" + L"Age : " + STR1 +
L"\r\n\r\n" + L"Post : " + STR2;
TextPrint(hDlg, MIX);

EndDialog (hDlg, TRUE) ;


}
break;
}
return (INT_PTR)FALSE;
}

Is This Answer Correct ?    0 Yes 1 No

What is Win32?..

Answer / shaktiprasad

win32 is a core interface windows uses to communicate with
the programs that runs on it.

Is This Answer Correct ?    4 Yes 6 No

What is Win32?..

Answer / navin salunke

In addition to above answer just more few point on Win32
programming..When you say you are working with Win32
programming means your program going to run n processor mode
that uses 32 bit wide registers. The primary implications of
running in 32 bit mode and a memory location is addressed
using a single 32 bit address (which is known as flat memory
addressing model).It allows a program to theoritically
address upto 4gb (2^32) of virtual memory.

Is This Answer Correct ?    3 Yes 5 No

What is Win32?..

Answer / nandu

// 2109a1.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "2109a1.h"
#include <windows.h>
#include "resource.h"
#include "stdio.h"
#include "stdlib.h"
#include <string>
#include <stdio.h>
#include <sstream>

//#include <boost/spirit/include/qi.hpp>

#define ID_EDIT 1
#define ID_BUTTON 2
#define ID_SQUARE 3
#define ID_CIRCLE 4
#define ID_CHECK 5
#define ID_RED 6
#define ID_GREEN 7
#define WM_CTLCOLORBTN 8
#define WM_CTLCOLORBTN1 9
#define ID_PAINT 10
#define ID_LIST 11
#define ID_LISTVIEW 12
HWND hWnd1;
LRESULT _stdcall MyWindowFun(HWND,UINT,WPARAM,LPARAM);
LRESULT _stdcall ChWndProc(HWND,UINT,WPARAM,LPARAM);
LRESULT _stdcall EditProc (HWND, UINT, WPARAM, LPARAM);


int iCurrectcheck=0 ;
int shape=0;
int color=0;
std::wstring STR;
TCHAR szAppName[] = TEXT ("PopPad1") ;
WNDPROC OldEdit ;
HINSTANCE g_hInstance = NULL;
HWND g_hwnd = NULL;
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpCmdLine,int nShowCmd)
{
WNDCLASS wc = {0};
WNDCLASS chwc = {0};
HWND hwnd;
MSG msg;

g_hInstance = hInstance;

wc.hInstance = hInstance;
wc.hbrBackground = CreateSolidBrush(RGB(255,255,255));
wc.lpfnWndProc = MyWindowFun;
wc.lpszClassName = L"kishore";
wc.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wc.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
//wc.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1);

chwc.hInstance = hInstance;
chwc.hbrBackground = CreateSolidBrush(RGB(0,255,255));
chwc.lpfnWndProc = ChWndProc;
chwc.lpszClassName = L"trust";

RegisterClass(&wc);
RegisterClass(&chwc);

hwnd = CreateWindow(L"kishore",L"My
Window",WS_OVERLAPPEDWINDOW,
0,0, CW_USEDEFAULT,
0,NULL,LoadMenu(hInstance,MAKEINTRESOURCE(IDR_MENU1)),hInstance,NULL);

ShowWindow(hwnd,SW_SHOW);
while(GetMessage(&msg,0,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;

}

void PaintWindow(HWND hWn,std::wstring Name,int shape1,int
color1,int check1)
{

HDC hdc;
RECT rect ;
HBRUSH hBrush ;
hdc = GetDC(hWnd1);

GetClientRect (hWnd1, &rect) ;
float value = 0;
std::wstringstream converter;

converter << Name;
converter >> value;
if(check1 == 1)
{
if(color1 == 1)
{
hBrush = CreateSolidBrush(RGB(255,0,0));
hBrush = (HBRUSH) SelectObject (hdc, hBrush) ;
}
if(color1 == 2)
{
hBrush = CreateSolidBrush(RGB(0,255,0));
hBrush = (HBRUSH) SelectObject (hdc, hBrush) ;
}
//hBrush = (HBRUSH) SelectObject (hdc, hBrush) ;
}
if(shape1 == 1)
Rectangle(hdc,250,250,250+(int)value,250+(int)value);
if(shape1 == 2)
Ellipse(hdc,250,250,250+(int)value,250+(int)value);
//DeleteObject(SelectObject (hdc, hBrush)) ;

ReleaseDC(hWnd1,hdc);

}
void PaintTheBlock (HWND hWn,std::wstring Name,int
shape2,int color2,int check2)
{
InvalidateRect (hWn, NULL, TRUE) ;
UpdateWindow (hWn) ;
PaintWindow (hWn, Name, shape2, color2,check2);
}




LRESULT _stdcall MyWindowFun(HWND hwnd,UINT nMessage,WPARAM
wp,LPARAM lp)
{
int wmId, wmEvent;
PAINTSTRUCT ps ;
//HDC hdc;
hWnd1 = hwnd;
switch( nMessage )
{
case WM_COMMAND:
wmId = LOWORD(wp);
wmEvent = HIWORD(wp);
switch (wmId)
{
case ID_DIALOG_SHOW:
if ( g_hwnd == NULL )
{
g_hwnd = CreateWindow(L"trust",L"Child Window",WS_CHILD
| //WS_OVERLAPPED
DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP |
WS_CAPTION |
WS_SYSMENU,20,60,550,200,hwnd,NULL,g_hInstance,NULL);

}
ShowWindow(g_hwnd,SW_SHOW);
InvalidateRect (hwnd, NULL, TRUE) ;
default:
return DefWindowProc(hwnd,nMessage, wp, lp);
}



case WM_CLOSE:
if ( IDOK == MessageBox(hwnd,L"Do you want to close
???",L"Close",MB_OKCANCEL) )
{
return DefWindowProc(hwnd,nMessage,wp,lp);
}
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return DefWindowProc(hwnd,nMessage,wp,lp);
}
}



LRESULT _stdcall ChWndProc(HWND hwnd,UINT nMessage,WPARAM
wp,LPARAM lp)
{
static HWND hwndEdit ;
static HWND hwndButton;
static HWND hwndRadio1;
static HWND hwndRadio2;
static HWND hwndcheck;
static HWND hwndRadio3;
static HWND hwndRadio4;
static HWND hwndgroup1;
static HWND hwndgroup2;
static HWND hListBox;
static HWND hListView;
/*static HWND hCtrl ;
static HWND hCtrl1 ;*/
static int iSquare ;
static int iCircle ;
static int iRed ;
static int iGreen ;
static int check ;
static HWND hCtrlBlock ;

switch(nMessage)
{

case WM_CREATE :
hwndEdit = CreateWindow (TEXT ("edit"), NULL,
WS_CHILD | WS_VISIBLE | //WS_HSCROLL | WS_VSCROLL |
WS_BORDER | ES_LEFT |
ES_MULTILINE |ES_NUMBER |
ES_AUTOHSCROLL | ES_AUTOVSCROLL,
0, 0, 0, 0, hwnd, (HMENU) ID_EDIT,
((LPCREATESTRUCT) lp) -> hInstance, NULL) ;

hwndButton=CreateWindow(
L"BUTTON",
L"OK",
WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON,
0, 0, 0, 0, hwnd,
(HMENU) ID_BUTTON,
NULL,NULL);
hwndRadio1 = CreateWindowEx(0,
TEXT("BUTTON"),
TEXT("SQUARE!"),
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | WS_TABSTOP
| WS_GROUP,
0, 0, 0, 0,
hwnd,
(HMENU) ID_SQUARE,
NULL,NULL);

hwndRadio2 = CreateWindowEx(0,
TEXT("BUTTON"),
TEXT("CIRCLE!"),
WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
0, 0, 0, 0,
hwnd,
(HMENU) ID_CIRCLE,
NULL,NULL);

hwndgroup1 = CreateWindow(L"BUTTON", L"", WS_CHILD |
WS_VISIBLE | BS_GROUPBOX,
9, /* X Position */
35, /* Y Position */
234, /* X Width */
42, /* Y Height */
hwnd, (HMENU) WM_CTLCOLORBTN,((LPCREATESTRUCT)
lp) -> hInstance, NULL);
hwndgroup2 = CreateWindow(L"BUTTON", L"", WS_CHILD |
WS_VISIBLE | BS_GROUPBOX,
9, /* X Position */
105, /* Y Position */
234, /* X Width */
42, /* Y Height */
hwnd, (HMENU) WM_CTLCOLORBTN1,((LPCREATESTRUCT)
lp) -> hInstance, NULL);

hwndcheck = CreateWindowEx(
0,
TEXT("BUTTON"),
TEXT("COLOR!"),
WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX,// |
BS_OWNERDRAW,
0, 0, 0, 0,
hwnd,
(HMENU)ID_CHECK,
NULL,
NULL
);
hwndRadio3 = CreateWindowEx(0,
TEXT("BUTTON"),
TEXT("RED!"),
WS_CHILD | BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,
0, 0, 0, 0,
hwnd,
(HMENU) ID_RED,
NULL,NULL);
hwndRadio4 = CreateWindowEx(0,
TEXT("BUTTON"),
TEXT("GREEN!"),
WS_CHILD | BS_AUTORADIOBUTTON | WS_TABSTOP,
0, 0, 0, 0,
hwnd,
(HMENU) ID_GREEN,
NULL,NULL);

hListBox = CreateWindowEx(WS_EX_CLIENTEDGE
, L"LISTBOX", NULL
, WS_CHILD | WS_VISIBLE //| ES_VSCROLL | ES_AUTOVSCROLL
,250,15, 250, 140
, hwnd, (HMENU) ID_LIST, NULL, NULL);

return 0;

OldEdit = (WNDPROC) SetWindowLong (hwndEdit, GWL_WNDPROC,
(LPARAM) EditProc) ;


case WM_SIZE :
MoveWindow (hwndEdit, 15,15, 100, 20, TRUE) ;
MoveWindow (hwndButton, 135,15, 100, 20, TRUE) ;
MoveWindow (hwndRadio1, 15,50, 100, 20, TRUE) ;
MoveWindow (hwndRadio2, 135,50, 100, 20, TRUE) ;
MoveWindow (hwndcheck, 75,85, 100, 20, TRUE) ;
MoveWindow (hwndRadio3, 15,120, 100, 20, TRUE) ;
MoveWindow (hwndRadio4, 135,120, 100, 20, TRUE) ;
return 0 ;
case WM_INITDIALOG:
hCtrlBlock = GetDlgItem (g_hwnd, ID_PAINT) ;
return (INT_PTR)TRUE;

case WM_COMMAND:

//SetDlgItemText(hListBox, ID_LIST, L"This is a string");
//SetWindowText(hListBox, L"Press Me Again!");
switch (LOWORD (wp))
{
case ID_SQUARE:
iSquare = SendMessage (hwndRadio1, BM_GETCHECK, 0, 0);
iCircle=0;
//SetFocus((HWND)BM_GETCHECK);
return TRUE;
case ID_CIRCLE:
iCircle = SendMessage (hwndRadio2, BM_GETCHECK, 0, 0);
iSquare=0;
return TRUE;
case ID_CHECK:
check = SendMessage (hwndcheck, BM_GETCHECK, 0, 0);
if(check == 1)
{
ShowWindow(hwndRadio3,SW_SHOW);
ShowWindow(hwndRadio4,SW_SHOW);

}
if(check == 0)
{
ShowWindow(hwndRadio3,SW_HIDE);
ShowWindow(hwndRadio4,SW_HIDE);

}

return TRUE;
case ID_RED:
iRed = SendMessage (hwndRadio3, BM_GETCHECK, 0, 0);
iGreen=0;

return TRUE;
case ID_GREEN:
iGreen = SendMessage (hwndRadio4, BM_GETCHECK, 0, 0);
iRed=0;

return TRUE;


case ID_BUTTON:

int LEN = 100;
TCHAR ARR[100];
std::wstring MIX;
std::wstring TSquare1;
std::wstring TCircle1;
std::wstring TRed1;
std::wstring TGreen1;

shape=0;
color=0;
/*iCurrectcheck=check ;*/
GetDlgItemText(g_hwnd, ID_EDIT,(LPWSTR)ARR, LEN);

STR = ARR;
if(iSquare==1)
{
shape=1;
iCircle=0;
TSquare1 = TEXT (" Square") ;
}
else if(iCircle==1)
{
shape =2;
iSquare=0;
TCircle1 = TEXT (" Circle") ;
}
if(iRed==1)
{
color=1;
iGreen=0;
if(check==1)
TRed1 = TEXT (" Red Color") ;
}
else if(iGreen==1)
{
color =2;
iRed=0;
if(check==1)
TGreen1 = TEXT (" Green Color") ;
}
MIX = STR +L" Size" + TRed1 + TGreen1+ TSquare1 + TCircle1 ;
LPCWSTR Insert = &MIX[0];
SendMessage (hListBox, LB_ADDSTRING, 0,(LPARAM)Insert);
PaintTheBlock(hCtrlBlock, STR, shape, color,check);
EndDialog (g_hwnd, TRUE) ;
return TRUE;
}
return 0 ;
case WM_CLOSE:
DefWindowProc(g_hwnd,nMessage,wp,lp);
g_hwnd = NULL;
return 0;
default:
return DefWindowProc(hwnd,nMessage,wp,lp);
}
}
LRESULT _stdcall EditProc (HWND g_hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
return CallWindowProc (OldEdit, g_hwnd, message, wParam,
lParam) ;
}

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Win32API Interview Questions

Explain Win32 Program Execution flow?

0 Answers  


explain WM_PAINT message ?????

0 Answers  


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??

2 Answers  


to take three string inputs in a two dimensional array of 3 rows and 15 columns and write a function that prints them.

0 Answers  


what is the stack size in win 32 program

0 Answers  






what API used to hide window

2 Answers  


How to load Bitmap at Dialogbakground in an MFC application?

1 Answers   SunSoft Technologies,


how radio button is active in dialog box?

1 Answers  


Function entry for DLL in win3.1

3 Answers  


describe process of creating a new class of windows ??

1 Answers  


Hi All, i got through he h1b Lotreey in india. US staming in the consulate is pendding . i applied from india for H1b but currently i am in germany for 1 year .i wanted to know can i attend the interview in germany.

1 Answers   MultiVision,


In Win32 application can we use CString datatype?

4 Answers  


Categories