|
nilesh.gawade wrote: Can we modify this flow so that ultimately last call will be ::CreateWindowW() or ::CreateWindowExW()?
Some thing that you can do is create the dialog by your self using the CreateDialogW() function.
|
|
|
|
|
Hi Nave,
Thanks buddy.
I will work on the same.
Regards,
Nilesh.
|
|
|
|
|
For a runtime error to my IVRS application , i found a solution as 'increase the application buffer allocated by the OS' in the internet. I want to know whether there is a way to increase the buffer size of the application?
Thank you
KIRAN PINJARLA
|
|
|
|
|
What buffer are you referring to? Stack space, perhaps?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes.I thing so. I was told that for every application running, a defult memory is allocated by the os. Is it like that?
KIRAN PINJARLA
|
|
|
|
|
The default stack size for a VS6 application is 1MB. I'm not sure if that has been changed in VS200x.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks everybody, but I solved it by doing ... nothing. After a while staring at the code, I hit ... Rebuild, and it worked like a charm. Ahhh VC++6 and templates Sorry for the hassle, thanks again for your answers.
-> Orignial post:
Here is my code:
for(int i=0;i<3;i++)
{
BYTE *pbMessage= new BYTE[12];
st.push(pbMessage);
}
BYTE *pbTest;
while(st.getSize()>0)
{
pbTest=st.pop();
printf("%s\n",pbTest);
delete[] pbTest;
st is a sort of stack (which works). The push function saves the pointer, the pop function returns the pointer. How can I make the compiler understand that the pbTest points on 12 elements ?
BYTE pbTest[12];
pbTest=st.pop();
Note that delete pbTest does not work either in the first example.
Thanks,
-- modified at 9:55 Tuesday 16th October, 2007
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
pbTest is allocated as a BYTE *pbTest (not an array) so why would you free it using delete[] pbTest
|
|
|
|
|
toxcct wrote: ...why would you free it using delete[] pbTest
Because it points to an array?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
isn't delete[] useful only when the memory is allocated with new[] and simple delete useful when simple new used ?
|
|
|
|
|
toxcct wrote: isn't delete[] useful only when the memory is allocated with new[]
Yes, and that's what he has here:
BYTE *pbMessage= new BYTE[12];
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Rage wrote: Note that delete pbTest does not work either in the first example.
Is it throwing exception right from the first element in the loop while deleting? Are you sure pop is working correctly?
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|
|
How is your "sort of stack" declared? Template argument, if any, and push/pop functions...
I wonder since the stack::pop() function of the usual STL stack is declared as void pop() , so you must be using something else. The equivalent function in the STL stack would be <YourType>& top() .
If your pop() works like you think it should work, I can't see why you would get the exception...
But perhaps it's still too early in the morning for me...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hello again,
If that's one of my stacks you're adapting the chances are it takes the address of what you pass to it, so it would actually be storing a BYTE** in this case, requiring you to dereference the result of pop back to a BYTE* with something like BYTE* pData = *pPopResult . You definitely need to check this if you adapted one of my data structures. I tend to make containers store the addresses of contained items to avoid copying.
Remember BYTE[15] and BYTE* are the same type so delete [] pbTest is correct if pbTest is BYTE*. If it's BYTE** then it will be trying to delete an array of 4 byte BYTE* pointers hence the exception.
If the stack comes from elsewhere then feel free to ignore all this rambling.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks, but I only took a few ideas from your article, and the implementation is indeed different here.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
Yes you must check them else you have trouble code.
|
|
|
|
|
Ok, thanks.
I appreciate your help all the time...
Eranga
|
|
|
|
|
|
now that i am displaying the designators in a combo box. i used recursive function to display that in the combo box. the next thing that i need to do is when i click on the designator the files and folders in that designator should display in a list box. what needs to be done for that?
chandru080
|
|
|
|
|
Well it seems that this question is in the continue other question but do you want to show content a file on the listbox or other thing?
|
|
|
|
|
yes it is. i need to shw the content of the directory in a list box. that is when i click on C: the folders and files of that c: should appear on the listbox. same goes to other directories also
|
|
|
|
|
For show files and folders on the listbox you can use of DlgDirList function also you can use of FindFirstFile/FindNextFile .
|
|
|
|
|
Take a look in the forum, there has been a similar question a few days ago
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek wrote: ...there has been a similar question a few days ago
And the posters share the same name. Amazing! Maybe that's why he started off by stating, "now that i am displaying the designators in a combo box."
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
something wrong in that usage??? well that was a continuation of a previous query. thought will start of with a new one..
|
|
|
|