|
Hi friends.
i have some queries about ...constructor and destructor
Why to we need these two?and whats the difference between these two.
plz explain some small examples....
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
Object lifetime[^]
may be useful
modified to not to refer little OOP Book Friday, February 22, 2008 8:52 AM
And go for some big OOP book, otherwise u learn only little (initialisation & cleanup).
|
|
|
|
|
Initialization and Cleanup.
BTW What about a little OOP book?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
CPallini wrote: BTW What about a little OOP book?
Not bad.
|
|
|
|
|
rowdy_vc++ wrote: Why to we need these two?
Actually, I believe one is required while the other is optional. It's implementation-dependent, of course.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The compile error message I get is this:
compiling...
MyVariable01Dlg.cpp
c:\MFC_Todays_Work\Tree_Prop_Sheet_Project_20Feb08_pm\MyVariable01Dlg.h(15) : error C2065: 'IDD_PROPPAGE_MyVariable01' : undeclared identifier
Build log was saved at "file://c:\MFC_Todays_Work\Tree_Prop_Sheet_Project_20Feb08_pm\Debug\BuildLog.htm"
TreePropSheet - 1 error(s), 0 warning(s)
Yet, I have defined IDD_PROPPAGE_MyVariable01 in my code as shown and the name in the property sheet is OK
<red>enum { IDD = IDD_PROPPAGE_MyVariable01 };</red>
I am running Visual Studio.net version 2003 on a current Win XP workstation
I'm new at this, so it is probably something very simple. The problem occured when I added a fourth sheet to a module that contained three sheets and worked OK.
Any help much appreciated.
Response 26 Feb 08
Thanks for your feedback. I hadn't thought of a failure brought about by not recompiling the PCH file, which I did and no luck.
I agree the variable was not defined, so I restarted from scratch and second time round worked OK.
I'm learning that MFC can be a handful.
modified on Tuesday, February 26, 2008 12:23 AM
|
|
|
|
|
doorprize wrote: Yet, I have defined IDD_PROPPAGE_MyVariable01 in my code as shown and the name in the property sheet is OK
enum { IDD = IDD_PROPPAGE_MyVariable01 };
here u defined IDD and initialized to IDD_PROPPAGE_MyVariable01 which is undeclared.
may be u changed the ID of the property page to some new value or the resource.h is not including in the compilation path of MyVariable01Dlg.cpp.
|
|
|
|
|
doorprize wrote: Yet, I have defined IDD_PROPPAGE_MyVariable01 in my code as shown and the name in the property sheet is OK
enum { IDD = IDD_PROPPAGE_MyVariable01 };
No, you've neither declared nor defined IDD_PROPPAGE_MyVariable01 , only referenced it.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
is it possible to have a standalone system tray icon without an exe ?
Typically an exe exposes a System tray icon .
However my requirement is such that I would want to launch an app after the user selects an element from the system tray. Is this feasible ?
For some of the icons (such as the LAN/Network status ) , I do not see a corresponding application in the taskbar. How are these implemented ?
Engineering is the effort !
|
|
|
|
|
act_x wrote: is it possible to have a standalone system tray icon without an exe ?
Typically an exe exposes a System tray icon .
No. If you wanted to do something like this you should make a small launcher application which manages the tray icon and launches the main application when needed.
Steve
|
|
|
|
|
There is quite a large amount of data that can be stored in an exe under the Version Info resource. Can I retrieve that data( if so how) at a later stage, even if the file is running.
Regards,
Bram van Kampen
|
|
|
|
|
See the GetFileVersionInfo[^] function and friends. You may also want to search this site for this function to find some examples.
Steve
|
|
|
|
|
Bram van Kampen wrote: Can I retrieve that data( if so how) at a later stage, even if the file is running.
Like this?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This , I thought would be simple. I have spent close to half a day figuring this out .
So I am working on a MFC dialog app that has a CPropertySheet object. I am using the property sheet in Non Wizard mode.
MyDlg::OnInitDialog(.)<br />
{<br />
<br />
..<br />
CPropPage1 *pPage = new CPropPage1() ; <br />
m_sheet.AddPage(pPage);<br />
if(!m_sheet.Create(this,WS_CHILD | WS_VISIBLE |WS_BORDER)) <br />
return FALSE ; <br />
<br />
m_bInitialized = true ; <br />
}
I am unable to size the propertyPage to fit the dimensions of the main dialog window.
What should I be doing to ensure that the current active page in the PropertySheet is contained within the bounds of the Main dialog .
This is how my dialog looks at this point ( awful !
http://i25.tinypic.com/2mhiob8.jpg
Help is appreciated
Engineering is the effort !
|
|
|
|
|
Your example is a CPropertyView on a CFrameDialog?
So, your CPropertyView has to handle WM_SIZE and resize itself appropriatly.
Also, the View has to relay the message to the active page.
In addition to look at a few of the solution here on CodeProject, there is an article form a very interesting series):
Control Resizing[^]
Also, MS has a step-by-step walktrough[^].
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
act_x wrote:
I am unable to size the propertyPage to fit the dimensions of the main dialog window.
So the main dialog window is not the property sheet itself?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
dear all
i am really very sorry to ask such question, but no any friend around me,
how to generate the a mask by Gaussion function(2D) when sigma is changed? why its sum of all value in mask is fixed when sigma is changed? and how to produce a mask by c++? thanks a lot.
Li Zhiyuan
|
|
|
|
|
hi ....really i cant understand ..plz explain detail
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
thanks, i would like to know how to determine Gaussian mask size by c++? also do you know any formular to determine sigma value of Gaussian function? thanks a lot
Li Zhiyuan
|
|
|
|
|
Actually wat u r doing ..i think image processing ...i used in this guassion in sigma ...function in MATLAB. dont worry its simil'er to C ..thats all ..
i give one url ..i think its may be help to u ..if it is not .pplz tell me ..i will try my level best!!!!
http://idlastro.gsfc.nasa.gov/ftp/pro/math/gaussian.pro[^]
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
thanks friend.
do you have any c++ code for determining size of Gaussian mask when sigma is changed? any formula is available? thanks a lot. actually i don't understand well what u passed me just now. thanks again
Li Zhiyuan
|
|
|
|
|
hi friend ...send me mail id ...i send the code ...becoz now i am little busy ...plz ..
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
ok,thanks a lot, friend.my email id: lizhiyuan16@yahoo.com.dear friend, i am so urgent now, hope when you get time, pls send me code, thanks very much.
Li Zhiyuan
modified on Friday, February 22, 2008 7:30 AM
|
|
|
|
|
Hi, hope somebody can help me or at least give a comment.
I'm working on a viewer for large image but the memory become the limit to view the whole image.
An idea from other gigapixel viewer is to seperate the whole image into small tiles(256x256) for a number of zoom level, create DC in memory and dynamically display(OnPaint) only viewable part.
But I'm having difficulty implementing this algorithm like how will i change DC in memory while scrolling and I can't find an open source showing such.
Does anybody have an idea how to implement this?
Please explain logic in more details like when scrollbar moved, mouse scroll or OnPaint().
Or if you knew of a thread or open source implementing like this please let me know.
That's all thank you.
|
|
|
|