|
And alBotAngle has got 9 elements?
And alWindMagnitude has got 8 elements?
|
|
|
|
|
Just some checks.
both arrays are having 9 and 8 elements respectively. Is it intentional?(
One very optimistic way, try to comment line one by one
-- modified at 1:44 Friday 28th October, 2005
Oh ! O! I've same suggestion as Kakan
|
|
|
|
|
NeverFall wrote: All it does is set values in an array (-.-)
How is alBotAngle and alWindMagnitude defined in the class?
-prakash
Learning Symbian | Personal views
|
|
|
|
|
They're defined as private.
Declaration:
long alBotAngle[9];<br />
long alWindMagnitude[8];
|
|
|
|
|
CxxxxDlg dlg;<br />
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();<br />
<br />
CTristramCore::CTristramCore()<br />
{<br />
initConstants();<br />
}
how is CTristramCore initiated in the dialog class?
Sorry, i am asking too many questions, just trying to get to the Root cause
-prakash
Learning Symbian | Personal views
|
|
|
|
|
It is declared in the dialog class under the private section:
<br />
private: <br />
static UINT SetToTop(LPVOID pParam);<br />
void SetToTopEx();<br />
<br />
void updateFireAxis(int iFireAxis);<br />
void initiateMainCall();<br />
<br />
CTristramCore CoreEngine;<br />
<br />
bool m_bRunning;<br />
bool m_bTransparencySupported;<br />
};
|
|
|
|
|
Seems to be very weird, I tried to replicate the logic on my system and I did not get any access violation.
There could be more complex problem.
the statement you said where the exception occurs, seems to be safe.
I am kinda giveing up on this due to less informtion tht I have about your project than you have. Sorry about that.
I suspect if there is something to do with the LHS pointer.
apologies again.
-prakash
Learning Symbian | Personal views
|
|
|
|
|
I've tried to find help on here and I didn't find the answer, or recognized when something did tell me the answer.
First, the dialog question. When I create an SDI or MDI project, the document that's created just has a white space which I draw in. I want to replace that with a tree control and I don't know how to do that. Is that white space something set and called for somewhere or is it just a void? I want to put a tree control in it's place (bevel and all) and I don't see where to do that.
Second, the combo/list box question. How do I make a custom list box like the one in Windows SP2's available wireless network dialog. Under it says "Choose a wireless network" and each large item is in a list box of sorts but it has all kinds of things inside. How do I make that, it won't be as complex as that, but it'll be too complex than just text. I figure I'll override the combo box class but I can't find any info on how to actually do it all.
Thanks in advance, Nate.
|
|
|
|
|
LighthouseJ wrote: I want to replace that with a tree control and I don't know how to do that
I forget the name of it, but the class you derive your view from should be something like CFormView, and then you get a dialog template you can put controls on for the view.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
As far as your first question goes. The View that you are having is a normal view where u draw. If you want to put a Tree Control in there, you have couple of ways to achieve that.
1. You can try using CFormView and in the dialog box u can have tree ctrl view.
2. If you want a drawing view also with this view, you can put a frame in it and make it the parent of another view.
You can do lot of different stuff just by using child parent relationship and types of views. You would be surprised to see what all. Just try a little innovation and creativity and you have it.
Second question I am not sure exactly what you are trying to achieve. In any case you can create your own activeX control which contains both list ctrl and combo box etc. You can combine both of them with no big difficulty. If you are specific I would be able to help you.
|
|
|
|
|
To clarify the second question...
The standard list box is just filled with a line of text. I'm looking to build a list box like the one used in the list of wireless networks box in Windows. In there, each item has a couple text items and pictures. Another example would be the Add/Remove Programs dialog, where it has the program icon, the title of the software package, more text elements and a button or two. I want to make each item taller, fill it with multiple text items and possibly a picture. I'm thinking I could just derive a class from the regular tree view, and proceed but I don't know what to do.
ps. I'm investigating CFormView now, thanks to Christian Gaus and yourself.
|
|
|
|
|
LighthouseJ wrote: CFormView
Yay - I got it right !!!
LighthouseJ wrote: I want to make each item taller, fill it with multiple text items and possibly a picture.
You can derive a class from the tree view, and make it owner drawn. That means you write the code to show the text and image, at whatever height you like ( well, you can change the height of a menu item, I assume you can do it for a tree item also ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think the CFormView will be fine, I've just broken the first chip off the CTreeCtrl block.
As far as the owner drawn thing, I want to do that to a list box, not the tree view from the previous problem, but I have no doubt the list view can be owner drawn. That's for another day.
|
|
|
|
|
I'm using Visual Studio .NET 2003 in C++. I'm trying to build a re-distributable application that is a Debug build (for a multitude of reasons) but one that is not using MSVCP71D.DLL and MSVCR71D.DLL. I want to use the release versions of these libraries (MSVCP71.DLL and MSVCR71.DLL). I didn't really thing it was a big deal.
In the projects property pages, I changed the C/C++->Code Generation: Runtime Library to be "Multi-threaded DLL (/MD)" from "Multi-threaded Debug DLL (/MDd)". I rebuilt the application. I used the Dependency Walker to check and it was linked to both versions of these libraries still!
This application statically links with a bunch of our static libraries. So I modified all of those libraries option for the Debug configuration to also be set to the /MD option. Rebuilt *everything*, rebuilt the application...no change!?
Is there something I am missing?...some property page setting I'm overlooking? Is there a tool to help me figure out why its linking against MSVCP71D.DLL? The Dependency Walker (the one packaged with MSVC++ 6) is nice, but it is showing this file to be a the top level of the tree; no help.
I'd appreciate any comments.
PS>I had a similiar issue with building this project which statically links an Intel Fortran library which was using debug DLL's (non-redistributable). Changing the Fortran libraries property to "Multhread DLL" solved the problem...
|
|
|
|
|
Gunn317 wrote: I'm trying to build a re-distributable application that is a Debug build (for a multitude of reasons) but one that is not using MSVCP71D.DLL and MSVCR71D.DLL
not a good idea. the debug versions of things like malloc and new (for example) are different enough from the release version that mixing them can be fatal. (ex. alloc with debug's malloc and de-alloc with release's free = boom)
Cleek | Image Toolkits | Thumbnail maker
-- modified at 10:24 Friday 28th October, 2005
|
|
|
|
|
Thanks for the reply. I don't want to mix them; I want to use the release version of all of the DLL's so I can distribute my app. But the app itself (our source code) needs to be built in debug mode so users can step through it. This is an example application that gets distributed/installed with our app.
I still haven't gotten it to work yet; msvcp71d.dll continues to be linked in, and I have no idea how!?
|
|
|
|
|
|
Thanks for the reply. We don't use MFC; that option is set to "Use Standard Windows Libraries". Anyway...I fixed my problem!
I used the linker option /VERBOSE to see information on libraries being searched and processed. What I got was a bunch of information, beginning with:
<codelinking...
starting pass="" 1
processed="" defaultlib:msvcprtd
processed="" defaultlib:uuid.lib
...
processed="" defaultlib:msvcprt
<="" code="">
I looked in the help and found that msvcp71d.dll is included from msvcprtd. I have no idea why this is being included as a DEFAULTLIB! And you can also see that the release version is also included at the very end of this list.
This also explains why my 'Ignore specific library' of msvcp71d.dll didn't do a thing. That is because that option will only ignore a library if it is found in this list. So, I added 'msvprtd' to the 'Ignore Specific Library' field. When I relinked, that first line was gone, and using the Dependency Walker, my app was now linking with the release libraries.
Thanks for the help,
|
|
|
|
|
I need to add nodes to a list regardless of its structure...I don't know how to do that since when the pointer is declared, it points to a certain data type, which needs to be generic...
Moreover I need a way to sort that given list on many criteria, where maximum n is the number of fields in the structure, and those may be numeric or alphanumeric.
(what I did before was if (crit1a = crit1b)&&(crit2a>crit2b) {switch...}, a more elaborate version of that, but my problem is mainly the generic issue)
............I'm so helpless..... Thx in advance!!!
|
|
|
|
|
Mariano Lopez-Gappa wrote: since when the pointer is declared, it points to a certain data type, which needs to be generic...
Just make it a void pointer. When it comes time to dereference those items in the list, however, you'll need to know what type each points to. Consider:
void main( void )
{
int Int = 5;
double Double = 12.34;
void *pVoid;
pVoid = ∬
printf("%d\n", *((int *) pVoid));
pVoid = &Double;
printf("%f\n", *((double *) pVoid));
}
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
thx for the help. it's been really useful. i'm a step closer to the solution but theres still an issue:
the actual matter about the generic list is that, in this program, the user gets to decide what "fields" of a database get on the list. so for each user, or even for the same user changing the configuration, I get a different kind of list.
so I gotta work on some kind of generic way to use those list, otherwise the number of field combinations are virtually infinite!
another thing...I haven't been able to figure out a way to apply the n-criteria sorting, the numeric-alphanumeric thing is easy, but first of all I don't know WHICH or HOW MANY fields I have, and also it gets confusing how to apply the sorting in a generic way...
this problem looks pretty complex...hope someone gets it right! thx in advance!!
|
|
|
|
|
Mariano Lopez-Gappa wrote: the user gets to decide what "fields" of a database get on the list.
This is probably a silly question but why not use the database to do the sorting for you? I do this all the time. I create a query based on what fields the user wants. Too slow or possibly you are making your own database??
John
|
|
|
|
|
I'm not going to use MFC, nor any database as I need my program to work on a 486 dx2. Also the purpose of the list is to display multisorted information on a grid.
Thx anyway! keep talking ppl plz!
|
|
|
|
|
Hi,
I think that each "certain data type" must have a common base class,
which could be as simple as
class CBase {
... Constructor/Destructor...
UINT m_type;
// The class type.
UINT GetType () { return m_type; };
};
Suppose you had various other classes CA, CB, CC, CD derived from CBase
Then the comparison routine for the sort could switch in the following way
int Compare( const void *e1, const void *e2 )
{
// handle element e1
switch ( ((CBase *)e1)->GetType() ) {
case TYPEA:
CA *A = (CA *)e1;
--- set some criteria based on CA info ---
break;
case ...
etc.
// handle element e2
switch ( ((CBase *)e2)->GetType() ) {
case TYPEA:
CA *A = (CA *)e1;
--- set some criteria based on CA info ---
break;
case ...
etc.
// Now make the comparison based on information generated in the
// last 2 steps.
--- comparison code ---
}
Id be interested to hear if anybody can think of a more general/elegant way to do it!
Cheers,
Dave
|
|
|
|
|
Hi
Bare with me for this question for its not VC++...but since my app is in win32 I am posting this question here.
I have a circle , say center cx,cy and radius R. At any point the user clicks either inside or outside the cirle ( but not too much far away from the circle). Say that point is ux,uy.
Now I have find the point on circle(say x,y)relative to ux,uy. ie,
I can imagine a line L starting from center to ux,uy, and the point where line L and circle meets is x,y. I ux,uy is inside the circle I have to extend the line L to meet the circle. How do I find x,y at any time.
I could'nt include the diagram here. so I am trying to clear as much as I can.
Thanks in advance.
|
|
|
|