|
CWinApp::WriteProfileString(..)
CWinApp::GetProfileString(..)
CWinApp::WriteProfileInt(..)
CWinApp::GetProfileInt(..)
Have a nice code day
|
|
|
|
|
Do a search for RegOpenKey - you will likely find usable examples of how to use the registry-related functions.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Dear All,
Kindly letme know is there any ActiveX or MFC control which is equivalent to DirList Control.
Regards,
Mayank Srivastava
-- modified at 8:03 Wednesday 11th January, 2006
|
|
|
|
|
Ok very popular question
how do i crash my programe before reaching main.
I dont actually want to crash the programe but
want to know how can i execute a piece of code
before main is executed .
Consider C and C++ only
Answer shoud be compiler independent
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
create any gloabl object, in ur program. put some code to crash in its constructor
Kill before even born....Its is called abortion!!!
-- modified at 7:14 Wednesday 11th January, 2006
|
|
|
|
|
What about C ???
this is c++
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
Patch random bytes in the EXE until you find something that works
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
Of the top of my head, can't think of a way in C, but in C++ you can simply use some form of static initialiser.
Be warned though, that they can cause problems if not handled correctly. I'd recommend asking yourself if you really need to do this?
Kev
|
|
|
|
|
Pls elaborate "Static initialiser ".
Small code can be of help.
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
1. Get yourself a sledge hammer
2. Take a deep breath
3. Swing the hammer back and give the program (The display, where it is being shown) a merciless blow.
4. The program should have crashed by now.
This is a code sample
<br />
#include<iostream><br />
using namespace std;<br />
<br />
class GoGoGo<br />
{<br />
public:<br />
GoGoGo() <br />
{ <br />
cout << "This runs first!";<br />
} BeFirst;<br />
}<br />
<br />
int main()<br />
{<br />
cout << "Main is second :(";<br />
return 0;<br />
}<br />
Google for interview questions and u will find a lot of stuff. I learned this from google some months back.
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
What about C ???
this is c++
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
You need to declare an instance of class GoGoGo before this will work - i.e.:
GoGoGo executesBeforeMain;
Kev
|
|
|
|
|
It has to be
class GoGoGo<br />
{<br />
public:<br />
GoGoGo()<br />
{<br />
cout << "This runs first!";<br />
}<br />
}BeFirst;
never say die
|
|
|
|
|
Sorry abt that. Din notice it.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
int CrashingFunc();<br />
<br />
static int SomeIntThatCrashesTheProg = CrashingFunc();<br />
<br />
int CrashingFunc()<br />
{<br />
}
The static variables will be evaluated first and this will call your CrashingFunc before the main()
|
|
|
|
|
is it neccesary to put static .
static int SomeIntThatCrashesTheProg = CrashingFunc();<br />
<br />
int CrashingFunc()<br />
I feel int SomeIntThatCrashesTheProg has to be Global which u have defined with static
never say die
-- modified at 9:27 Wednesday 11th January, 2006
|
|
|
|
|
yeh globals
if they are initalised then
they can crash the prog .
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
Why do you want to do so? Can you tell the usability?
Vipin - MVP
|
|
|
|
|
Actually i dont want to crash the
program but i am studying the reason
by which the programs can crash before
the main function is exectuted
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
vikas amin wrote: i am studying the reason
by which the programs can crash before
the main function is exectuted
If so, you will do a never ending study. Atleast after you start with windows programming. (If you ever finish studying this with C and C++)
Why do this dude? Destructive mind huh?
Regards,
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Hi Friends
I have developed an application(MFC based ) in which first I have my object of one class say objMyClass in one file called File1.h and I have used it in File1.cpp.
NOw I want to used the same object(I don't want to create new object) in my another file say File2.h and File2.cpp....how to do that ?
Any clue ?
Thankx a lot
Mahesh
|
|
|
|
|
Use extern
Jesus Loves <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background:#ffaaaa">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Is it possible to use extern for Objects also. I know we can use it for variables but not sure for object.
Also what I want mainly is I don't want to create new objects I just want to use that same object in it's present state.
And last but not the least, Thankx a lot for answering my question and taking time for it.
Regards
Mahesh
|
|
|
|
|
Yeah mahesh extern can be used on objects too.
Jesus Loves <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background:#ffaaaa">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
even u can extern with function.As function r global by default unless u have not put static with function declaration
never say die
|
|
|
|