|
Hello everebody.
I have two ScrollViews placed in a separate SplitterWnds - FirstView and SecondView. I need to sync vertical scrolling between these two views - when I scroll FirstView vertically, I need SecondView to be scrolled vertically by the same amount. Vertical sizes of the views (SetScrollSizes) are the same. So, I override OnScroll function in FirstView and retransmitt all the data from one view to another. If both of views have horizontal scroll bar - everything works just fine (LINEUP/LINEDOWN, PAGEUP/PAGEDOWN, MOUSEWHEEL). But I have a problem when FirstView hides horizontal scroll bar - SecondView scrolls up/down more than first by height of the horizontal scroll bar, and this is right, because it has horizontal scroll bar. But I do not want it to do it "right"
The solution is to prevent horizontal scroll bar in FirstView from hiding, I think. But I do not know where and how to do it in a scroll view. Or, maybe the solution is ...
Thank you for answering ...
|
|
|
|
|
Hi All,
Actually I am looking for the free continues of NTFS file system.
How could I do that?
Is this possible with FSCTL_GET_VOLUME_BITMAP with DeviceIoControl?
If yes please help me to achieve this.
Thanks in Advance...
|
|
|
|
|
MPTP wrote: Actually I am looking for the free continues of NTFS file system.
Do you mean free clusters?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
In that case, i think FSCTL_GET_VOLUME_BITMAP will suits your need. Check this code snippet[^] about how to call it.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thank you, I will look into this.
|
|
|
|
|
Hai!
This is a silly doubt?
is there any function in VC++ to extract a substring :
for ex.
CString str = "My name is Vicky";
CString substr;
substr = CSTRINGFUNCTION (str, 11, 5);
the sustr will contain "Vicky".
Is there any direct function or i have take a loop and pick up each character??
Thanks!
|
|
|
|
|
If your substring is on the right, you can use CString::Right[^]. If it this in the middle, you can use CString::Mid[^].
By the way, looking at the documentation can be very helpfull sometimes...
|
|
|
|
|
CString::Mid
Enjoy!
Iain.
|
|
|
|
|
kapardhi wrote: substr = CSTRINGFUNCTION (str, 11, 5);
To
substr = str.Mid(11, 5); .
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
We are Deriving a class from CGXGridView from stingray.
I want to select multiple rows and update the information in that.
Is there any method to Find First Row and Last Row in Multiple selection in the Grid.
Thanks,
Rayalu
|
|
|
|
|
can anyone tell me about difference between Events and Functions ,is there any difference regarding their processing
|
|
|
|
|
Events ? In which context ? This is such a generic word that it is used for a lot of different things. Are you talking about windows messages ?
|
|
|
|
|
I dont know why you asked this question but see here[^] for event.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
As both Cédric and Hamid suggested, your question is not very clear what you mean regarding the concept of "events".
But in my opinion the only meaning of events where it makes sense to be compared to functions is in the sense of windows messages. If you mean something else you can stop reading here.
Windows is a so called "event-driven" operating system.
This means that every action will generate an event, which in windows is represented by a message.
If you wish to react on a certain action, you write a message handler for the message; e.g if you want to do something when the user double clicks the left button of the mouse, you write a message handler for the WM_LBUTTONDBLCLK message.
Regarding "functions" you must of course write functions and call them in order to do the things you want. But this also means that if you're spending a lot of time in a function call chain, the user will find the user interface inresponsive because you are not handling messages. To prevent this unpleasant user experience, it's common to use worker threads that run in the background performing lengthy operations.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Yes and no ... it mostly depend on the language and on the programming model.
The conceptual difference is that a "function" is something you call to get a work to be done for you.
An event is something you call to inform "someone who may listen" that it may have some work to do for itself.
Then, since everything has to work on a Von Neumann machine, events are "handled" by functions (but "aren't" themselves functions).
In more "real life": a function call is a capability you expose to me, that I can call: like me telling you "please do this calculation" (And Im'interested in the result).
An event is a capability I expose to let you able to do your job, like "please be informed that a mail has arrived".
I'm not directly interested in what you can do with it. Just know you wish to be informed about.
Just note how in both the example, the active subject (the one that "owns" the timing) is always "me". If you invert, than event and function also invert their role.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hi all,
i m already using a Imagelist in Treectrl.
i want to use a back image for treectrl.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
"_$h@nky_" wrote: please tell me how can i do this.
I don't think there is a function to set back ground image for a tree control. How ever you can draw an image by deriving a class from CTreeCtrl and the draw the image by overriding the WM_ERASEBKGND message.
|
|
|
|
|
After decades of fun we now have to stop using MFC in the project.
How do I get this to work? I want a simple solution, because I have this about 1000 times in the code. I tried those answers which seemed obvious to me, but it does not compile.
const char CODE_N = 'N';
string SK::getCode() const // was CString
{
return CODE_N;
}
1>..\path\SK.cpp(1423) : error C2440: 'initializing' : cannot convert from 'const char' to 'std::basic_string<_Elem,_Traits,_Ax>'
-------------
Bibo ergo sum
|
|
|
|
|
|
Thankyou for your quick reply.
I realise I had hit on one of the few const char definitions which only has one character. Those with more than one worked fine the way it was.
-------------
Bibo ergo sum
|
|
|
|
|
I used the CWnd::GetClientRect function but it returns a rect with top=0,bottom=0,left=0,right=0,the dialog is not minimized why it happens
|
|
|
|
|
Are you sure you'd able to see the Window? From Which function you're calling this ? Have you declared any variables having same name in different scope and referring false one? Can you post the snippet?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Did you use of GetLastError for get info about error?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|