|
Hallo
I try to implement: double clicking a file opens mainframe an childframe. Openeing the mainframe seems to work but what do i have to do that also the childframe opens ??
THX
|
|
|
|
|
This one has always bugged me... I tried looking in VC++'s help to find the answer, but no luck.
When I am typing a function header, and "intellisense" is completing a function signature for me, is there anyway to tell it to actually type it out for me? It's displaying everything for me, but I still have to type it all out! Is there some kind of keystroke that will do that?
(I'm asking now, because I'm putting intellisense-like behaviour into an app I'm writing, and I want to mimick VC++'s as much as possible).
|
|
|
|
|
[Key Down] (to select one) and [Enter].
Maxwell Chen
|
|
|
|
|
Umm, No. Keydown lets me scroll through the different overloads, but enter just puts a newline in the editor.
I'm talking about the function signatures, not the function names (where keydown + enter does work).
Anyone?
|
|
|
|
|
But I am using Visual C++ 2003 this way, and it works just fine for me ...
Maxwell Chen
|
|
|
|
|
I'm also using VC++ 2003, and it doesn't work.
I don't think I'm being clear enough in my question.
For object members, etc... I get a white dropdown with scrollbars, from which I can select a word to complete. That works fine...
However, for function parameters when I'm declaring or defining a function (when I type '(' after the function name), I get a yellow tooltip that tells me the parameters and their types. Enter doesn't do anything here.
|
|
|
|
|
OK. There are (at least) three kinds:
1) Intellisense:
This one is --- When you are typing, and you hit the [Complete word], then it pops up a dropdown list control.
In VC++ 6, you may press [Enter] to select the 1st match.
In VC++ 2003, it does not select any item by default. Thus [Enter] gives you newline. When you [Keydown], it selects an item. Then press [Enter] completes that word.
2) Parameter information:
When you type '(' right after a function token, it pops up for the prototype(s) of the function. When there are more than one, you have to click the tiny arrow buttons. There is no hot key for that.
3) Quick type information:
When mouse hovers on some token, it prompts you the type.
Maxwell Chen
|
|
|
|
|
Unfortunately Intellisense doesn't support this, at least in VS2003. I don't know about VS2005; maybe they fixed it (one can hope).
Software Zen: delete this;
|
|
|
|
|
Does anybody have sample code in C++ to change the gamma ramp. I want to set the colours, contrast and brightness of an LCD panel.
Similar with: http://www.majorgeeks.com/Gamma_Panel_d2796.html
Regards.
|
|
|
|
|
gamma adjustment is a simple mapping:
double fGammaInverse = 1.0 / gamma;
for each pixel
for each color component
pixVal = (BYTE) (256 * pow ((double)pixVal / 256.0, fGammaInverse));
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thank you for your answer.
I've saw the example on NirSoft web site http://www.nirsoft.net/vc/change_screen_brightness.html
where I can make the screen brighter or darker but how can increase or decrease the intensity of the red/green/blue components?
For example: How can to increase only the blue component in all RGB values to add more blue color to the entire display?
Robert.
|
|
|
|
|
Hi all.
I've seen some very helpful GDI/GDI+ arrticles on here which have helped me immensely. However I have what may be an unusual question.
I'm an avid Flight Simulator 2004 fan and have started to dabble in creating my own airfcraft avionics systems and gauges written in C/C++. However, I'm finding that in order to implement some of the more complex avionics systems seen in many 'glass cockpit' aircraft today, I need a fast 2D vector drawing approach.
FS2004 implements user-created avionics displays and gauges as DLLs that expose a number of callback functions in order to draw the graphics. However, it seems that FS2004 is limiting the gauge drawing graphics to a GDI/GDI+ surface, even though FS2004 does actually use Direct3D for the main external display showing the terrain.
I have the following questions:
Is there a way to draw to a GDI/GDI+ suface using hardware accelerated DirectX calls? I have noticed that in the gdiplus.h header file there is a declaration for a IDirectDrawSurface7 structure, hence my theory that I may be able to use DirectX instead of GDI to draw to the surface that FS2004 uses for gauges.
If not, am I better off sticking to GDI rather than GDI+ as GDI allegedly makes more use of hardware acceleration than GDI+?
Finally, can anyone recommend a high performance, open source, realtime vector drawing API that I could turn to in order to provide the actual line and 2D shape drawing routines to represent some of today's avionics displays?
Many thanks
DE
|
|
|
|
|
seefer wrote: Is there a way to draw to a GDI/GDI+ suface using hardware accelerated DirectX calls?
I could be wrong but I don't think so. However you may want to check out this:
http://antigrain.com/[^]
It's for C++ and I've used it with quite nice results.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
Much obliged Jim.
I've taken a brief look Antigrain and it's certainly a nice piece of work and I'll be taking a more in depth look at it. However my initial imppression is that it is largely written for portability and not high performance. This is the right choice on the part of the author because Antigrain appears to be a general foundation on which to build that serves to clearly explain the algorithms used to improve vector drawing presentation quality.
Am I wrong in this assumption? In your work with it have you found it provides far greater drawing speed than GDI, which is what I need in an API for my projects. All of the Antigrain examples seem largely geared towards graphics 'document' type applications rather than real-time animation rendering.
Can you recommend any other APIs of a more 'language-specific' nature that are created to provide high performance rendering routines in it's implementation as well as general drawing algorithms?
Thanks.
|
|
|
|
|
Hi all,
Please any one tell me
How to convert int to string ,string to int in vc++.
thanks
sunita
|
|
|
|
|
One way:
ostringstream ss;
ss << "The number is " << 42;
string s = ss.str();
There are many ways. You didn't really explain the context properly so I assumed that by "string" you meant STL strings. Note that the above code assumes that you've included <string> and <sstream> and have put using namespace std; somewhere appropriate.
Steve
|
|
|
|
|
hi,
Thanks for ur reply.
Actually i am storing picture number in
int picno;
I need to convert this picture number to string.
can i able to convert?
sunita
|
|
|
|
|
Almost exactly the same as the previous example:
ostringstream ss;
ss << picno;
string s = ss.str();
Steve
|
|
|
|
|
have a look at atoi() and itoa()
For me CAR is Challenge, Achievement and Recognition.
_AnShUmAn_
|
|
|
|
|
sunita ramesh wrote: How to convert int to string ,string to int in vc++.
CString::Format, wsprintf, _ttoi
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Using MFC:
Convert int to string
<br />
int x=12345;<br />
CString s;
s.Format("%d", x);
Convert string to int
<br />
int x=0;<br />
CString s="12345";<br />
x = atoi(s);
Osama E. Adly
|
|
|
|
|
|
Hello
I am trying to exchange data between VB4 (16 Bit) and vc 6 using OLE. I have a problem when I try to modify string data in VB which need to be sent to c.
I can get a LPSTR from VB completely but I can not modify that in the c and give that back. AS far as I understand that would be possible with a BSTR *. But I could not get that to work in nether way.
In the following example the VB code calls the c++ code and the messagebox just shows one character 'T'. Thats all.
What am I doing wrong?
And what do I need to do to be able to modify the text in the c code so that the modification can be seen in the VB code after the call
Thanks in advance
Dirk
//////////////////////
// c++
//////////////////////
void TestDlgAutoProxy::test(BSTR FAR* text)
{
TCHAR szFinal[255];
_stprintf(szFinal, _T("%s"), (LPCTSTR) *text);
AfxMessageBox(szFinal);
}
///////////////////////////
// VB code
///////////////////////////
Private Sub Command2_Click()
Dim text As String
Dim x As Variant
t = "Text from VB to C"
x = oAuth.test(t)
MsgBox t
End Sub
|
|
|
|
|
|
Thanks Milton,
that way works fine.
How can I modify -> text, so that the change can be used in the calling function?
It must be very basic but how can I just change that variable text?
Like in the old c it would be
sprintf (text, "Thats what I want");
All other data exchange was no problem .. (yet )
Thank you
Dirk
|
|
|
|