|
It was asked in an Interview. I suggested using pragma's. They asked how to do without that.
Still confused...
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: It was asked in an Interview.
yes i suspected that.
well i am not too sure, may be declare my own entrypoint to the linker.
-Prakash
|
|
|
|
|
declare a global static function.That'll execute before main.I was once askd a similar qs,hw to crash your prg before executing main !! dunno why he wanted that
|
|
|
|
|
but how would you make that global static function to execute first before the main?
-Prakash
|
|
|
|
|
But how to call it before main is called...
LOL
These interview fellas are real funny...Any question they don't know they will throw it at us...;)
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I have the answer but only if
u give me bunch of c++ & MFC
question answers or some
website for it.
That is just i am putting up a site which
contains such Q & A .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: I have the answer but only if
u give me bunch of c++ & MFC
question answers or some
website for it.
Clever deal buddy...
But I can't help. The other questions I forgot. This was asked sometime back.
Forgot the rest.
Today i remembered this coz of a friend. If you can help, will be nice .
After you finish please send the site address. ATB.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
It really a clever trick in c++
u need to create a global object with a
constructor .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: It really a clever trick in c++
Nothing clever. It is trivial in C++. Everybody knows that. I want to do the same in C buddy.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
ok
U will be happy that i worked out the problem sucessfully
:->
put up a function in ur main function call which return int
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: put up a function in ur main function call which return int
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
ok i am sorry for that but
//global function & variables
extern int fun_Vikas()
{
return 4;
}
int io=fun_Vikas() ;
//Main fun
int main()
{
;
;
;
}
This code was compiled in vc++ compiler and
it calls the fucntion fun_Vikas before main
Hows that
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Yeah I tried this one. But on some compilers it does not work.
It says "a constant required".
So I was searching for some other way...
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Is it possible to enable MFC in vc2005 Express?
Is it allowed?
|
|
|
|
|
I am using CProgressCtrl in VS6.
I would like to know how to change its color?
Please help!
|
|
|
|
|
Subclass it and handle the WM_ERASEBKGND.
Or
If you wanna change the colors used in a progress bar control then you have to handle these two messages
1. PBM_SETBARCOLOR
2. PBM_SETBKCOLOR messages.
or The Easiest
CProgressCtrl myCtrl;
myCtrl.Create(WS_CHILD|WS_VISIBLE|PBS_SMOOTH, CRect(10,10,200,30),
pParentWnd, 1);
myCtrl.SetBkColor(RGB(255, 0, 0));
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!
I try
CProgressCtrl myCtrl;
myCtrl.SendMessage(PBM_SETBKCOLOR,0,RGB(255,0,0));
It's alright now!
|
|
|
|
|
Try SetBkColor...
That's why it is provided for...
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I have a program compiled using multi-byte character set accessing a DLL/LIB compiled using UNICODE character set. When I run the program in debug, memory leak was detected. Same thing happened for UNICODE program accessing DLL/LIB compiled using multi-byte character set. The problem went off when both program and DLL were compiled using the same character set. Is there a workaround for this? The DLL was built and compiled in UNICODE in order to support both UNICODE and multi-byte character sets whereby conversion to UNICODE data type will be done if UNICODE is not defined in the calling program. The intention here is to have only one DLL, and not one DLL in UNICODE version and another DLL in multi-byte version.
|
|
|
|
|
Hello all,
I have a working win32 console c++ application. I developed the application
in a machine(XP Professional) which had an installed copy of visual studio
.NET 2003.
now my question is this? Is there a way in which I can statically load all
the required libaries into the executable while building it itself, such th
at i can just grab the executable and run it in another machine(windows XP P
rofessional, but does not have visual Studio .NET 2003 installed)??
Or does every system that executes the c++ application, needs to have a co
py of VS.NET 2003 installed?
Or is there any other alternative?
Kindly help me out. It's kinda urgent.
Sree
|
|
|
|
|
In MSVC (6) its usually Project -> Settings -> General : 'Microsoft Foundation Classes' :: 'Use MFC in a Shared/Static DLL' for MFC if your console app uses it ..
AFAIK you still need the core Microsoft Version 7 'redistributable' DLL's on your deploy platform/machine, but they are available as a seperate download (dont have a link, sorry) that you can install easily on the target machine, without having to install .NET .
edited: found a useful link http://msdn.microsoft.com/netframework/downloads/framework1_1/[^] for the .NET redistributables - see bottom of page in link ..
'g'
-- modified at 19:06 Wednesday 28th December, 2005
|
|
|
|
|
|
yes, I think I remember saying he neeeded the MSVC V7 Redistributables, of which that
GflPower wrote: msvc7d.dll
is one, and a debug one at that !
which is why I suggested he look for the redistributable download from MSDN which should have ALL the dll's he'd require - do you know where it is ? - Ive assumed its in the .NET Framework download, but have been known to err
'g'
|
|
|
|
|
hello garth & gflpower,
thanks a lot. the .net framework 1.1 download proved enough. though i also installed the redistributable download also. thanks a lot once again.
sree
Sree
|
|
|
|
|
Ok, Im tired and stumped - I whipped up a 'quicky' late last night to fix some data files for the business - that I probably should have done in perl or such - but instead I generated a new MFC console project, cut and paste entries from other guff into it.. when I built the project, I noticed the debug directory (usually just 'debug') was
project-name__WIN32_DEBUG
which isnt bad in itself - I just dont know how MSVC suddenly decided to name project directories like that, not having entered any naming convention for myself - can anyone point out the relevant chapter of the manual please ? I cant see where the settings are in the Studio for this - Ive checked everything I think I can see ...
thanks, Garth
|
|
|
|