我的代码如下。
OPENFILENAMEA open;
ZeroMemory(&open, sizeof(open));
open.lStructSize = sizeof(LPOPENFILENAMEA);
open.lpstrFilter = "Képek\0*.jpg;*.jpeg;*.gif;*.png;*.bmp\0\0";
open.nFileOffset = 1;
open.lpstrFile[0] = '\0';
open.nMaxFile = 2048;
open.lpstrTitle = "Képek kiválasztása..";
open.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST;
OPENFILENAME selected = GetOpenFileName(open);
我的问题是,我在尝试构建时收到以下错误:
error: cannot convert 'OPENFILENAME {aka tagOFNA}' to 'LPOPENFILENAMEA {aka tagOFNA*}' for argument '1' to 'BOOL GetOpenFileNameA(LPOPENFILENAMEA)'
当我打电话时GetOpenFileName
如果我用 open 参数作为 ptr 调用它,GetOpenFileName(&open)
我会得到以下信息error: conversion from 'BOOL {aka int}' to non-scalar type 'OPENFILENAME {aka tagOFNA}' requested
问题:做什么?