|
that's a hard one.
Every application can pretty much do what they want when it comes to application settings.
Those can be stored in the registry ( HKEY_CURRENT_USER\Software is the common place, and other unsafe places ), in a file ( about anywhere the disk, )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
Hello,
can somone tell me if it's possible to alter the windows explorer
(via namespace extensions i guess) to only show the files and subfolders
inside a folder, which I want it to display.
If for example I change into directory C:\Winnt, the windows explorer
should only display the system32 folder and the .bmp files.
All the other files have to be hidden.
I have read that IShellFolder::EnumObjects() is used to enumerate the files
and subfolders of a folder.
But what do I have to do to tell windows explorer which of these
files and subfolders I would actually like to display,
and which I want to be hidden.
Thanks in advance and sorry for my bad english.
Edward
|
|
|
|
|
I have a feature I want to add to my application's dialogs. Trouble is that I have some ordinary CDialog s as well as some CPropertySheet -based ones. As you'll know, both inherit from CWnd...
The feature I want to add modifies the behavior of a window but I cannot create a CMyWnd class and have CDialog and CPropertySheet inherit from those can I? All I can do is move the modified behavior into specializations of CDialog and CPropertySheet so that I have CMyDialog and CMyPropertySheet . Obvious problem with this is that I have repetition of code in two separate but closely related classes.
Can anyone suggest a way around this?
|
|
|
|
|
It may be possible to use multiple inheritance for your problem.
Construct a class that does the window modification work. e.g. CWindowModify
Then for the CDialog derived class and the CPropertySheet derived class inherit the CWindowModify class also.
e.g.
class CMyDialog : public CDialog, public CWindowModify
{
:
:
}
and
class CMyPropertySheet : public CPropertySheet, public CWindowModify
{
:
:
}
That way you only need to maintain the CWindowModify class.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
I thought about multiple inheritance so this would be a "helper class" then?
I have tried it but I get lots of compiler complaints:
e.g.
error C2385: 'CMyPropSheet::delete' is ambiguous
warning C4385: could be the 'delete' in base 'CObject' of base 'CCmdTarget' of base 'CWnd' of base 'CPropertySheet' of class 'CMyPropSheet'
Is this to be expected though?
|
|
|
|
|
I assume you have derived the new class from CObject
i.e. class CMyClass : public CObject
try this instead!
class CMyClass
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Hi,
I have problum in deleting a single line from a text file.
Any body can give better suggestion.
|
|
|
|
|
while (linesToRead)
{
s = ReadLine(in);
if (line != theLineYouWantToDelete)
WriteLine(out, s);
line++;
}
Software | Cleek
|
|
|
|
|
Hello Sir,
I know this technique i.e using temporary file deleting a single line.
Is there any other option to delete without using temporary file?
|
|
|
|
|
read the whole file into memory, write out everything but that one line.
i don't think there are any file operations that will let you edit a file in-place.
Software | Cleek
|
|
|
|
|
there are no "text" operations that allow you to delete a line within a file without rewriting it. I use memory, load the file into memory (STL list usually), make all your changes (line deletions, substitutions, etc), then write out the file from beginning to end. Writing to a file in a mode that overwrites the file, is equivalent to removing the line. Even most binary databases do not remove a database node interactively, they mark the node as deleted/reusable, and reuse the space at the next interactive "add".
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
In VC6, for some reason whenever I stop the program at a breakpoint, the call stack window does not display anything anymore. Does anyone know why, or a setting that I may be changed please?
TIA
I feel like I'm diagonally parked in a parallel universe
Jerry Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Dear All,
I have a file from which i am reading a value.The file contents are like :
ProtocolType = E1_EURO_ISDN
and i am trying to take " E1_EURO_ISDN" into a string variable, protocoltype.
int x=0;
char *line;
fgets(line,100,stream);
::::::::::::
::::::::::::
::::::::::::
Assumed that the string is taken into buffer.
if(strstr(line,"ProtocolType"))<br />
{<br />
for( i=strlen(line)-1,l=0;line[i]!=' ';i--,l++)<br />
{<br />
protocoltype[l]=line[i];<br />
}<br />
protocoltype[i]='\0';<br />
strcpy(protocoltype,strrev(protocoltype));
BoardParam->TrunkConfig[x].ProtocolType=protocoltype;
}//end if
But it gives error like "cannot convert from 'char *' to 'enum <br />
PSTNProtocolType'"
How do I solve the problem as protocoltype have to have a char string.
Thanks in advance.
amit mishra
|
|
|
|
|
Hi all:
Recently I've finished the coding of a tiny function which is to specify the files(Mp3s) order (by which the one appear first can be played first in the Mp3 player, this order depending on the result of DOS command "dir").
I'm not familiar with file system, after a little research, I found that the order in which you copying file to the destination folder(Mp3 Player Destination drive) is the order that the mp3 will played. So I implemented the code according to this principle. I was excited to found I really can control which mp3 should be played first. But after a little testing I found that this principle is not running stable, It will out of order once in a while.
Finally I decided to turn to another alternative which is FDT(File Directory Table). I heard from some guys that FDT can decide the file order either but much at low level.I wish I could write to the FDT of each file such that to achieve the objective. Can anybody provide the principle of writing to FDT or totally different method to affected the file order?
really appreciated!!!
|
|
|
|
|
i have function A and B.
<br />
A<br />
{<br />
Finished();<br />
<br />
SendMessage();<br />
}<br />
<br />
B<br />
{<br />
<br />
if( RECEIVE_MESSAGE )<br />
{<br />
StartDoingsth();<br />
}<br />
<br />
}<br />
Can i realize that?
- - - - - - - - - - - - - - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill !
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
How to verify if an application exsist in the system?
For example, I want to make sure if Nero exsist in this
computer. Can some one help? Thanks!
|
|
|
|
|
Probably the easiest way would be to identify a registry key that a computer with Nero installed would have, and make your code look for that
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
Hello
Is it possible to create a Bitmap in the Video memory of the second graphics card? If a window is fully displayed on the second monitor I would like to place the bitmap for double buffering into second card video memory. Otherwise the buffering is much slower. Is it possible under Windows API?
Does it matter if the two video cards are different and are using different drivers?
Thanks in advance for any help.
|
|
|
|
|
Hi All,
I Have problem working with activeX custom property of type VARIANT_BOOL using VC++.Net 2003. I have added the VARIANT_BOOL custom property using MFC ActiveX wizard. and in the control constructor, I am initializing it to VARAINT_FALSE. But when I try to get the value using container application it always set as TRUE.
Please help me.
Thank you in advance.
Regards,
Gopal
Gopal Naik
|
|
|
|
|
Is it possible to make a function call to a dll from another dll?
If you could share an example on how it can be done, I would really appreciate it.
Thank You.
|
|
|
|
|
Yep, but you can't load the child dll while the parent dll loads, because LoadLibrary is synchronized. If you do, the application will deadlock, believe me, I've tried
heinzster wrote:
If you could share an example on how it can be done, I would really appreciate it.
You do as you always do, using LoadLibrary and GetProcAddress.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
You can also statically link to any DLL that you have the .h and .lib files for.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Are there articles in CodeProject that demonstrate this? Could you recommend 1?
Thanks...
|
|
|
|
|
If you have the .h and the .lib files for the dll:
(VS .NET) In your (C++) DLL project: #include the .h file where you refer to the functions.
In the menu, you will find the menu item project->properties...
In the dialog window, locate the tree node [configuration properties]->[linker]->[command line]. In the 'additional options' text field, you add the name of the .lib file.
If you don't have the .h file, and/or you dont have the .lib file. You can do this (provided that you know the signature of the functions you want to use):
<span style="color: green;">
</span>
<span style="color: blue">void</span> DllTest()
{
<span style="color: green;">
</span>
HMODULE hDll;<br> <br>
<span style="color: green;">
</span>
<span style="color: blue">void</span> (* pPointerToFunctionInDll) (<span style="color: blue">char</span> * message);<br> <br>
<span style="color: green;">
</span>
hDll = LoadLibrary("test.dll");
<span style="color: blue">if</span> (hDll)
{
<span style="color: green;">
</span>
pPointerToFunctionInDll = (<span style="color: blue">void</span> (*) (<span style="color: blue">char</span> *)) GetProcAddress(hDll, <span style="color: red">"ShowMessage"</span>);
<span style="color: blue">if</span> (pPointerToFunctionInDll)
{
pPointerToFunctionInDll("Hello World!");
}
<span style="color: green;">
</span>
FreeLibrary(hDll);
}
}
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|