All pastes #278523 Raw Edit

Untitled

public cpp v1 · immutable
·published 2006-12-14 03:59 UTC
rendered paste body
// TestWMI.cpp : Defines the entry point for the application.//#include "stdafx.h"#include "TestWMI.h"#include "commctrl.h"#include "WinDef.h"#define MAX_LOADSTRING 100INT_PTR CALLBACK        MainWindow(HWND, UINT, WPARAM, LPARAM);INT_PTR CALLBACK		Tab1(HWND, UINT, WPARAM, LPARAM);struct TabDialog {	HRSRC	rsResrouce;	int		iResSize;};int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){	InitCommonControls();	DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAINWINDOW), NULL, MainWindow); }INT_PTR CALLBACK MainWindow(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){        UNREFERENCED_PARAMETER(lParam);        switch (message)        {        case WM_INITDIALOG:                			TCITEM tab1;						tab1.mask = TCIF_TEXT;			tab1.pszText = L"Target";			tab1.lParam = MAKEINTRESOURCE(IDD_TAB1);						TabCtrl_InsertItem(GetDlgItem(hDlg, IDC_TAB1), 0, & tab1);			return (INT_PTR)TRUE;         case WM_CLOSE:                        			MessageBoxA(hDlg, "Close!", "Closing!", MB_OK);			EndDialog(hDlg, LOWORD(wParam));            PostQuitMessage(0);            return (INT_PTR)TRUE;        }        return (INT_PTR)FALSE;} INT_PTR CALLBACK Tab1(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){	UNREFERENCED_PARAMETER(lParam);	switch (message)	{		case WM_INITDIALOG:			return (INT_PTR)TRUE;		case WM_CLOSE:			EndDialog(hDlg, LOWORD(wParam));			return (INT_PTR)TRUE;	}	return (INT_PTR)FALSE;}