|
T.RATHA KRISHNAN wrote: If I use app in place of out...
Why aren't you using both?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Steve S wrote: ...or STD streams?
STL?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
open the file in apppend mode...
syntax...
modes for opening a file----->
fstream file_op("C:\\s1.txt ",ios::out|ios::app);
|
|
|
|
|
Thanks Mani. It's working.
|
|
|
|
|
|
Hi all,
I am trying to use IActiveDesktop interface in my code.
I have included
#include "shlobj.h"
and defined this in stdafx.h
#import "shell32.dll"
but it is giving error
error C2027: use of undefined type 'IActiveDesktop'
how to resolve this
Can anybody help me in this
thanks in advance
|
|
|
|
|
You could try
#include <wininet.h>
#include <shlobj.h>
as I believe there are things in shlobj.h that rely on wininet.h being included first.
After that, you might also consider that by default, #import generates definitions inside a namespace, so if that was where IActiveDesktop was being defined, it wouldn't be in the global namespace.
You can look at the generated tli/tlh files to see what the namespace is called.
Steve S
Developer for hire
|
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanku all,
it solved my problem....
|
|
|
|
|
Hi everybody,
like some times before i have a very strange behavior:
I add lines to the header : Error
I switch some lines : No Error
Now i have a same case:
class MyView
{
DECLARE_DYNCREATE(.....
public:
MyView(....
~MyView();
public:
enum { IDD = IDD_MY_VIEW };
#ifndef _DEBUG
...
#endif
public:
virtual void DoDataExchange(...
DECLARE_MESS...
CFontStatic lbInfo;
CButton btOk;
CSxGroupBox gbSelect;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
i get an error during the SubClassing of lbOne during DoDataExchange
CFontStatic lbInfo;
CButton btOk;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
CSxGroupBox gbSelect;
NO ERROR
CSxGroupBox gbSelect;
CFontStatic lbInfo;
CButton btOk;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
I get an error during AfxCallWndProc
CStatic gbSelect;
CFontStatic lbInfo;
CButton btOk;
CFontStatic lbOne;
CFontStatic lbTwo;
CFontStatic lbThree;
CFontStatic lbFour;
If i replace CSxGroupBox with CStatic i also get NO ERROR
i don't really understand how this effect occurs.
The View "MyView" does nothing, no char array which could overflow
And there are also no other views/funtions before the opening of this MyView
which manipulates arrays or other operations which could provoke an overflow
Does any one know the problem or has some times the same effect?
Big thanks !
|
|
|
|
|
Just a guess but I'd say CSxGroupBox is overwriting memory that doesn't belong to it, probably in the constructor. That's where I'd look to start with.
Just a tip: Calling your post VS.NET error makes it sound like a problem with .NET which belongs in the .NET forum or a problem with Visual Studio which belongs in the Visual Studio forum. This might explain the slight lack of response. Dialog crashes in DataExchange or C++ Subclassing problem might have been more appropriate.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Ok, i will check the code of CSxGroupBox
Thanks for your help
|
|
|
|
|
hi i am copying a file to user desktop. the user should not edit or open or delete the file. how to do this in mfc.
-- modified at 7:17 Thursday 21st June, 2007
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: how to do this in mfc.
Change the file's access permissions via the ACL. The solution has nothing to do with MFC.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have a project used CFileDialog, the icon color is just 16 colors, but in another project it is 256 color icon.Does anyone know how to make CFileDialog to show 256 color icon?
Thanks!
|
|
|
|
|
What icon? CFileDialog wraps the Windows common file open/save dialog. What icons are involved
with that?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
What I mean is the toolbar button: Up One Level, Create New Folder and View Menu button.These buttons are 16 colors, but in office word, excel they are 256 colors.
|
|
|
|
|
The dialog in Office is customized. For info on customizing these dialogs, see
Open and Save As Dialog Boxes[^]
I'm not sure how much is documented about changing the explorer-style dialogs, especially the
toolbar.
On XP, if you add themes to your app with the appropriate manifest, you'll get the look identical
to the file/open dialog in IE...see
Add Windows XP Theme Style to your current projects[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
Hi everyone,
Is there any API to determine whether the given IPAdress belongs to public or private network. I have used the IPAdress series to determine the type of network,now i'd like to be more specific as far as the API is concerned.
thanks in advance...
sasi...
|
|
|
|
|
What do you mean by Private or Public ??
Be Specific..
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
Private: If the IPAdress which i want to communicate is with in any LAN(i.e 192.168.1.2, 192.168.....).
public: if it is not connected to the LAN(i.e 225.240...).
These are all private IP addresses:
From 10.0.0.0 to 10.255.255.255
From 172.16.0.0 to 172.31.255.255
From 192.168.0.0 to 192.168.255.255
|
|
|
|
|
Is there any way to paint the title bar with custome image even if the theme service is not running.
thanks
|
|
|
|
|
Look for examples of handling WM_NCPAINT and WM_NCCALCSIZE. It is posible but 'discouraged' so the docs and examples are a bit sparse. I wouldn't attempt a full custom title bar at the first pass, there's a lot more there than we generally think about, but if you can reach the point where you're intercepting the drawing and then calling all the bits to make a 'normal' title bar appear as if you weren't interfereing at all, then adding your own custom image should be easy.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|