|
Just one point, it doesn't ensure dialogs are not split across multiple monitors. You might like to add that feature - it's annoying when they are...
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"
|
|
|
|
|
Well caught - I've just tested that it works as advertised, but I'll have to go with my brute force approach. It will commonly appear near the edge of the screen, so the risk of being split is quite high.
Thanks for the heads up Ryan!
Iain.
|
|
|
|
|
You're welcome. I've been bitten by the same thing
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"
|
|
|
|
|
The difference between 'appear' on nearest monitor and FIT on nearest monitor...
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Blake Miller wrote: The difference between 'appear' on nearest monitor and FIT on nearest monitor...
Exactly
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"
|
|
|
|
|
How an exe should automatically be deleted after completing its execution? Thank you.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
you mean you want to make an exe that executes and deletes itself then ?
simply make him delete the file... there's no problem when the program is launched in memory...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
Here I like to delete automatically.
Not to delete manually.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
Am working on VC 6.0, though have a small prob...
Suppose the declaration s like
classA[] obj = new classA[]{};
now when i try to access
int k = 0;
obj[k] = numeral;
it says array index out of bounds, tat means it needs a max size right?
so how do i define a max no of elements in the array size?
|
|
|
|
|
What about:
classA *obj = new ClassA[some_number];
obj[0] = numeral;
obj[1] = numeral;
...
obj[some_number-1] = numeral;
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|
|
Forgot to mention, have to dynamically increase/decrease the size of the array!
|
|
|
|
|
Why don't you use a vector from the standard template library ? It offers all this flexibility and is much more secure.
|
|
|
|
|
this is not VB, so no possible directly.
is you have to increase/decrease the size of your array you could either do it yourself :
- allocate a new array with the new size
- copy the elements to keep from the old array
- destroy the old array.
or use a library that already do that for you :
- std::vector<>
- std::list<>
- some other STL containers...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
For debugging purposes, I am going to be basically hijacking a function that handles a variable argument list. This function convers the Variable Argument List (VAL) into a va_list variable and passes it to another function to process the variable argument list (like how one would make a call to _vsntprintf ).
I can descern the number and types of arguments from other parameters passed to the function, so I want to be able to trace information on the parameters passed. My question is this - it is safe (not possible, but safe) to call va_start multiple times on the same va_list variable (in the same function) to reset the VAL?
I cannot find code that does this, nor information that details the safety of doing so.
Thoughts?
Thanks!
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I've never encountered a mention of this scenario myself, but from the possibilities to implement this, it is OK. (the two implementation I've seen so far use a pointer to thestack, initialized by va_start, incremented by va_arg, and a do-nothing operation in va_end)
The question is: how portable do you need it?
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
There are no portability concerns here - this is, and always will be, a Win32 implementation. Only concerns would be compiler differences if/when this implementation is built on a newer version of the compiler.
My concern is one of works vs. correct. It might work, but is it correct to do so, so I will not expect any side-effects in the future.
I do not expect it to be a problem, because va_start just resets the internal pointer to the beginning of the argument list, and there seems to be no other state stored outside of calls to va_arg , but it is always worth asking to make sure noone else has tried this and bombed!
Thanks!
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
James R. Twine wrote: but it is always worth asking to make sure noone else has tried this and bombed!
tell us if it does
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
Not only safe, it's part of the design. To be technically correct, you should use va_end before using va_start the second time, though in VC++, it doesn't really matter (since it allocs no memory.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
James R. Twine wrote: My question is this - it is safe (not possible, but safe) to call va_start multiple times on the same va_list variable (in the same function) to reset the VAL?
Yes. No problems at all. I've done it a few times. For safety, call va_end() in between, but in Win32, it's not required in any implementation I've seen. Other OSes might need it though.
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 am geeting error
"cannot convert parameter 2 from 'char *' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
I think we need to change character set from UNICODE to MULTIBYTE( _MBCS instead of _UNICODE ) It gets compiled on VC6. The reason may be at that time the default character set wasn't Unicode.
I don't want to use _T() macro.
We can change character set through IDE this way-
Go to project properties, select ConfigurationProperties, General and you have an option called Character Set. The default is Use Unicode Character Set. Change it to Use Multi-Byte character set.
But how this can be done through command prompt. I need to use /d
to change option of cl.exe. But how exactly it is done?
Vaibhav
|
|
|
|
|
I am trying to build a project on VC2005. We work on command promt
Vaibhav
|
|
|
|
|
Hello to all. I am searching for information about how I can create an additional plugin that can be installed on a browser. If anyone has an idea from where I might read something about how this is done I'll be very grateful for the help.
Regards, Tsvetelina Ivanova
|
|
|
|
|
Search for browser helper object (BHO).
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
|
|
|
|