|
use the ressource editor ans check the properties you want...
there is no more simple...
TOXCCT >>> GEII power
|
|
|
|
|
Where is the ressource editor located...
|
|
|
|
|
when you add graphically an edit box into your dialog, right click into the editbox, select the properties menu item at the bottom, and there you are...
TOXCCT >>> GEII power
|
|
|
|
|
|
How can i get full documentation for Telephony applications?
can you help me to make an application which can recieve a call, and data from caller?
How to play voice message at recieving the call?
|
|
|
|
|
Fouad_kayali wrote:
How can i get full documentation for Telephony applications?
MSDN and the Platform SDK are probably the best resources for TAPI documentation and examples.
Fouad_kayali wrote:
can you help me to make an application which can recieve a call,
This sample[^] here helped me when I first started programming with TAPI back in '98.
Michael
CP Blog [^]
|
|
|
|
|
-> this stood in the code:
bool bAllowUnvalidateTextResult = !!siteFlags.GetNbrValue(ALLOW_UNVALIDATE_TEXTRESULT);
Colleagues told me the "!!" was to make sure it was 0 or 1 false or true.
Is this so? Why not
static_cast<bool>(siteFlags.GetNbrValue(ALLOW_UNVALIDATE_TEXTRESULT)); ???
tnx.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimmy Hendrix
|
|
|
|
|
The !! has been around for a while, long before these new fangled
template thingies. Its also less typing!
Also consider:
bool bAllowUnvalidateTextResult = 1 && siteFlags.GetNbrValue(ALLOW_UNVALIDATE_TEXTRESULT);
bool bAllowUnvalidateTextResult = siteFlags.GetNbrValue(ALLOW_UNVALIDATE_TEXTRESULT) ? true : false;
I still use the ? : construction a lot.
A couple of years ago, I showed some of my code to a fellow (non-colleague) programmer, who said
"It's obvious you've been programming for a long time". He never told me if that was a compliment
or not!
|
|
|
|
|
but don't bool bAllowUnvalidateTextResult = siteFlags.GetNbrValue(ALLOW_UNVALIDATE_TEXTRESULT); work too ???
bAllowUnvalidateTextResult is a bool , so, it will accept true or false values ; true for any non-zero values, false otherwise...
of course, a static_cast<bool> would have been more explicit and more correct, i think my code work, but i don't wan't to test it
TOXCCT >>> GEII power
|
|
|
|
|
Yes it will work but IIRC it brings up a warning on compilation saying that their is a performance issue when forcing the value to bool.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
I have seen this before, and if not commented such it can be misleading. Is there a mistake, i.e. did the programmer intend to use a single "!" ?
It is always better to explicitly state the intended conversion.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
V. wrote:
Colleagues told me the "!!" was to make sure it was 0 or 1 false or true.
Is this so?
Yes, that's what it does. It's also very portable, whereas static_cast and bool are not.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
sorry but the static_cast keyword is part of the C++ language... portable so.
for the portability of bool , i agree. We should prefer BOOL instead...
TOXCCT >>> GEII power
|
|
|
|
|
toxcct wrote:
sorry but the static_cast keyword is part of the C++ language... portable so.
Maybe on the newer compilers, but not on the ones I started with. It's also not available in C. The point was that !! will work across the board whereas static_cast and bool will not.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
ok if you want to port code from C++ to C... but you'll probably encounter many other problems...
TOXCCT >>> GEII power
|
|
|
|
|
but BOOL would in turn go into the whole idea of a boolean (only true/false)
if I'm not mistaken takes a bool less memory then a BOOL (in Java it is so I think), but then again maybe not.
but that would take us too far...
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimmy Hendrix
|
|
|
|
|
why BOOL would take more memory than a bool ??
one byte doesn't it ?
TOXCCT >>> GEII power
|
|
|
|
|
Is a BOOL 1 Byte? I thought it was of size equal to an integer (cause 1,2,3,4,5,6,... = TRUE) bool doesn't know 0,1,2,3,4,...
bool is for certain 1 byte,
don't know about BOOL
Not really important when working with enough memory
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimmy Hendrix
|
|
|
|
|
BOOL is an "int" and can have the same values as an int.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
BOOL is 4 bytes on 32-bit systems.
bool, on the other hand, is 1 byte.
Bikram Singh
|
|
|
|
|
oh... why not.
and can we have an evidence of what you are telling us ?
TOXCCT >>> GEII power
|
|
|
|
|
Fire up Visual C++ and run this code.
<br />
#include "stdafx.h"<br />
#include <conio.h><br />
#include <windows.h><br />
<br />
int main(int argc, char* argv[])<br />
{<br />
printf("\nbool = %u",sizeof(bool));<br />
printf("\nBOOL = %u",sizeof(BOOL));<br />
getch();<br />
return 0;<br />
}<br />
Bikram Singh
|
|
|
|
|
i have many more interesting things to do instead...
perhaps also you wanted to write <stdio.h> and <conio.h> ??
but, ok, that's an evidence
TOXCCT >>> GEII power
|
|
|
|
|
yup, i did. first time i've posted a #include statement.
<conio.h>
Bikram Singh
|
|
|
|
|
toxcct wrote:
perhaps also you wanted to write <stdio.h> and <conio.h> ??
They're there. Look closely!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|