All pastes #12709 Raw Edit

tm

public text v1 · immutable
#12709 ·published 2005-05-26 15:49 UTC
rendered paste body
#include "windows.h"

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
OPENFILENAME ofn;
char FileName[80] = "";

ZeroMemory(&ofn, sizeof(ofn));

ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = 0;
ofn.lpstrFilter = "All Files (*.*)\0*.*\0";
ofn.lpstrFile = FileName;
ofn.nMaxFile = 80;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT;

if (GetOpenFileName(&ofn)) {
	MessageBox(GetActiveWindow(), FileName, "Caption :)", MB_OK);
}
else
{
	MessageBox(GetActiveWindow(), "FAILED!", "Caption :)", MB_OK);
}

}