|
Have you added ON_UPDATE_COMMAND_UI() to the message map? If so, have you set a breakpoint in the handler function to see if it's being called (which is only during idle processing)?
"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
|
|
|
|
|
Yes, have added command in MESSAGE_MAP of MainFrame as
ON_UPDATE_COMMAND_UI(ID_INDICATOR_WHAT, OnUpdateWhat)
ID_INDICATOR_WHAT is the indicator for the Last panel on the right in the status bar
a break point in OnUpdateWhat is never hit
|
|
|
|
|
lawrenca37 wrote: a break point in OnUpdateWhat is never hit
Have you added ID_INDICATOR_WHAT to the indicators array?
"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
|
|
|
|
|
Yes
statuic UINT indicators[] =
{
ID_SEPARATOR,
ID_INICATOR_FNAME,
ID_INDICATOR_PROC,
ID_INDICATOR_WHAT
};
and in string table
ID_INDICATOR_WHAT 103
|
|
|
|
|
And you added a string resource named ID_INDICATOR_WHAT and gave it some value?
Do you see the pane in the status bar?
I just created a test SDI app and did nothing but the above and added the ID to the indicators array. Running the app showed 999 in the far-right pane. If you are not getting at least this far, all the rest is irrelevant.
"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
|
|
|
|
|
Yes created a new project, and did all that was in the previous messages and
the what pane is initialized to 0,
Something interesting, I had code in the CMainFrame OnCreate function to resize the status bar width
for(int i=0;i<(sizeof(indicators)/sizeof(UINT));i++)
m_wndStatusBar.SetPaneInfo(i, ID_SEPARATOR, NULL, 100)
Removeing these line produced the initialize WHAT panel just like the test program...can you explain the order of event or why these lines coveted the panel
|
|
|
|
|
lawrenca37 wrote: ...can you explain the order of event or why these lines coveted the panel
No, but I can ask two questions:
1) Why are you changing the ID of each pane to ID_SEPARATOR ?
2) Why are you setting the pane's style to NULL ?
"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
|
|
|
|
|
Excellent questions, I suppose the id parameter should have been indicators[cnt] but is there a way to keep the style and not override it using this call?
Also, once the process inside the view is started, it makes a call to modifyRecCount in the CMainFrame class, this reassigns a new value to the int variable that is in the OnUpdateWhat code, however no update is seen and a break point added to the OnUpdateWhat does not occur
|
|
|
|
|
lawrenca37 wrote: ...however no update is seen and a break point added to the OnUpdateWhat does not occur
Even if you do something like resize the frame?
"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
|
|
|
|
|
by the way if I haven't said it, thanks for the time,
Curious, cannot resize the frame, and if outside the debugger if I say, start it from a explorer window and press my run button, then touch the explorer window, a few seconds go by and the menu bar disappears but then I can resize the window again.. the symptoms tell me it is a control or messaging issue but I don't know where to look for the problem?
|
|
|
|
|
Hello Sir/Madam,
How do I implement arbitrary arithmetic precision in C Programming Language. By using only standard library.
Thanx in advance.
|
|
|
|
|
nowrocktheworld wrote: How do I implement arbitrary arithmetic precision...
"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
|
|
|
|
|
|
I googled before posting this qustion but i didn't find the appropriate answer.
So pls send the appropriate link.
|
|
|
|
|
there are links to at least five different libraries which do this, on the first page of that Google search.
|
|
|
|
|
nowrocktheworld wrote: How do I implement arbitrary arithmetic precision in C Programming Language. By using only standard library.
Are you even serious? Do you expect someone to explain a possible solution to you in a forum reply like this?
Just take a look at the GNU BigNum library if you need a library that implements it.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I don't need the libraries. I need a function and by using that function I wish to implement that one in my program without using any additional library which is not available in the standard template.
|
|
|
|
|
hey i mean with BY USING ONLY STANDARD LIBRARY is that use only header files those are available. Don't use any additional liraries.
|
|
|
|
|
nowrocktheworld wrote: hey i mean with BY USING ONLY STANDARD LIBRARY is that use only header files those are available. Don't use any additional liraries.
Hey, that means you need to write it yourself!
|
|
|
|
|
1. You have to write it yourself.
2. From my understanding, this is a very daunting task and therefore there are very few successful implementations so far.
3. This forum is for asking specific queries, so you can do that yourself and come here to ask *specific* queries.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I don't have any clue dear that how I write a such type of function. So pls help me.
|
|
|
|
|
Can someone please help me with my bubblesort. It does not seem to sort and also prints 3 times.
#include <stdio.h>
#include <stdlib.h>
#include<time.h>
#define SIZE 6
#define MAX 53
void printArray(int N[], int T);
void fillArray(int N[], int T);
int main()
{
srand(time(NULL));
int PICKED[] = {0,0,0,0,0,0};
fillArray(PICKED, SIZE);
printArray(PICKED, SIZE);
return 0;
}
void fillArray(int N[], int T)
{
for(int P=0; P<T; P++)
{
N[P] = (int) (rand()% 52+1);
for(int y=0; y<P; y++)
{
if(N[y] == N[P])
{
N[P] = (int) (rand()%52 +1);
P=-1;
}
}
}
}
void printArray(int N[], int T)
{
for(int P=0; P<SIZE-1; P++)
{
if(N[P]>N[P+1])
{
int T = N[P+1];
N[P+1] = N[P];
N[P] = T;
printf("\nLOTTO PICKS\n");
for(int P=0; P<SIZE; P++)
{
printf("%d ", N[P]);
printf("\n");
}}}}
|
|
|
|
|
I suspect that P=-1 is not what you want.
|
|
|
|
|
First, format your code so that it is easier to read. Use the <pre> tags for this. Second, break your code up into three functions instead of two: fill, sort, and print.
As far as printing, check the two for() loops in printArray() .
In the end, you should end up with something resembling:
void fillArray( int N[], int T )
{
for (int P = 0; P < T; P++)
N[P] = (int) (rand() % 52 + 1);
}
void sortArray( int N[], int T )
{
}
void printArray( int N[], int T )
{
printf("LOTTO PICKS\n");
for (int P = 0; P < T; P++)
printf("%d\n", N[P]);
}
void main( void )
{
srand(time(NULL));
int PICKED[] = {0,0,0,0,0,0};
fillArray(PICKED, SIZE);
sortArray(PICKED, SIZE);
printArray(PICKED, SIZE);
}
"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
|
|
|
|
|
I have tried this, prints out but will not generate random numbers
#include <stdio.h>
#include <stdlib.h>
#include<time.h>
#define SIZE 6
#define MAX 53
void printArray(int N[], int T);
void fillArray(int N[], int T);
int main(void)
{
srand(time(NULL));
int PICKED[] = {0,0,0,0,0,0};
fillArray(PICKED, SIZE);
printArray(PICKED, SIZE);
return 0;
}
void fillArray(int N[], int T)
{
for(int P=0; P<SIZE; P++)
{
N[P] = rand() % 52+1;
for(int PASS=0; PASS<P; PASS++)
{
if(N[PASS] == N[P])
{
N[P] = (int) (rand()%52 +1);
P=-1;
}
}
}
}
void printArray(int N[], int T)
{
int PASS, P;
for(P=0; P<SIZE-1; P++)
{
for(PASS = P + 1; PASS < SIZE; PASS++)
{
if(N[P]>N[PASS])
{
T = N[PASS];
N[P] = N[PASS];
N[P] = T;
}
}
}
printf("\nLOTTO PICKS\n\n");
for(int P=0; P<SIZE; P++)
printf("%d ", N[P]);
printf("\n");
}
|
|
|
|