|
Hello,
I had some doubt regarding definition of global variables. If I have to define two global variables with the same name in two cpp files then is it somehow possible to do so..?
However I am aware of providing a definition in one file and declaring in other for usage(using extern keyword).
Example:
int i;
should be "defined" in CPP1.cpp and CPP2.cpp belonging to the same project.
Regards,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Global variables are only visible in 1 cpp
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
in cpp1.h ->
extern int i;
in cpp1.cpp ->
int i;
Then include cpp1.h where ever you need to use i
|
|
|
|
|
hi!
i want to use drawitem() to easily set a background color to alternate rows in my clistctrl rows. I've made it ownerdrawfixed, add drawitem override procedure, put ON_WM_DRAWITEM()... but my item data are not displayed. but when i removed the ownerdrawfixed property, it displays the data, but ofcourse it doesnt go to drawitem() procedure.
|
|
|
|
|
i will try to publish my code as soon as possible to the Codeproject.com
Regards,
sdancer
|
|
|
|
|
When it comes to doing owner drawn list controls this[^] article by Mike Dunn is a must read.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
Read me article at,
http://www.codeproject.com/listctrl/ColoredListCtrl.asp
Regards,
sdancer75
|
|
|
|
|
Is it easy to implement CFrameWnd::DoModal()?
|
|
|
|
|
followait wrote: Is it easy to implement CFrameWnd::DoModal()?
there is no DoModal Function in CFrameWnd class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
if you want a modal frame window, I think you can disable the owning frame window.
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
|
|
:-Di would like to know how do i display text over an image using MFC, cos when i write a text using DrawText, the text gets written behind the Image.
Nams
|
|
|
|
|
This depends on the way you are doing it but make sure the text is written after the iamge is drawn, including in the OnPaint handler.
The tigress is here
|
|
|
|
|
See if this article is of any help.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I was confused using the Date Picker (CDateTimeCtrl). When I enter a date using the date picker, (OnChange) DTN_DATETIMECHANGE notification was sent twice but if I enter using the keyboard it was only sent once.
|
|
|
|
|
Ok, so what's your question?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi
I have created a .dll file and one .exe file in Visual C++.NET platform.
I want to call that .exe file from that Main.cpp file. How can we do it in to the Visual C++.NET platform?
Thank you
Janak
|
|
|
|
|
|
CreateProcess()<br />
CreateProcessEx()<br />
ShellExecute()
or the easiest,
WinExec()
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.
|
|
|
|
|
Thanks to both of you...
-- modified at 5:58 Tuesday 13th December, 2005
|
|
|
|
|
Hi,
I have a function that uploads files to our database. I wish to display the
status of upload while it is happening....something like a dialog with a list
box that displays each action as it happens.
The problem: I made a dialog with a list box. The dialog implements
WM_UPDATEUISTATE. It adds a string in certain static location to the list box
every time it recieves this message. But, it apparently accumulates all the
messages that the worker thread sends and then displays all of them at the
end of processing not as the processing happens. Please suggest alternatives.
I am a bit new to MFC and I would request you to give some idea on what went
wrong here, if possible.
Thanks in advance!
krems.
krems
|
|
|
|
|
That's normal behavior if you have one single thread. In your program, what's happening is that you are running a function (I suppose) that is doing the work of uploading files. Thus, your UI is not responding anymore because messages aren't processed anymore. When your function terminates, your UI code is again ran and it finally process all the messages.
If you want the UI responding to your message while doing some work in the background, you'll have to make an extra worker thread to manage the upload. Look in this website, I think there is some nice articles about threads (it's too long to explain here).
|
|
|
|
|
HI to all,
can anybody help me what is the Difference between VC++6.0 and VC++.NET.
Thanks.
|
|
|
|
|
regarding what ?
- VC++.NET is standard compliant (VC++6 is not anymore)
- VC++ support .NET applications but still maintains native code generation too (VC++6 doe not know .net framework at all)
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|