Click here to Skip to main content
15,906,567 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Make Program in VC++ to send E-mail Pin
valikac3-Jun-03 19:30
valikac3-Jun-03 19:30 
GeneralRe: Make Program in VC++ to send E-mail Pin
Anonymous3-Jun-03 22:53
Anonymous3-Jun-03 22:53 
GeneralRe: Make Program in VC++ to send E-mail Pin
valikac4-Jun-03 7:14
valikac4-Jun-03 7:14 
GeneralRe: Make Program in VC++ to send E-mail Pin
Axter3-Jun-03 21:06
professionalAxter3-Jun-03 21:06 
GeneralVC.NET in multiprocessor station Pin
Stormwind3-Jun-03 17:30
Stormwind3-Jun-03 17:30 
GeneralRe: VC.NET in multiprocessor station Pin
Mike Nordell4-Jun-03 3:32
Mike Nordell4-Jun-03 3:32 
Generala problem on Installshield for VC++ Pin
olinn3-Jun-03 17:23
olinn3-Jun-03 17:23 
GeneralWhy don't run the same programe code on vc++ compiler Pin
tomjacksun3-Jun-03 16:59
tomjacksun3-Jun-03 16:59 
Why don't run the same programe code on vc++ compiler,but it is run good on dev-c++ compiler. Frown | :(
The code is
#include "stdafx.h"
#include <windows.h>
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
char szClassName[ ] = "AltWind";
HWND hwnd;
MSG messages;
WNDCLASSEX wincl;
wincl.hInstance = hInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure;
wincl.style = CS_HREDRAW | CS_VREDRAW;
//wincl.cbSize = sizeof (WNDCLASSEX);
wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
//wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL;
wincl.cbClsExtra = 0;
wincl.cbWndExtra = 0;
wincl.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
if (!RegisterClassEx(&wincl))
{
MessageBox(NULL,TEXT("this program required windows nt!"),
szClassName,MB_ICONERROR);
return 0;
}
hwnd = CreateWindowEx(
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Windows App", /* Title Text */
WS_OVERLAPPEDWINDOW, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hInstance, /* Program Instance handler */
NULL);
ShowWindow (hwnd, nCmdShow);
UpdateWindow(hwnd);
while(GetMessage(&messages,NULL,0,0))
{
TranslateMessage(&messages);
DispatchMessage(&messages);
}
return messages.wParam;
}
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static POINT aptFigure[10]={10,70,50,70,50,10,90,10,90,50,
30,50,30,90,70,90,70,30,10,30};
static int cxClient,cyClient;
HDC hdc;
//RECT rect;
//GetClientRect(hwnd,&rect);
//cxClient = rect.right - rect.left;
//cyClient = rect.bottom - rect.top;
int i;
PAINTSTRUCT ps;
POINT apt[10];
//HPEN hPen;
switch (message)
{
case WM_SIZE:
cxClient = LOWORD(lParam);
cyClient = HIWORD(lParam);
return 0;
case WM_PAINT:
hdc = BeginPaint(hwnd,&ps);
SelectObject(hdc,GetStockObject(GRAY_BRUSH));
for (i=0;i<10;i++)
{
apt[i].x=cxClient * aptFigure[i].x/200;
apt[i].y=cyClient * aptFigure[i].y/100;
}
SetPolyFillMode(hdc,ALTERNATE);
Polygon(hdc,apt,10);
for(i = 0;i < 10; i++)
{
apt[i].x += cxClient/2;
}
SetPolyFillMode(hdc,WINDING);
Polygon(hdc,apt,10);
EndPaint(hwnd,&ps);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0 ;
}

I am like programiing
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 17:06
protectorChristian Graus3-Jun-03 17:06 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
sunjohn3-Jun-03 17:15
sunjohn3-Jun-03 17:15 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 17:17
protectorChristian Graus3-Jun-03 17:17 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
tomjacksun3-Jun-03 17:45
tomjacksun3-Jun-03 17:45 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 17:49
protectorChristian Graus3-Jun-03 17:49 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
tomjacksun3-Jun-03 17:49
tomjacksun3-Jun-03 17:49 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 17:50
protectorChristian Graus3-Jun-03 17:50 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
tomjacksun3-Jun-03 18:28
tomjacksun3-Jun-03 18:28 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
J. Dunlap3-Jun-03 18:34
J. Dunlap3-Jun-03 18:34 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
tomjacksun3-Jun-03 18:37
tomjacksun3-Jun-03 18:37 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 19:37
protectorChristian Graus3-Jun-03 19:37 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
sunjohn3-Jun-03 19:47
sunjohn3-Jun-03 19:47 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 19:53
protectorChristian Graus3-Jun-03 19:53 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Toni783-Jun-03 19:51
Toni783-Jun-03 19:51 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Christian Graus3-Jun-03 19:54
protectorChristian Graus3-Jun-03 19:54 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
Toni783-Jun-03 20:03
Toni783-Jun-03 20:03 
GeneralRe: Why don't run the same programe code on vc++ compiler Pin
sunjohn3-Jun-03 20:23
sunjohn3-Jun-03 20:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.