`
lobin
  • 浏览: 417501 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Windows Win32编程

 
阅读更多
写道

 

写道

 

写道

 

事件

 

窗口事件

 

键盘事件

WM_LBUTTONDOWN

鼠标左键按下产生的事件

#include <stdio.h>
#include <windows.h>

#include "window.h"

LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
  PAINTSTRUCT ps;
  HDC hDC;

  switch (uMsg) 
  {
    case WM_CREATE:
    {
      printf("[WM_CREATE] \n");
      break;
    }
    
    case WM_SIZE:
    {
      break;
    }
    case WM_VSCROLL:
    {
      break;
    }
    case WM_MOVE:
    {
      printf("[WM_MOVE] \n");
      break;
    }
    
    case WM_LBUTTONDOWN: 
    {
      HPEN hPen;

      printf("[WM_LBUTTONDOWN] \n");
      hDC = GetDC(hWnd);
      hPen = CreatePen(PS_SOLID, 10, RGB(255, 0, 0));
      HGDIOBJ hGdiPen = SelectObject(hDC, hPen);

      MoveToEx(hDC, LOWORD (lParam), HIWORD (lParam), NULL);
      LineTo(hDC, LOWORD (lParam), HIWORD (lParam));

      SelectObject(hDC, hGdiPen);
      DeleteObject(hPen);
      ReleaseDC(hWnd, hDC);

      break;
    }
    case WM_COMMAND:
      printf("[WM_COMMAND] \n");
      break;
    case WM_ERASEBKGND:
    {
      printf("[WM_ERASEBKGND] \n");
      return DefWindowProc(hWnd, uMsg, wParam, lParam);
      break;
    }
    case WM_PAINT:
    {
      printf("[WM_PAINT] \n");

      hDC = BeginPaint(hWnd, &ps);
      

      EndPaint(hWnd, &ps);
      break;
    }
    case WM_DESTROY:
      printf("[WM_DESTROY] \n");

      
      PostQuitMessage(0);
      printf("Goodbye!.\n");
      break;
    default:
      return DefWindowProc(hWnd, uMsg, wParam, lParam);
  }
  return 0;
}

int main(int argc, char *argv[])
{
  HMODULE hModule;

  LPCTSTR hWndCls;
  HWND hWnd;

  int nCmdShow  = SW_SHOW;

  MSG msg;

  hModule = GetModuleHandle(NULL);
  if (hModule == NULL)
  {
    DWORD error = GetLastError();
    printf("GetModuleHandle err=%d\n", error);
    return -1;
  }

  hWndCls = register_window_class(hModule, NULL, WindowProc);
  

  hWnd = CreateWindow(hWndCls, TEXT("主窗口"), WS_BORDER | WS_SIZEBOX /* styles */, 0, 0, 500, 500, NULL, NULL, hModule, NULL);
  if (! hWnd)
  {
    DWORD error = GetLastError();
    printf("CreateWindow err=%d\n", error);
    return -1;
  }

  ShowWindow(hWnd, nCmdShow);

  UpdateWindow(hWnd);

  while (GetMessage(&msg, NULL, 0, 0)) 
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  printf("exit.\n");
  return 0;
}

 

 

绘图

画点

#include <stdio.h>
#include <windows.h>

#include "window.h"

LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
  PAINTSTRUCT ps;
  HDC hDC;

  switch (uMsg) 
  {
    case WM_CREATE:
    {
      printf("[WM_CREATE] \n");
      
      break;
    }
    case WM_SIZE:
    {
      break;
    }
    case WM_VSCROLL:
    {

    }
    case WM_COMMAND:
      printf("[WM_COMMAND] \n");
      break;
    case WM_PAINT:
    {
      int i, j;
      RECT rc;

      printf("[WM_PAINT] \n");
      
      GetClientRect(hWnd, &rc);

      hDC = BeginPaint(hWnd, &ps);
      for (i = rc.top; i < rc.bottom; i += 10)
      {
        for (j = rc.left; j < rc.right; j+=10)
        {
          SetPixel(hDC, j, i, RGB(255, 0, 0));
        }
      }
      EndPaint(hWnd, &ps);
      break;
    }
    case WM_DESTROY:
      printf("[WM_DESTROY] \n");

      
      PostQuitMessage(0);
      printf("Goodbye!.\n");
      break;
    default:
      return DefWindowProc(hWnd, uMsg, wParam, lParam);
  }
  return 0;
}

int main(int argc, char *argv[])
{
  HMODULE hModule;

  LPCTSTR hWndCls;
  HWND hWnd;

  int nCmdShow  = SW_SHOW;

  MSG msg;

  hModule = GetModuleHandle(NULL);
  if (hModule == NULL)
  {
    DWORD error = GetLastError();
    printf("GetModuleHandle err=%d\n", error);
    return -1;
  }

  hWndCls = register_window_class(hModule, NULL, WindowProc);
  

  hWnd = CreateWindow(hWndCls, TEXT("主窗口"), WS_BORDER | WS_SIZEBOX /* styles */, 0, 0, 500, 500, NULL, NULL, hModule, NULL);
  if (! hWnd)
  {
    DWORD error = GetLastError();
    printf("CreateWindow err=%d\n", error);
    return -1;
  }

  ShowWindow(hWnd, nCmdShow);

  UpdateWindow(hWnd);

  while (GetMessage(&msg, NULL, 0, 0)) 
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  printf("exit.\n");
  return 0;
}

 

#include <stdio.h>
#include <windows.h>

#include "window.h"

LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
  PAINTSTRUCT ps;
  HDC hDC;

  switch (uMsg) 
  {
    case WM_CREATE:
    {
      printf("[WM_CREATE] \n");
      
      break;
    }
    case WM_SIZE:
    {
      break;
    }
    case WM_VSCROLL:
    {

    }
    case WM_COMMAND:
      printf("[WM_COMMAND] \n");
      break;
    case WM_PAINT:
    {
      int i, j;
      RECT rc;

      HPEN hPen;
      HGDIOBJ hGdiPen;

      printf("[WM_PAINT] \n");

      GetClientRect(hWnd, &rc);

      hDC = BeginPaint(hWnd, &ps);
      hPen = CreatePen(PS_SOLID, 5, RGB(255, 0, 0));
      hGdiPen = SelectObject(hDC, hPen);

      for (i = rc.top; i < rc.bottom; i += 10)
      {
        for (j = rc.left; j < rc.right; j += 10)
        {
          MoveToEx(hDC, j, i, NULL);
          LineTo(hDC, j, i);
        }
      }

      SelectObject(hDC, hGdiPen);
      DeleteObject(hPen);
      EndPaint(hWnd, &ps);
      break;
    }
    case WM_DESTROY:
      printf("[WM_DESTROY] \n");

      
      PostQuitMessage(0);
      printf("Goodbye!.\n");
      break;
    default:
      return DefWindowProc(hWnd, uMsg, wParam, lParam);
  }
  return 0;
}

int main(int argc, char *argv[])
{
  HMODULE hModule;

  LPCTSTR hWndCls;
  HWND hWnd;

  int nCmdShow  = SW_SHOW;

  MSG msg;

  hModule = GetModuleHandle(NULL);
  if (hModule == NULL)
  {
    DWORD error = GetLastError();
    printf("GetModuleHandle err=%d\n", error);
    return -1;
  }

  

  hWndCls = register_window_class(hModule, NULL, WindowProc);
  

  hWnd = CreateWindow(hWndCls, TEXT("主窗口"), WS_BORDER | WS_SIZEBOX /* styles */, 0, 0, 500, 500, NULL, NULL, hModule, NULL);
  if (! hWnd)
  {
    DWORD error = GetLastError();
    printf("CreateWindow err=%d\n", error);
    return -1;
  }

  ShowWindow(hWnd, nCmdShow);

  UpdateWindow(hWnd);

  while (GetMessage(&msg, NULL, 0, 0)) 
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  printf("exit.\n");
  return 0;
}

 

 

正弦曲线

#include <stdio.h>
#include <math.h>
#include <windows.h>

#include "window.h"

#define PI 3.14159265

LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
  PAINTSTRUCT ps;
  HDC hDC;

  switch (uMsg) 
  {
    case WM_CREATE:
    {
      printf("[WM_CREATE] \n");
      
      break;
    }
    case WM_SIZE:
    {
      break;
    }
    case WM_VSCROLL:
    {

    }
    case WM_COMMAND:
      printf("[WM_COMMAND] \n");
      break;
    case WM_PAINT:
    {
      int i;
      RECT rc;

      HPEN hPen;
      HGDIOBJ hGdiPen;

      printf("[WM_PAINT] \n");

      GetClientRect(hWnd, &rc);

      hDC = BeginPaint(hWnd, &ps);
      hPen = CreatePen(PS_SOLID, 3, RGB(255, 0, 0));
      hGdiPen = SelectObject(hDC, hPen);

      MoveToEx(hDC, 0, (rc.bottom - rc.top) / 2, NULL);
      LineTo(hDC, rc.right, (rc.bottom - rc.top) / 2);

      MoveToEx(hDC, (rc.right - rc.left) / 2, 0, NULL);
      LineTo(hDC, (rc.right - rc.left) / 2, rc.bottom);

      for (i = -(rc.right - rc.left) / 2; i <= (rc.right - rc.left) / 2; i++)
      {
        int x, y;
        double c = sin(i * PI / 180.0);
        int j = 100 * c;
        //printf("x=%d, y=%d, c=%llf\n", i, j, c);

        x = i + (rc.right - rc.left) / 2;
        y = -j + (rc.bottom - rc.top) / 2;

        //SetPixel(hDC, x, y, RGB(255, 0, 0));
        MoveToEx(hDC, x, y, NULL);
        LineTo(hDC, x, y);
      }

      SelectObject(hDC, hGdiPen);
      DeleteObject(hPen);
      EndPaint(hWnd, &ps);
      break;
    }
    case WM_DESTROY:
      printf("[WM_DESTROY] \n");

      
      PostQuitMessage(0);
      printf("Goodbye!.\n");
      break;
    default:
      return DefWindowProc(hWnd, uMsg, wParam, lParam);
  }
  return 0;
}

int main(int argc, char *argv[])
{
  HMODULE hModule;

  LPCTSTR hWndCls;
  HWND hWnd;

  int nCmdShow  = SW_SHOW;

  MSG msg;

  hModule = GetModuleHandle(NULL);
  if (hModule == NULL)
  {
    DWORD error = GetLastError();
    printf("GetModuleHandle err=%d\n", error);
    return -1;
  }

  

  hWndCls = register_window_class(hModule, NULL, WindowProc);
  

  hWnd = CreateWindow(hWndCls, TEXT("主窗口"), WS_BORDER | WS_SIZEBOX /* styles */, 0, 0, 900, 500, NULL, NULL, hModule, NULL);
  if (! hWnd)
  {
    DWORD error = GetLastError();
    printf("CreateWindow err=%d\n", error);
    return -1;
  }

  ShowWindow(hWnd, nCmdShow);

  UpdateWindow(hWnd);

  while (GetMessage(&msg, NULL, 0, 0)) 
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  printf("exit.\n");
  return 0;
}

 

余弦曲线

#include <stdio.h>
#include <math.h>
#include <windows.h>

#include "window.h"

#define PI 3.14159265

LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
  PAINTSTRUCT ps;
  HDC hDC;

  switch (uMsg) 
  {
    case WM_CREATE:
    {
      printf("[WM_CREATE] \n");
      
      break;
    }
    case WM_SIZE:
    {
      break;
    }
    case WM_VSCROLL:
    {

    }
    case WM_COMMAND:
      printf("[WM_COMMAND] \n");
      break;
    case WM_PAINT:
    {
      int i;
      RECT rc;

      HPEN hPen;
      HGDIOBJ hGdiPen;

      printf("[WM_PAINT] \n");

      GetClientRect(hWnd, &rc);

      hDC = BeginPaint(hWnd, &ps);
      hPen = CreatePen(PS_SOLID, 3, RGB(255, 0, 0));
      hGdiPen = SelectObject(hDC, hPen);

      MoveToEx(hDC, 0, (rc.bottom - rc.top) / 2, NULL);
      LineTo(hDC, rc.right, (rc.bottom - rc.top) / 2);

      MoveToEx(hDC, (rc.right - rc.left) / 2, 0, NULL);
      LineTo(hDC, (rc.right - rc.left) / 2, rc.bottom);

      for (i = -(rc.right - rc.left) / 2; i <= (rc.right - rc.left) / 2; i++)
      {
        int x, y;
        double c = cos(i * PI / 180.0);
        int j = 100 * c;
        //printf("x=%d, y=%d, c=%llf\n", i, j, c);

        x = i + (rc.right - rc.left) / 2;
        y = -j + (rc.bottom - rc.top) / 2;

        //SetPixel(hDC, x, y, RGB(255, 0, 0));
        MoveToEx(hDC, x, y, NULL);
        LineTo(hDC, x, y);
      }

      SelectObject(hDC, hGdiPen);
      DeleteObject(hPen);
      EndPaint(hWnd, &ps);
      break;
    }
    case WM_DESTROY:
      printf("[WM_DESTROY] \n");

      
      PostQuitMessage(0);
      printf("Goodbye!.\n");
      break;
    default:
      return DefWindowProc(hWnd, uMsg, wParam, lParam);
  }
  return 0;
}

int main(int argc, char *argv[])
{
  HMODULE hModule;

  LPCTSTR hWndCls;
  HWND hWnd;

  int nCmdShow  = SW_SHOW;

  MSG msg;

  hModule = GetModuleHandle(NULL);
  if (hModule == NULL)
  {
    DWORD error = GetLastError();
    printf("GetModuleHandle err=%d\n", error);
    return -1;
  }

  

  hWndCls = register_window_class(hModule, NULL, WindowProc);
  

  hWnd = CreateWindow(hWndCls, TEXT("主窗口"), WS_BORDER | WS_SIZEBOX /* styles */, 0, 0, 900, 500, NULL, NULL, hModule, NULL);
  if (! hWnd)
  {
    DWORD error = GetLastError();
    printf("CreateWindow err=%d\n", error);
    return -1;
  }

  ShowWindow(hWnd, nCmdShow);

  UpdateWindow(hWnd);

  while (GetMessage(&msg, NULL, 0, 0)) 
  {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
  }

  printf("exit.\n");
  return 0;
}

 

WinMain

 

Windows平台下Win32应用程序的入口, 就类似C/C++的入口函数int main(int argc, char*  argv[]).

 

该入口函数原型定义在WINBASE.H头文件中定义如下:

#ifndef _MAC
int
WINAPI
#else
int
CALLBACK
#endif
WinMain(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd
    );

 

Parameters

hInstance [in]

Type: HINSTANCE

A handle to the current instance of the application.

hPrevInstance [in]

Type: HINSTANCE

A handle to the previous instance of the application. This parameter is always NULL . If you need to detect whether another instance already exists, create a uniquely named mutex using the CreateMutex function. CreateMutex will succeed even if the mutex already exists, but the function will return ERROR_ALREADY_EXISTS . This indicates that another instance of your application exists, because it created the mutex first. However, a malicious user can create this mutex before you do and prevent your application from starting. To prevent this situation, create a randomly named mutex and store the name so that it can only be obtained by an authorized user. Alternatively, you can use a file for this purpose. To limit your application to one instance per user, create a locked file in the user's profile directory.

lpCmdLine [in]

Type: LPSTR

The command line for the application, excluding the program name. To retrieve the entire command line, use the GetCommandLine function.

nCmdShow [in]

Type: int

Controls how the window is to be shown. This parameter can be one of the following values.

Value Meaning
SW_HIDE
0

Hides the window and activates another window.

SW_MAXIMIZE
3

Maximizes the specified window.

SW_MINIMIZE
6

Minimizes the specified window and activates the next top-level window in the Z order.

SW_RESTORE
9

Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window.

SW_SHOW
5

Activates the window and displays it in its current size and position.

SW_SHOWMAXIMIZED
3

Activates the window and displays it as a maximized window.

SW_SHOWMINIMIZED
2

Activates the window and displays it as a minimized window.

SW_SHOWMINNOACTIVE
7

Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED , except the window is not activated.

SW_SHOWNA
8

Displays the window in its current size and position. This value is similar to SW_SHOW , except the window is not activated.

SW_SHOWNOACTIVATE
4

Displays a window in its most recent size and position. This value is similar to SW_SHOWNORMAL , except the window is not activated.

SW_SHOWNORMAL
1

Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.

 

Return value

Type:

Type: int

If the function succeeds, terminating when it receives a WM_QUIT message, it should return the exit value contained in that message's wParam parameter. If the function terminates before entering the message loop, it should return zero.

Remarks

The name WinMain is used by convention by many programming frameworks. Depending on the programming framework, the call to the WinMain function can be preceded and followed by additional activities specific to that framework.

Your WinMain should initialize the application, display its main window, and enter a message retrieval-and-dispatch loop that is the top-level control structure for the remainder of the application's execution. Terminate the message loop when it receives a WM_QUIT message. At that point, your WinMain should exit the application, returning the value passed in the WM_QUIT message's wParam parameter. If WM_QUIT was received as a result of calling PostQuitMessage , the value of wParam is the value of the PostQuitMessage function's nExitCode parameter. For more information, see Creating a Message Loop .

ANSI applications can use the lpCmdLine parameter of the WinMain function to access the command-line string, excluding the program name. Note that lpCmdLine uses the LPSTR data type instead of the LPTSTR data type. This means that WinMain cannot be used by Unicode programs. The GetCommandLineW function can be used to obtain the command line as a Unicode string. Some programming frameworks might provide an alternative entry point that provides a Unicode command line. For example, the Microsoft Visual Studio C++ complier uses the name wWinMain for the Unicode entry point.

Requirements

Minimum supported client

Minimum supported server

Header

Windows 2000 Professional
Windows 2000 Server
Winbase.h (include Windows.h)

 

有关WinMain入口函数可参考http://msdn.microsoft.com/en-us/library/ms633559%28VS.85%29.aspx

 

 

 

 

 

HINSTANCE

 

WTYPES.H头文件中定义如下:

 

typedef void __RPC_FAR *HINSTANCE;

 

HINSTANCE是“句柄型”数据类型, 从WTYPES.H中定义来看, 它其实就是一个void的指针类型void *. HINSTANCE在使用有其特殊的含义, 跟void *的应用不同, 它是作为程序运行实例(当前实例, 就类似于进程)的一个句柄.

 

在编写Win32应用程序时, 其入口函数:

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)

的第一个参数就是HINSTANCE实例. 从这里可以看出, 这个句柄类型的实例从程序启动时传入, 貌似系统会自动为你生成这样一个实例ID, 不需要由开发者在程序中自己创建.

 

 

句柄

HANDLE

 

Win32应用程序

 

界面开发

 

 

线程

线程ID

线程ID可以通过GetCurrentThreadId()获取。

 

线程句柄

创建线程时返回的一个线程句柄。用于指向内部创建的线程对象。

 

CreateThread

 

写道
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes,
SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress,
__drv_aliasesMem LPVOID lpParameter,
DWORD dwCreationFlags,
LPDWORD lpThreadId
);

 

lpStartAddress

 

写道
DWORD WINAPI ThreadProc(
_In_ LPVOID lpParameter
);

 

DWORD start_address(LPVOID args) 
{
  char * name = (char *) args;
  printf("%d(%u)-%u thread %s\n", getpid(), GetCurrentProcessId(), GetCurrentThreadId(), name);
  return 0;
}
   
int main()  
{
  HANDLE handle;
  DWORD thread;
  handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) start_address, (LPVOID) "1", 0, &thread);
  printf("thread id: %u\n", thread);

  ExitThread(0);  
  return 0;  
}

"D:\usr\bin\Microsoft Visual Studio\VC98\Bin\cl.exe" /GX /W3 /MT /I "D:\usr\bin\Microsoft Visual Studio\VC98\Include" /c /Fo./ CreateThread_test.c

"D:\usr\bin\Microsoft Visual Studio\VC98\Bin\link.exe" /LIBPATH:"D:\usr\bin\Microsoft Visual Studio\VC98\Lib" /OUT:./CreateThread_test.exe ./CreateThread_test.obj

 

获取线程返回退出状态

DWORD start_address(LPVOID args) 
{
  DWORD exit_code = (DWORD) args;
  printf("%d(%u)-%u thread exit(%d)\n", getpid(), GetCurrentProcessId(), GetCurrentThreadId(), exit_code);
  return exit_code;
}
   
int main()  
{
  HANDLE handle;
  DWORD thread;

  DWORD exit_code = 0;
  handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) start_address, (LPVOID) 100, 0, &thread);

  GetExitCodeThread(handle, &exit_code);
  printf("thread id: %u, exit(%d)\n", thread, exit_code);

  ExitThread(0);  
  return 0;  
}

在上面的程序中,在调用GetExitCodeThread获取线程退出状态时可能线程还没有退出结束。这个时候线程还处于STILL_ACTIVE状态。

 

DWORD start_address(LPVOID args) 
{
  DWORD exit_code = (DWORD) args;
  printf("%d(%u)-%u thread exit(%d)\n", getpid(), GetCurrentProcessId(), GetCurrentThreadId(), exit_code);
  return exit_code;
}
   
int main()  
{
  HANDLE handle;
  DWORD thread;

  DWORD exit_code = 0;
  handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) start_address, (LPVOID) 100, 0, &thread);

  while (1)
  {
    GetExitCodeThread(handle, &exit_code);
    printf("thread id: %u, exit(%d)\n", thread, exit_code);
	if (exit_code != STILL_ACTIVE)
	{
      break;
	}
  }
  

  ExitThread(0);  
  return 0;  
}

 

通过WaitForSingleObject等待线程退出结束。

DWORD start_address(LPVOID args) 
{
  DWORD exit_code = (DWORD) args;
  printf("%d(%u)-%u thread exit(%d)\n", getpid(), GetCurrentProcessId(), GetCurrentThreadId(), exit_code);
  return exit_code;
}
   
int main()  
{
  HANDLE handle;
  DWORD thread;

  DWORD exit_code = 0;
  handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) start_address, (LPVOID) 100, 0, &thread);

  WaitForSingleObject(handle, INFINITE);

  GetExitCodeThread(handle, &exit_code);
  printf("thread id: %u, exit(%d)\n", thread, exit_code);

  ExitThread(0);  
  return 0;  
}

 

"D:\usr\bin\Microsoft Visual Studio\VC98\Bin\cl.exe" /GX /W3 /MT /I "D:\usr\bin\Microsoft Visual Studio\VC98\Include" /c /Fo./ GetExitCodeThread_test.c

"D:\usr\bin\Microsoft Visual Studio\VC98\Bin\link.exe" /LIBPATH:"D:\usr\bin\Microsoft Visual Studio\VC98\Lib" /OUT:./GetExitCodeThread_test.exe ./GetExitCodeThread_test.obj

 

0
1
分享到:
评论

相关推荐

    WIN32编程电子书

    《WIN32编程电子书》是一份专注于介绍Windows操作系统下WIN32 API编程技术的资料。这份电子书详细阐述了如何在Windows环境下进行系统级别的编程,涵盖了从基础概念到高级应用的广泛内容。针对初学者和有经验的开发者...

    win32编程学习笔记

    Win32编程是一种在Microsoft Windows操作系统平台上进行应用程序开发的技术,主要使用C++语言,并依赖Windows API(应用程序接口)来实现各种功能。这个“win32编程学习笔记”可能包含了关于如何构建、理解和调试Win...

    Win32编程基础知识

    Win32编程基础知识是构建Windows应用程序的核心,尤其对初学者来说,理解这些概念至关重要。Win32 API(应用程序接口)提供了直接与操作系统交互的手段,允许开发者创建各种复杂的应用程序。以下将详细阐述Win32编程...

    WIndows编程--第一个Win32示例程序

    阅读对象:希望学习Win32编程的人员。 目的:如果需要理解MFC框架,或者需要使用Win32技术编程的人员,那么可以仔细阅读该示例。本人注释非常详细,当然因为我是一个专业的Java程序员,所以书写风格在遵守Windows...

    WIN32编程帮助文件

    WIN32编程是Windows操作系统平台下进行软件开发的基础,它主要涉及到Windows API(应用程序接口)的使用。API是一组预定义的函数、常量、结构体和枚举,供开发者在编写应用程序时调用,以实现与操作系统交互。在本...

    Win32编程基础知识__200

    Win32编程是指在Microsoft Windows操作系统上使用API(应用程序接口)进行程序开发的一种方式。Win32 API是Windows操作系统提供的一组函数集合,它提供了操作系统的底层访问功能,如创建窗口、处理消息、管理内存等...

    微软Win32编程指南(HLP格式)

    综上所述,《微软Win32编程指南》涵盖了Windows平台开发的方方面面,从基础的窗口和消息处理到复杂的进程线程管理,从图形显示到网络通信,都是开发者必须掌握的知识点。通过深入学习这份指南,开发者将能够驾驭Win...

    Win32xx 870_Windows编程_win32xx_

    《深入探索Win32xx:Windows编程的基石》 Win32xx,作为一个Windows编程库,是对于原生Win32 API的一种高级封装,旨在提供更简洁、易用的接口,使得开发者能够更加高效地进行Windows应用程序的开发。标题中的"870...

    Win32编程实现简单计算器

    在计算机编程领域,Win32 API(应用程序接口)是一种用于创建Windows桌面应用程序的底层接口,由微软提供。本文将深入探讨如何使用Win32编程来实现一个简单的计算器应用,这将涉及窗口创建、消息处理、用户输入响应...

    win32 编程时钟(clock)

    在Windows编程环境中,Win32 API(应用程序接口)是一个用于创建桌面应用的底层接口,它提供了丰富的功能,包括创建窗口、处理消息、绘制图形等。本文将深入探讨如何使用Win32 API来实现一个具有指针和立体阴影效果...

    win32核心编程课件

    本课程专为对Windows编程感兴趣的初学者和经验丰富的开发者设计,旨在深入理解并掌握Win32编程技术。 在Windows环境下,Win32 API提供了丰富的功能,包括窗口管理、消息处理、图形设备接口(GDI)、内存管理、进程...

    我的拼图游戏(WIN32编程)

    "我的拼图游戏(WIN32编程)"是一款基于Windows操作系统平台开发的本地应用程序,它利用了Microsoft Windows API(应用程序接口)进行编程,也就是我们常说的WIN32 API。这款拼图游戏展示了如何使用C++语言和WIN32 ...

    win32编程的中点画圆算法

    "win32编程的中点画圆算法"是计算机图形学中的经典案例,它结合了Win32 API和数学算法,为开发者提供了一种在Windows环境中绘制圆形的方法。理解并掌握这一算法有助于深入学习图形编程和Windows系统底层机制。通过...

    Windows经典编程 第四版_win32_

    《Windows经典编程 第四版_win32》是微软平台开发领域的权威著作,由著名技术专家Jeffrey Richter撰写。本书详细介绍了如何利用Win32 API进行Windows应用程序开发,旨在帮助开发者深入理解Windows操作系统的工作原理...

    win32核心编程

    《Win32核心编程》是深入理解Windows操作系统底层机制的重要学习资源,主要涵盖了Windows API的基础、消息机制、控件操作、菜单应用、动态链接库(DLL)的使用以及多线程同步访问技术等多个方面。这些内容构成了...

    Win32编程设计一个功能及界面风格类似于Windows计算器的计算器程序

    说明: 希望大家不要直接用这个做课设,该程序以及报告仅供大家参考,希望对同学们的学习有...1.WIN32汇编程序编写。 2.用汇编实现简单的算法。 3.浮点数运算(浮点指令或者自己编程模拟)。 4.综合解决问题的能力。

    win32编程高级培训--侯捷

    根据给定文件的信息,我们可以...综上所述,侯捷先生的Win32编程高级培训资料深入探讨了Win32编程的核心概念和技术,不仅适合有一定编程基础的学习者,也为希望深入了解Windows应用程序开发的开发者提供了宝贵的参考。

    win32 sdk 编程

    Win32 SDK编程是Windows操作系统平台上进行底层程序开发的核心技术之一。它提供了丰富的API函数,使得程序员可以直接与操作系统交互,创建高效、灵活的应用程序。在本文中,我们将深入探讨Win32 SDK编程的基础知识,...

    WIN32编程的C++例子源码.rar_WIN32编程的C++例子源码_win32 开发 下载_win32 源码

    【标题】"WIN32编程的C++例子源码.rar"是一个包含C++源代码的压缩包,专门针对Windows 32位平台的编程实践。这个压缩包旨在为学习和理解WIN32 API编程的开发者提供实例参考,帮助他们在实践中掌握相关技能。 【描述...

Global site tag (gtag.js) - Google Analytics