|
Your project may be built on release mode
|| ART OF LIVING ||
|
|
|
|
|
Thank U,but my project is on debug mode,the release control can use,but the debug one can not
|
|
|
|
|
kingliub wrote: but the debug one can not
Right, and ?? What is the problem ? You get a crash, a compilation error, a blue cow coming out of your screen, ... ?
Please, be more specific and explain what the problem is.
|
|
|
|
|
Cedric Moonen wrote: a blue cow coming out of your screen, ...
He's gonna need a bigger debugger!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thank you,the problem is: when I use the debug one in my project,an error_dialog comes out the moment I change the property`s value,on the dialog:
Debug Assertion Failed!
Program:...\MSDev98\bin\MSDEV.EXE
File:afxwin2.inl
Line:171
For information...
then is three buttons: stop retry ignore
but the release one is ok.
|
|
|
|
|
My email Id is shivditya@yahoo.co.in
Let me tell you thing which I am not sure.
You can not use ActiveX controls developed in debug mode.
Because it is not possible to debug activex control.
It is possible to have debug dll but not debug activex control.
Any way you can send I will try to resolve.
|| ART OF LIVING ||
|
|
|
|
|
Hi
Has anyone ever tried to implement xp theme for menu?
I am getting good results with all class types exept MENU.
OpenThemeData(hWnd, "MENU");
Am not able to get a handle to the MENU theme.
Any commends would be of great help.
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
I am building application as secondary identification server for ATMs.
My application is fine. But just for pictorial representation I want to show
ATM line on dialog who alls thread is currently active. I am planning to
show on dialog it self. (Or I have to develop separate ActiveX for doing so,please suggest)
while showing on dialog , I am not getting crash of GetWindowRect and device context
of dialog window may not proper.It crashes at ::GetWindowRect Of groupbox in which I was planning to show the running threads.
I am not sure why crash is occuring. I am not sure devicecontext I can obtain.
|| ART OF LIVING ||
|
|
|
|
|
Why wouldn't you use a custom window for that?
|
|
|
|
|
Custom window means what exactly you want to suggest.
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: I am not getting device context
of dialog window properly
You can draw on the dialog just like any other window.
GetDC() gets a DC to the client area of the window
GetWindowDC() gets a DC to the entire window
If you draw in response to WM_PAINT, BeginPaint()/EndPaint() can be used to acquuire a DC
or you can use the above APIs and handle the invalid region yourself.
If you draw in response to WM_ERASEBKGND, a DC is provided.
There's no threadsafe GDI - all drawing must be synchronized (and flushed) if you're using
multiple threads for drawing.
shivditya wrote: and it crashes at ::GetWindowRect Of groupbox
Crashes how and why?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thats what I am also surprised how ::GetWindowRect crashes when my Id is proper, and I am passing handle which I checked with spy as proper ,Still it crashes very badly.
|| ART OF LIVING ||
|
|
|
|
|
GetWindowRect takes an HWND not an ID. How are you calling it? Where are you calling it?
Do you have a valid HWND for the control?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I am very sorry yah I am passing only hadle and pointer to RECT.
I found that handle from ID.But Problem is there,as I used this fnction so many
times It works fine.
|| ART OF LIVING ||
|
|
|
|
|
I can't imagine what the problem is. Maybe a bit of debugging on your end will help?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Why draw on the dialog? Why not draw in your own window that is a child of the dialog?
Of course while drawing on a dialog it's a good time to eat your Fish Filet
Actually I am not sure he needs to draw, maybe just use a static control and put some text in it, hard to say from his post. I think he really needs[^]
|
|
|
|
|
Yeah....you're just trying to drag me into this, huh?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Was it a joke or anything. No doubt my total VC experience and total experience is 1.5 years , and Basically I am Mechanical Engineer, but right now I am developing
FingurePrint Identification Server For ATM Parallel to Main Switch for Identification
Aplab India,
Near CheckNaka,
Thane(W),
Maharshtra
India -400604.
I am putting in joke to bypass from main discussion.
|| ART OF LIVING ||
|
|
|
|
|
I am not that master of VC ,but I have to work on very higher end.
I need to show somehow how many atms ,which all atms are currently running.
Doubt is lack of Life force , Answers cannot satify doubt Only Art Of Living Can Solve www.artofliving.org
|
|
|
|
|
shivditya wrote: It crashes at ::GetWindowRect Of groupbox in which I was planning to show the running threads.
"show the running threads" what does that mean? Show them how?
If you just want to display some text put a static control in side the GroupBox control and then SetWindowText on the static control.
|
|
|
|
|
No not like that.
Just like bar graph
I said Group Box Because ,I Just kept groupbox to have some border around
Graph. And I was taking its rect because I was willing to have some
Base coordinates.Which ATM is running ,graph line will be shown for it on y axis.
And ATMs will be on X axis.
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: Just like bar graph
Ok then you definitely don't want to draw that on a dialog that has other controls on it. You want to make your own window and draw the graph in there then that window is placed on the dialog as a child like other controls are. If you are using MFC you just derive from CWnd then in the dialog you setup the window as a child using whats called "subclass"ing.
Have you looked at the C++ articles here on CodeProject. I would imagine there are some that walk you through all of this. There is probably even a article with code that will draw the bar graph for you.
|
|
|
|
|
Thanks I will Search for it.
Conclusion
1) Drawing on dialog is not so easy.
2) Subclassing will help // I dont
3) Can diretly add classes which are already developed.
Will you please redirect me to what exactly you mean by placing child window on dialog.
class CDerived : public CMyMainDialog
{
--------
};
CMyMainDialog cm = new CDerived()
cm.Domodal();
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: Will you please redirect me to what exactly you mean by placing child window on dialog.
It's called subclassing and you should find tons of articles here on CodeProject in the C++ and/or MFC categories that will help in this subject.
|
|
|
|
|
shivditya wrote: Conclusion
1) Drawing on dialog is not so easy.
2) Subclassing will help // I dont
3) Can diretly add classes which are already developed.
1) Drawing on a dialog is just as easy as drawing on any window. It's just not a good solution
beyond maybe drawing a custom background.
2) You're using MFC - the subclassing is done for you if you use CWnd as a base class.
shivditya wrote: what exactly you mean by placing child window on dialog.
Every control on your dialog is already a child window of the dialog. It seems logical, then, if
you need an area of the dialog to draw in then you should use a child window to do so.
You can place your child window on the dialog just like you'd use a child window anywhere -
1) Implement the window class, or use an existing window class, perhaps 3rd-party code
2) Create a child window object of that class
3) Create the Windows object (HWND) for the window object, using the dialog window as the parent
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|