|
im not sure your problem is this but can you run this code ,please and send me that it work or you get previous error
<br />
OPENFILENAME m_ofn;<br />
static char lpFile[260];<br />
LPCSTR szFilter="";<br />
memset(&m_ofn, 0, sizeof(m_ofn));<br />
m_ofn.lStructSize = sizeof(OPENFILENAME);<br />
m_ofn.hwndOwner = m_hWnd;<br />
m_ofn.hInstance = AfxGetApp()->m_hInstance;<br />
m_ofn.lpstrFilter = szFilter;<br />
m_ofn.lpstrCustomFilter = NULL;<br />
m_ofn.nMaxCustFilter = 0;<br />
m_ofn.nFilterIndex = 0;<br />
m_ofn.lpstrFile = lpFile;<br />
<br />
m_ofn.nMaxFile = sizeof(lpFile);<br />
m_ofn.lpstrFileTitle = 0;<br />
m_ofn.nMaxFileTitle = 0;<br />
m_ofn.lpstrInitialDir = NULL;<br />
<br />
m_ofn.lpstrTitle = "Open a File";<br />
m_ofn.nFileOffset = 0;<br />
m_ofn.nFileExtension = 0;<br />
m_ofn.lpstrDefExt = NULL;<br />
m_ofn.lCustData = 0;<br />
m_ofn.lpfnHook = NULL;<br />
m_ofn.lpTemplateName = NULL;<br />
<br />
m_ofn.Flags = OFN_EXPLORER|OFN_HIDEREADONLY;<br />
GetOpenFileName(&m_ofn);<br />
whitesky
|
|
|
|
|
Thank you for your help. I had to slightly alter the code you sent:
char szFilter[256];<br />
OPENFILENAME m_ofn;<br />
<br />
char file[256];<br />
char* lpFile;<br />
.<br />
.<br />
.<br />
case ID_FILE_WHITESKYOPEN:<br />
lpFile = file;<br />
*lpFile = '\0';<br />
ZeroMemory(&m_ofn, sizeof(OPENFILENAME));<br />
<br />
m_ofn.lStructSize = sizeof(ofn);<br />
m_ofn.hInstance = hInst;<br />
m_ofn.lpstrFilter = szFilter;<br />
m_ofn.lpstrCustomFilter = NULL;<br />
m_ofn.nMaxCustFilter = 0;<br />
m_ofn.nFilterIndex = 0;<br />
m_ofn.lpstrFile = lpFile;<br />
<br />
m_ofn.nMaxFile = sizeof(lpFile);<br />
m_ofn.lpstrFileTitle = 0;<br />
m_ofn.nMaxFileTitle = 0;<br />
m_ofn.lpstrInitialDir = NULL;<br />
<br />
m_ofn.lpstrTitle = "Open a File";<br />
m_ofn.nFileOffset = 0;<br />
m_ofn.nFileExtension = 0;<br />
m_ofn.lpstrDefExt = NULL;<br />
m_ofn.lCustData = 0;<br />
m_ofn.lpfnHook = NULL;<br />
m_ofn.lpTemplateName = NULL;<br />
<br />
m_ofn.Flags = OFN_EXPLORER|OFN_HIDEREADONLY;<br />
<br />
GetOpenFileName(&m_ofn);<br />
break;<br />
But I am afraid it still does the same thing. It seems from the other replies I have received to my posting that this is not unique to me and somehow seems to relate to Adobe Acrobat 7.0.
I have not yet tried removing Acrobat 7.0 from my computer to prove the point.
Thank you again for your interest and help.
RA
|
|
|
|
|
Another post here suggested this company's software as a replacement for reading PDF files...
http://www.foxitsoftware.com
I've seen better runs in my shorts! - Patches O'Houlihan
|
|
|
|
|
|
http://x02.xanga.com/8aba2b046373560365677/m40459493.jpg[^]
Just like that. That is writen by C++. And i want to display the web image when i click the name in the list.
Is there any source code for displaying a web image into window application?????
web image is like that "http://x02.abc.com/peter.jpg"
-- modified at 4:02 Thursday 15th June, 2006
|
|
|
|
|
In your dialog you can put a Microsoft Web Browser ActiveX control, then use the Navigate2 member function to display the image. You can even display Web sites, not only images.
Alternatively, you can try to download the image using CHttpConnection MFC class, and then display it in a picture control.
|
|
|
|
|
Is there any example?? I am only a beginner of C++.
|
|
|
|
|
mimimimilaw wrote: Is there any source code for displaying a web image into window application?????
You may use the IHTMLDocument or IHTMLDocument2 Interface for this.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
It seem too difficult to me....Is there easier way?
|
|
|
|
|
I guess you want that read links in one page and if this link is image then you download it,right?
whitesky
|
|
|
|
|
|
|
Hi,
I need to provide the user the ability to view and modify arrays that can have any dimensions. Which control or interface would you suggest to use for this to be nice ?
Thanks !
|
|
|
|
|
Tnarol wrote: Which control or interface would you suggest to use for this to be nice
CListCtrl
nave
|
|
|
|
|
hey all,
I am new to this area.
Iam trying to create a combobox with vertical scroll enabled.
I want to have some 9 items listed in the combobox. How do I list the items?
In the property page of that combobox,
enabled the "droplist" ,vertical scroll.
How do the items get displayed on the combobox after build of the program?
Any guide/help?
|
|
|
|
|
If you are using VS 2003, open dialog editor, select your combo-box, go to the Properties panel, and enter your items in the Data field. Separate items with semicolons.
|
|
|
|
|
You need to add the items to the combo box using
m_combo.AddString();
If you are not able to see the contents of the combo box ,select the combo box in resource editor.
Click on the arrow
Drag the combo box down with a click on the lower border.
That's it . You will see the contents when you click on the combo box
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I want to include some files in my project.but i dont want to place those files in my project folder.how can i include a file without place that in current project folder.
E-Ramu
|
|
|
|
|
Check in the project settings, there is an option in which you can specify additional include directories (it is in the C/C++ tab)
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
While including the file give the entire path.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
#include "C:/path/to/header.h"
Yes, forward slashes are OK and are preferable, because you don't run into problems with \ being the C escape character.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Hi,
If you're using Visual Studio (>6.0) you can for instance setup the "other include dirs" of your project to be "$(SolutionDir)headers" then create a "headers" directory to put your include files under the directory where your solution file is.
I do the same kind of thing with the libraries .lib (into lib directory) and the binaries .exe .dll (into the bin directory).
|
|
|
|
|
I am not sure what you mean. If you mean including it in the project files list, then you have two choices. Include it through the project settings or include it through the "#include statement". If it is a source file, then you can include it like so "#include "filename.extension"; of course in a Microsoft development enviroment the user can alway open the file and modify it if they really want to (if not write protected).
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I want to import and use resources such as sound clips, dlls, etc inside my MFC program. How do I do this?
|
|
|
|
|
Do the Following way.
HINSTANCE hRes = NULL;<br />
hRes= LoadLibrary("ResourceD.dll");<br />
if(hRes)<br />
AfxSetResourceHandle(hRes);
Appu..
"If you judge people, you have no time to love them."
|
|
|
|