|
Please read my post carefully. Take the help of AfxGetApp[^].
Regards,
Paresh.
|
|
|
|
|
You can have pointers to your view classes inside CMainFrame.
and then access through AfxGetMainWnd() which will giev you pointer to CMainFrame.
you have to typecast i.e. (CMainFrame*)AfxGetMainWnd().
I home it makes sense.
Regards,
Sandip.
|
|
|
|
|
I have a file dialog.i have filtered out the type of file i need.but how could i open the file in the application after selecting it?after clicking "open" in the dialog , i need to see the file.
Thanks
|
|
|
|
|
ShellExecute(/*parameters*/); will open the file in the application that it is related with. You will have the file path from the FileDialog
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I have to just display a jpeg file from the selected folder.No other operation has to be done.What should I do?
|
|
|
|
|
So, did you try opening the file using ShellExecute? Where do you want to display the jpeg file. look at the parameters of the ShellExecute function. You can pass the name of the application that you want the file to open in. Hope this helps.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you Sir....
I was able to open the jpeg file now.Now I want to know what should I do to open an exe file?should i just specify the path of the exe file?
|
|
|
|
|
Yes. BTW you can take some time out and visit MSDN site for more help on ShellExecute and how to use it.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
the jpeg files which i have specified to be opened is displayed in Windows picture and fax viewer.Anything that i have to do to just diaply the picture in vc++ runtime display.
here is the code i have written
ShellExecute(NULL,"open",f.GetFileName(),NULL,NULL,SW_SHOW);
|
|
|
|
|
That would be the default associated application in the registry settings [Don't recollect where exactly] for jpeg files.
projectip wrote: do to just diaply the picture in vc++ runtime display.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you so much for your help....
|
|
|
|
|
You are most welcome
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Using C++ program I want to place the cookie in the users cookie folder (C:\Documents and Settings\Administrator\Cookies) by creating a cookie file. I know how to create a file, but placing the cookie in the users cookie folder (C:\Documents and Settings\Administrator\Cookies) is the problem. As when I saw my cookie folder, files are named with user "name@filenale.txt" (ex:administrator@codeproject[1].txt).
So can any one give me tips in placing the cookie file in the cookie folder with the above mentioned file naming style.
Nandu
|
|
|
|
|
|
|
Can we avoid sorting of CComboBox programmatically?
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Take a look at SetClassLong() function ...
|
|
|
|
|
|
Alternatively, I can use InsertString() function to insert the item at whatever position I want.
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
rp_suman wrote: Can we avoid sorting of CComboBox programmatically?
Removing CBS_SORT style from the combo should help! Take a look at ModifyStyle and ModifyStyleEx functions.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hi Nibu Thomas, thanks for the great help!!
I thought if there should be a function to remove the style and you pointed it..
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
An alternative is to use the resource editor. Open the properties of your combo box: there is a 'Sort' property that you can disable.
|
|
|
|
|
Hi Thanks for the help!!, I thought of using "Sort" in resource, but if I do in resource I have to synchronize it with offshore development team.
If I do in code, I can just update them c++ source code and resource not needed.
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi masters!
How can I relize how many new eMailes are there in a certain inbox!
I kowe it's difficult to explain all things at this time here. But mayby you know a link or something ...
Thnx!
|
|
|
|
|
Which inbox? gmail, yahoo, outlook, outlook express, thunderbird?
-Saurabh
|
|
|
|