什么是SDK的编程方式?如何通过delphi进行SDK编程?SDK编程有何好处?该看什么书?该使用什么工具?
解决方案 »
- 关于线程的问题?
- Delphi6中BDE,ADO組件系列不見了,怎麼解決, 求救!
- 软件接口费用----求教
- 有人做过旅游管理系统的?
- 如何通过BDE读取ini文件实现sql2000的动态数据库连接?--附流程
- 将一长串(比如18位的身份证号码)数字倒换到excel中,为什么变成指数(我需要的是字符串),怎么解决?
- 高分求解一小段简单的代码!
- 有时候感觉用delphi编程不是很爽,没有成就感!
- dll中调用dll,内存狂涨的问题!
- 怎样不让我的程序在系统对话框中看到
- 如何实现带参数的程序,比如像dir /?可以自动识别参数'/?'调用不同的处理函数
- 怎样将Edit里面第二和第三个字符strtoint
delphi进行SDK编程就是调用API
delphi开发环境就可以,只要不用vcl,纯粹的API调用,语法是pascal
begin
messagebox(handle,'你好',MB_ok+MB_ICONINFORMATION)
end;
messagebox是API函数 这样就是
┏━★━━◆━━★━┓
♂欢|◢CSDN◣|使♂ ▲自由保存帖子,浏览,关注检测
┃迎|◥论坛助手◤|用┃ ▲完善的CSDN客户端工具
┗━☆━━◇━━━☆┛ ▲自动添加签名......让你更快,更爽,更方便地上CSDN...
http://www.csdn.net/expert/topic/573/573604.xml
http://www.chinaok.net/csdn/csdn.zip
HELLOWIN---Displays "Hello Windows2000!" in client area
(c) yexiong, 2001
--------------------------------------------------------*/#include <windows.h>LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine,int iCmdShow)
{
static TCHAR szAppName[]=TEXT("HelloWin");
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
wndclass.style =CS_HREDRAW|CS_VREDRAW;
wndclass.lpfnWndProc =WndProc;
wndclass.cbClsExtra =0;
wndclass.cbWndExtra =0;
wndclass.hInstance =hInstance;
wndclass.hIcon =LoadIcon(NULL,IDI_APPLICATION);
wndclass.hCursor =LoadCursor(NULL,IDC_ARROW);
wndclass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
wndclass.lpszMenuName =NULL;
wndclass.lpszClassName=szAppName;if(!RegisterClass(&wndclass))
{
MessageBox(NULL,TEXT("This program requires Windows NT!"),szAppName,MB_ICONERROR); return 0;
}hwnd=CreateWindow(szAppName, //windows class name
TEXT("The Hello Program"), //windows caption
WS_OVERLAPPEDWINDOW, //windows style
CW_USEDEFAULT, //initial x position
CW_USEDEFAULT, //initial y position
CW_USEDEFAULT, //initial x size
CW_USEDEFAULT, //initial y size
NULL, //parent window handle
NULL, //window meun handle
hInstance, //program instance handle
NULL); //creation parameters ShowWindow(hwnd,iCmdShow);
UpdateWindow(hwnd); while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}LRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rect; switch(message)
{
case WM_CREATE:
PlaySound(TEXT("hellowin.wav"),NULL,SND_FILENAME|SND_ASYNC);
return 0;
case WM_PAINT:
hdc=BeginPaint(hwnd,&ps); GetClientRect(hwnd,&rect); DrawText(hdc,TEXT("Hello,Windows 2000!"),-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER);
EndPaint(hwnd,&ps);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd,message,wParam,lParam);
}
[email protected]
[email protected]