|
|
Weird, I've seen this before, but I'm not certain why it will do that.
One of my application dialog is shown as a distinct window in vista's task bar (I cannot test on XP now).
It's a simple CDialog derive dialog that contains some CMFCPropertyGridCtrl , some CMFCButton and a CTreeCtrl .
No weird code in the OnCreate or in the OnInitDialog .
Dialog is created from the main frame like this :
void CMyMainFrame::OnMyDialog()
{
MyDialog dlg;
dlg.DoModal(this);
}
Thanks.
This signature was proudly tested on animals.
|
|
|
|
|
The child dialog has a property called Application Window .
Set this to False .
|
|
|
|
|
Yep, that's it. don't know why/how this was set to True.
Thanks.
This signature was proudly tested on animals.
|
|
|
|
|
Hello all,
I came across a question regarding modeless dialog box and i am confused regarding the answer. The question goes like this
A Modeless dialog box must not be created over
1) Heap 2) Stack 3) Globally 4) Locally Static
which is the appropriate option to choose. Will locally static have the same scope as that of globally declared objects. As its clear that for a modeless dialog box the object must be accessible throughout the program
Regards
Sujay
|
|
|
|
|
It is really a question of scope of the dialog variable.
So it all depends on from where all you really want to access the variable.
And unlike a modal dialog, the calling thread is not blocked when a modeless dialog is created and shown.
|
|
|
|
|
actually which answer will be more precise....i mean if u compulsory need to choose one out of four.
frankly i am confused between static local and stack....... got to be one of these two........
|
|
|
|
|
In a modal dialog your main program is halted (assuming your application is single threaded) while you enter data into the dialog. When you finish with the modal dialog, your main program accesses the data you entered and then processes it.
You use a modeless dialog when you need to continuously interact with your application through the dialog. You enter some data and your application can act on that input immediately without dismissing the dialog. Conversley, you might continuously display data in a modeless dialog that your application can keep updating as processing proceeds.
The choice of which to use is how long the dialog must be up and how the data flows between the dialog and the application.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Hello Tim,
Thanks for the answer, but the question here is about the creation of Modeless dialog box. What i have understand from my reading is that, for modeless dialog box we need to create its object so that its scope is maintained throughout the application, in case u need it that way.......
So to achieve that whether it be good to create that object in Heap, Stack, Global, or locally static.???
One more thing, is it true that the scope of a variable declared 'Locally Static' is same as that declared 'Globally'???
Regards
Sujay
|
|
|
|
|
The lifetime of the modeless dialog only has to be the duration that you want it directly available to the user. Some people do this by keeping it available the lifetime of the application and hide it when it's not needed. Others create it on the heap when the user wants it and then destroy it when the user is done. If you have several of them, it goes a little lighter on your resources.
If you put it on the stack, you need to be very careful about how it's scoped. This limits where it can be done in your typical application as it will be destroyed if it goes out of scope.
Scope is about visibility, if it's "locally" static, that kind of implies its visibility is limited. Either to a particular file or even a single function. If you mean a class static, that has a slightly different meaning. The storage exists for the life of the program and scoping is controlled by the class name. Of course, you can make static data available outside their primary scope in various ways.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Hello all,
i m working on a MFC application using Visual C++ 6.0. I am stuck with a problem where i have put certain values in the combo box which is in a dialog window...... now the problem that arises is that when i run that application i find no data present in the combo box, i have search for the problem but every where it is mentioned in the same manner ( i.e. just enter the values in data tab using Ctrl+Enter for next element) to display the data but i am confused why my application is not working that way.......as i don't want to load data using AddString() method.
Please help me out with this !!! any help will be highly appreciated !!
regards
Sujay
|
|
|
|
|
I'm sure the values are being populated, but you're not seeing any by default because none has been selected.
Try viewing the list contents of the combo box by clicking on its down arrow.
Do you see the items there?
If you do and want the first to be selected by default, use the CComboBox::SetCurSel() method.
|
|
|
|
|
Sujay chakraborty wrote: ...when i run that application i find no data present in the combo box...
How are you verifying this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hello David,
Actually i have tried a few steps for this.....
-- I have clicked on the down arrow key in combo box to check for data
-- I have tried to set default selection using CComboBox::SetCurSel() method
but i have found a strange pattern in this the moment i run a combo box within Win32 Wizard Application rather than empty project of win32 app (which i have done earlier) i found the combo box to be running absolutely perfect.
I found it weired but couldn't figure out the reason for this to happen.!!!
|
|
|
|
|
Sujay chakraborty wrote: -- I have clicked on the down arrow key in combo box to check for data
Are you sure the list-part of the combobox is large enough? By default, it isn't.
It's kludgy, but you can call the combobox's GetCount() method to see how many items are in it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello David,
Thanks for your valuable suggestions. Actually i have figure out a weird notion in VC++ 6.0, this default data items (from data tab of properties window of the combo-box control) works superbly well with Win32 wizard application but its not working with Win32 blank application, i am trying to figure it why ?????? but couldn't succeed till now.......
If you kindly help me to sought out this issue, and please correct me if i am wrong in any sense. Your help will be greatly appreciated.
Regards
Sujay
|
|
|
|
|
Hey,
I want to write c++ codes that could compare two images. Which steps shoul I follow. And is Pixel per pixel comparison the best? How can I implement my codes.
Thanks in advance,
Franck
|
|
|
|
|
Have you tried reading the replies you got yesterday?
http://www.codeproject.com/Messages/3281531/compare-images.aspx[^]
I'm not saying if they're good or bad... but they deserve to be read and responded to.
Good luck with your problem,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
It's a complex problem; because as soon as you think you found a good solution, you come to a test case where it fails and you need to add more and more exception and new tests and code.
What are the input images ? generic images or very spcific images (for example more or less all of the same images from security cameras)
What is the result of the comparison ?
- identical vs. not identical ? (pixel comparison based on images of same size),
- identical up to a % of difference ? how to quantify the difference ?
- shape recognition ? (take into account translation, scale, rotation)
- color difference ? ( blue square vs red square ?)
...
This is a good start (among tons of good links):
(link to PDF) http://cmm.ensmp.fr/~serra/communications_pdf/C-74.pdf[^]
Remember that the human brain is _VERY_ good at doing those kind of things, but computers are still very dumb at it.
Good luck.
This signature was proudly tested on animals.
|
|
|
|
|
Thanks for the replies,
the input images are black and white images of the same object(Boat in a water). I would like to be able to have a percentage(%)of differences and if possible, to make a pixel based comparison.
Thanks,
Franckesh
|
|
|
|
|
This may be of help.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi all,
I want to create a simple proxy server, the process is like this. From a defined URL the request comes to the proxy server, and the proxy server select a URL based on it external process and re-direct to another URL. How can I implement this? Any examples really appreciate.
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
HI All,
While installing my Application's MSI , it has to prompt for ODBC Data Source Administator Dialog screen , from which i can select my DSN name , UID , PASSWORD...
Please let me know ..
Ur Help much Appreciated.
Regds
Jain.
|
|
|
|
|
Hi Jain,
the ODBC Adminstrator dialog is a control panel applet named ODBCCP32.CPL. It is found in %WINDIR%\system32. The dialog is opened with control.exe like this.
C:\Windows\System32\control.exe ODBCCP32.CPL
Regards
Frank
|
|
|
|