Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDirectX functions - Graphics card Pin
velayudhan_raj4-Jun-06 21:01
velayudhan_raj4-Jun-06 21:01 
AnswerRe: DirectX functions - Graphics card Please help me, Its URGENT Pin
velayudhan_raj4-Jun-06 22:20
velayudhan_raj4-Jun-06 22:20 
QuestionLooking for data structures for long integer Pin
George_George4-Jun-06 20:33
George_George4-Jun-06 20:33 
AnswerRe: Looking for data structures for long integer Pin
Maxwell Chen4-Jun-06 21:03
Maxwell Chen4-Jun-06 21:03 
GeneralRe: Looking for data structures for long integer Pin
George_George4-Jun-06 21:15
George_George4-Jun-06 21:15 
AnswerRe: Looking for data structures for long integer Pin
Maxwell Chen4-Jun-06 21:46
Maxwell Chen4-Jun-06 21:46 
GeneralRe: Looking for data structures for long integer Pin
George_George4-Jun-06 22:15
George_George4-Jun-06 22:15 
Questionopen file dialog Pin
iLL eFFect4-Jun-06 20:25
iLL eFFect4-Jun-06 20:25 
I am looking for Win32 support.
and i am trying to use GetOpenFileName.
The my code snippet is:

OPENFILENAME ofn;
char szFile[260];
HWND hwnd;
HANDLE hf;

ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
ofn.lpstrFile = (LPWSTR)szFile;
ofn.lpstrFile[0] = '\0';

ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter = (LPCWSTR)"All\0*.*\0Text\0*.TXT\0";
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

DWORD err;
if (GetSaveFileName (&ofn)==TRUE)
{
hf = CreateFile(ofn.lpstrFile, GENERIC_READ,0,
(LPSECURITY_ATTRIBUTES) NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,(HANDLE) NULL);
}
else
err = CommDlgExtendedError();



But i am returned with err = 0xFFFF .i.e.
CDERR_DIALOGFAILURE: The dialog box could not be created. The common dialog box function's call to the DialogBox function failed. For example, this error occurs if the common dialog box call specifies an invalid window handle.

Please help.

AnswerRe: open file dialog Pin
Hamid_RT4-Jun-06 20:37
Hamid_RT4-Jun-06 20:37 
GeneralRe: open file dialog Pin
iLL eFFect4-Jun-06 22:44
iLL eFFect4-Jun-06 22:44 
AnswerRe: open file dialog Pin
Viorel.4-Jun-06 20:53
Viorel.4-Jun-06 20:53 
QuestionShow struct contents in Notepad Pin
RajiRaghu4-Jun-06 19:33
RajiRaghu4-Jun-06 19:33 
AnswerRe: Show struct contents in Notepad Pin
_AnsHUMAN_ 4-Jun-06 19:43
_AnsHUMAN_ 4-Jun-06 19:43 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 19:51
RajiRaghu4-Jun-06 19:51 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 19:56
ThatsAlok4-Jun-06 19:56 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 20:00
RajiRaghu4-Jun-06 20:00 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 20:38
ThatsAlok4-Jun-06 20:38 
GeneralRe: Show struct contents in Notepad Pin
FarPointer4-Jun-06 20:59
FarPointer4-Jun-06 20:59 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 21:47
RajiRaghu4-Jun-06 21:47 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 22:11
ThatsAlok4-Jun-06 22:11 
GeneralRe: Show struct contents in Notepad Pin
Hamid_RT4-Jun-06 22:17
Hamid_RT4-Jun-06 22:17 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 22:56
RajiRaghu4-Jun-06 22:56 
AnswerRe: Show struct contents in Notepad Pin
_AnsHUMAN_ 4-Jun-06 20:38
_AnsHUMAN_ 4-Jun-06 20:38 
QuestionEvent Viewer Pin
ashokvishnu4-Jun-06 19:26
ashokvishnu4-Jun-06 19:26 
AnswerRe: Event Viewer Pin
Anilkumar K V5-Jun-06 0:40
Anilkumar K V5-Jun-06 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.