|
Okay got it thanks. It's in "view" property.
|
|
|
|
|
How do you route message to a view?
I have a CFormView. I want to handle menu events in my View. But my CFrameWnd is actually capturing the events of the Frame level. For example, I want to handle Window-maximize event from my CFormView. Or if there's a way I can route the message from CFrameWnd to CFormView, it'll be great. Any idea?
|
|
|
|
|
grassrootkit wrote: I want to handle menu events in my View. But my CFrameWnd is actually capturing the events of the Frame level
Only if you have relevant handlers in your frame?
I have a vanilla SDI app. I've just added a handler for ID_FILE_OPEN to the view class. It caught the relevant message.
For the maximize event, you will have to explicitly route the message. Add the following handler to your frame class and your view should get visibility of maximize events.
void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
GetActiveView()->SendMessage(WM_SYSCOMMAND, nID, lParam);
CFrameWndEx::OnSysCommand(nID, lParam);
}
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Also Stuart, how do we access the Document from a Dialog that I added through "insert new dialog" in resource option?
|
|
|
|
|
Well, you would need to tell the dialog about the document. You could add a CDocument* member variable to the dialog and set it before you call DoModal .
Alternatively (and I prefer this one), just pass the relevant attributes of the document to the dialog, so the dialog doesn't need to know about the document - letting the dialog have visibility of the document class upsets my aesthetic sense.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi to all again,
Here is an another doubt of mine.
while creting an mfc application it ask "how would you like to use the mfc library" .And the options are
1. as a shared dll
2. as a static linked library
What does this actually means?What is the difference?Is there any relation between this option the exe size.
Thanks in advance
I am a beginner
|
|
|
|
|
It specifies how you will link to the MFC libraries:
- static linking, in which case, all the required MFC functionalities are imported into your application. Which makes the exe size larger.
- dynamic linking (dll), in which case you use a MFC dll which makes your exe size much smaller. The draw back is that you need to distribute the MFC dlls along your application (if they are not present on the target machine).
|
|
|
|
|
(probably bad explanation, I'm still not fully awake)
1. Will use the shared MFC dll : meaning that if you have 2 different MFC applications with this setting, they share the MFC code in the DLL; meaning the MFC code is NOT included INSIDE your application, making it size smaller. There are potential issues if there are different versions
of MFC dll installed (or not) on the target machines (refer to DLL hell), most of the time you will need to ship your application with the "redistributable" (sp?) DLLs, makeing the installation packages bigger.
2. static linked : ill include the MFC code INSIDE your application, making it fully independant and stand-alone, and should run on target machines without MFC installed; this will make the application bigger, but will remove most (if not all) external dependancies, and limit DLL hell.
This signature was proudly tested on animals.
|
|
|
|
|
I think someone explained you few hours before.[^]
When you statically link it. (just like you link an MFC runtime) This gets added to your executable. You will not have a dependency but the executable size becomes bigger. When you link dynamically, the dll is kept independent and your exe uses it everytime and hence the advantage. Any number of exes can share the same dll.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
I am using spread controller in my code.(i am using farpoint7.0)
I have spread data like
This is header one1
Type | col1 | col2
-----------------------------
GroupA | 35 | 38
AA | 12 | 11
Bb | 12 | 13
cc | 11 | 14
when user right click on header GroupA row also getting sorted.
i don’t want to sort first row always how to do it ..please help me out…
|
|
|
|
|
Wouldn't this question be better asked here?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
please help me to draw a arc betwwen two lines without using windows API.
and then i have to find angle betwwen these lines.
this code is being written for a embedded project in VC 6 thats why i cant use windows APIs.
|
|
|
|
|
Your question is a bit vague. Which information do you have for each of the lines ?
vikas choudhry wrote: this code is being written for a embedded project in VC 6 thats why i cant use windows APIs.
And how will you draw something if you can't use the windows API ? With your pen maybe ?
There is still a windows API even if you develop for an embedded platform.
|
|
|
|
|
Well, for instance, my mobile phone hasn't Windows API ...
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
[My articles]
|
|
|
|
|
You must give a more vague reply to this kinda questions lol
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
actually i am new in this field thats why i wrote as per my scope and thats why i am here to take help from you guys...
so details for first question-->
i have these three co-ordinates for these two lines.
these arc will be drawn basically to show angle measurement
and in this product there will be some RTOS thats why i wrote not to use windows API..i may be wrong in this context
|
|
|
|
|
Are you afraid of giving details ?
vikas choudhry wrote: i have these three co-ordinates for these two lines.
Which 3 coordinates ? I guess (but it's just a guess) the coordinates of the intersection point, and of the two other end of the lines ? Are the two segments the same lenght ? If yes, that would help a lot because then you know that the center of the circle is the intersection point.
vikas choudhry wrote: and in this product there will be some RTOS thats why i wrote not to use windows API
You told us you were using VC6 . So, which platform are you targeting ? To draw something on the screen, you'll probably need to use OS specific functions.
|
|
|
|
|
If you have the coordinates of three mainingful points (for instance one of them must be the intersection between the lines ) then you may calculate the component of the vectors, take the dot product, divide by the vector modules and finally use the inverse cosine function to get the angle (well one of the two...).
As about drawing without APIs, I have a suggestion: [^].
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
[My articles]
|
|
|
|
|
1. Find the forumla to generate all the points[That makes up the arc] between given two points.
2. SetPixel() all those points.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
vikas choudhry wrote: please help me to draw a arc betwwen two lines without using windows API.
vikas choudhry wrote: this code is being written for a embedded project in VC 6 thats why i cant use windows APIs.
What API could you use?
vikas choudhry wrote: and then i have to find angle betwwen these lines.
That's not difficult. Have you the equations of the two lines?
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
[My articles]
|
|
|
|
|
Oh, I by the way, as far as I know, VC6 supports only win32 platforms. At that time you had to use Embedded VC4 (or something like that).
|
|
|
|
|
(don't know the exact functions to call, but it should be simple enough to google for them)
( I wish I could draw something, it would make things easier to explain)
0. compute the angle between the first line to the X axis, compute the angle between the second line to the X axis;
1. find the intersection of the two lines; the intersection point will be the center of the arc (which is a section of a circle)
2. find a point on each lines that have the same distance from the center; this will be the radius.
3. Use the CDC::AngleArc ( or ::AngleArc) to draw the arc between the 2 angles. (i.e. from the first angle to the second angle).
This signature was proudly tested on animals.
|
|
|
|
|
can somebody provide me the sample code to draw a arc between two lines.
i have intersection point of these two lines and end points of these lines. now i have to use set pixel or any other standard vc++ function to draw it.
other way is to generate all point of a arc and then use set pixel but i dont know how to use it
|
|
|
|
|
Hi There.
I have a Win32 dll project, though I am successfully able to create dll file but there is no lib file created.
Please suggest, why this is so.
Thanks
Pankaj
|
|
|
|