|
DavidCrow wrote:
From what I can tell, you only need one of the overridden methods. The second one can be used on either the left or the right side of an assignment statement.
Unless you want to call it on a const object to read the value...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I need to watch for a particular window on the screen. There are two approaches - to use a timer, say with an interval 500 ms, and use the FindWindow() function to check if that window has appeared. Another would be to use a system wide hook to monitor all events, filter out the window create events, and check the caption. Which one would take less system resources.
Is there a way to compare system performance with background processes running?
|
|
|
|
|
Hi all,
I have two views, one of which is associated with a document. this view can be used to open a modal window which performs an operation on some data, and then it is closed. This window creates an array which i need the other view to access; the other view also needs access to the document data!
i can't see how to do this !
can anybody help ?
Paul.
|
|
|
|
|
Hi Everybody !
Could you tell me when it occurs the worst case (n*n) and the best case in quick sort algorithm ?
Thank,
Nguyen
nguyen_nd
|
|
|
|
|
I'd say let professor google answer this ...
anyway, if I remember correctly, it's when the data is already sorted; but I don't remember the justification ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
The partition-exchange sort (i.e., quicksort) algorithm performs the worst when the data is already sorted. Its best case is O(N lg N).
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Does anyone know direct download link for
Microsoft Exchange Development Kit (EDK)
I am not able to find it on Microsoft pages.
Thanx
viliam
|
|
|
|
|
|
That is not exactly what I am looking for.
I need EDK (something like SDK)
Header, and Lib files and these are just
tools.
Thanx anyway
viliam
|
|
|
|
|
Hi all,
Where can i find atl service s tutorial for the very beginner?
10'x
|
|
|
|
|
Hi all,
I have an issue related to pocket pc.
I would like to find out how I can delete the most recently opened files or programs in the pocket pc..
I mean I have an uninstallation where I want to remove the icon in the most recently used program group.
thanking you
|
|
|
|
|
I don't have a solution but I think you'll have more replies if you try the Embedded/Mobile forum
|
|
|
|
|
Hi !
I need to retrieve the most significant digit of a number. This must also be rounded to the inferior 'unit'.
Example:
I have 5238.12 and I must have 1000.00
I have 0.02578 and I must have 0.01000
I have 5.45 and I must have 1.00
Any idea ?
Thanks
|
|
|
|
|
Try this code:
d=pow(10,(int)floor(log10(f)));
f=input, d=output.
|
|
|
|
|
Great !
I found the same solution as you at the same time (but your explanation is simpler that mine )
Thanks
|
|
|
|
|
Ok I've found a solution: I can calculate the log10 of the number. I round the solution to integer value. This integer value will give me the number of zero of the number
for 5238.12 the log10 is 3.7192. So I know I have 3 zeros...
Negative numbers will give me the floating point position.
|
|
|
|
|
Cool!!!
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Hi,
I have 25 dialogs who's contols have no access keys or tab order assigned to them.
I was thinking that these two processes are both automatable.
does anyone know of a solution that would auto-tab order and auto-access key my dialogs?
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|
|
The controls do have a tab order. It's the one defined by which order they appear in, in the dialog template.
Steve S
|
|
|
|
|
I need to use a percentage in a dialog box to see the evolution of a process. Are there any functions for that? I would like to change a text field with the evolution of a Progress Bar. Do you have any idea ?
Thank's for advance
|
|
|
|
|
|
Hi another question... ok I've got CSplitterWnd working perfectly.
I create stuff with CreateStatic, and I wanna pass in a dialog resource (IDD_SOMETHING) designed in the resource editor to the view with CreateView... So how do I pass in CFormView into CreateView?
CreateView(0, 0, RUNTIME_CLASS(CFormView), CSize(0, 0), &ccontext);
does not work... or do i need to derive a class from CFormView and pass it in instead? please help... thanks in adv...
|
|
|
|
|
Yes, you should derive a class from CFormView . Remember to use DECLARE_DYNCREATE in the class declaration and IMPLEMENT_DYNCREATE for the class in a source file.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
hey all below is a bit of code that i am working on at the moment - it a region growing function.... initially i had it written as a recursive function, but i was running into problems related to running out of stack space. so i need to rewrite it as a non recursive function, but i am stumped as to how? Can anyone provide some hints or tips??
Recursive version of the function(s) follow
// Code is called by
void CAviView::RegionGrow(CPoint pt_in) // Issue when coming out of region growing process -
{
MessageBox("Region Growing function called", "Region Growing", MB_ICONERROR | MB_OK);
CPoint realxy;
int threshold; // Amount of difference allowed in order to pass test test-conducted to determine if similar enough for same region
BYTE r,g,b;
threshold = 50; // Use 10 as initial value for threshold on region growing
realxy.x = int(pt_in.y / m_smallestscalefactor); // SURE now, they are correct.
realxy.y = int(pt_in.x / m_smallestscalefactor);
m_bmp.GetRGB(realxy.x, realxy.y, r,g,b);
m_bmp.SetRGB(realxy.x, realxy.y, RGB(255,g,b)); // possibly get the original values for B and G
Check8Neighbours2(realxy, threshold);
//m_isRegionGrowing = false;
Invalidate();
}
//Actual recursive implementation of the function.
bool CAviView::Check8Neighbours2(CPoint pt_in, int thresh_in)
{
bool match = false;
int startbval = m_bmp.Get256Level(pt_in.x, pt_in.y); // initial brightness value of selected start pixel
BYTE r,g,b;
int threshold = thresh_in;
int testbval;
// Should this RegionMap be a local or a global variable??? - how does the recursive nature of this functoin handle it?
m_RegionMap = C256GreyDIBitmap(m_bmp.Rows(), m_bmp.Cols(), 1); // This bitmap should hold a map of which pixels lie in which regions regions are given by the 256grey level allowing for up to 256 different regions in any given image
m_RegionMap.Set256Level(pt_in.x, pt_in.y, 1); // 1 = In selected region, 2 /200 = NOT in selected region
CPoint new_pt;
for (int i = -1; i < 2; i++){
for(int j = -1; j < 2; j++){
int m=pt_in.x+i;
int n=pt_in.y+j;
int test2 = m_RegionMap.Get256LevelSafe(m,n);
if ( test2 == 1 || test2 == 200){
}
else
{
testbval = m_bmp.Get256LevelSafe(m, n);
if (abs(testbval - startbval) < threshold){
TRACE("\n trace test2");
m_bmp.GetRGB(m, n, r,g,b);
m_bmp.SetRGB(m, n, RGB(255,g,b));
m_RegionMap.Set256Level(m,n,1);
new_pt.x = m;
new_pt.y = n;
if (( (1 < m) && (m < (m_bmp.Cols()-1) ) && ( (1< n) && (n < (m_bmp.Rows()-1))))){
TRACE("\nFound 1 positive match");
Check8Neighbours (new_pt,threshold); // ?? Problem lies in the recursive calling of this function?????
}
}
else{
m_RegionMap.Set256Level(m,n,200); // USE 2 or 200 to designate a different region area. ie. pixel has been tested and thrown away as not in region1
}
match = true;
}
}
}
// Use bitmap display for visual check of R egionMap
CBitmapDisplayDlg test3(m_RegionMap, "Testing");
test3.DoModal();
return match;
}
|
|
|
|
|
I need to download end of file only,
of know size.
How to do it?
I searched WINHTTP and Wininet libraries reference,
and not find such a method,
but it is widely used in download managers.
Can someone point me a library and methods that can do this ?
(library can be else than two cited here, but free).
thanks.
|
|
|
|