|
Yes I know but how to retrieve this main menu created by the framework ????
|
|
|
|
|
GetMenu().
I case you mean the menu on top of your app.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hum, great! That was easy
Thanks
|
|
|
|
|
Is there something wrong with this code?
void Calculate(const int &a, float *b, int &c); //?
int a; //can i initialize a
float b;
int c;
float d = 20.4;
Calculate(a,b,c); //function call
void Calculate(const int &a, float *b, int &c)
{
//Code //
};
lets say a is 4, b is 0.0 and c is 5.
a is supposed to stay 4, b is supposed to be 0.25 and c 24.4 when the function returns.
Can someone correct please
oh and its not home work or an assignment or something
Thanks bhangie
|
|
|
|
|
In what way are the parameters being calculated? There must be some sense of the "Calculate" function
What do you want to achieve?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Some comments:
If you don't want a to change a variable, don't pass a reference to it. You can do something like this:
void Calculate( const int a, int c, float* f );
Here I'm not passing any references and you cannot change 'a' within Calculate. I can change the value of 'c' within the function, except the variable will retain its original value upon return. Now you maybe asking why I changed the parameter order. Mainly preferrence. I like to have the same types grouped together.
Yes, you can initialize 'a' just like you did with float. The variable 'a' at the point you placed it is not a constant value.
If you have anymore questions, just ask.
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
Hi all, is there anyway of registering a custom file type with Visual Studio so that when I try to open a file I can see all files with the extension *.xrs? Also when I load the file I'd want it to have the same formatting rules as C++ (I know you can do this by clicking on the file properties and select C++ formatting, but this is only temporary, all subsequent .xrs files load in with no formatting and are just black text.
I await the forums decision.
|
|
|
|
|
found it! HKEY_CURRENT_USER\Microsoft\Devstudio\6.0\TextEditor\Tabs/Language Settings\C/C++\FileExtensions, add you custom file extension to that list for dev studio to apply c++ formatting to it. There is also a way to get dev studio to compile these files in with a project by adding the extension to HKEY_CURRENT_USER\Microsoft\Devstudio\6.0\Build System\Components\Platforms\Win32(x). This is highly useful for custom scripting languages where you can integrate a syntax checker to dev studio and use your scripts within the dev studio environment. Of course you'd better hope it uses the same syntax otherwise the formatting will be complete crap, but adding you user defined keywords to Microsoft Visual Studio\Common\MSDEV\Bin\USERTYPE.DAT (you'll have to create it yourself) will help you customise dev studio formatting rules to highlight your own keywords . You'll also need a fresh boot of msdev to see the results. Just thought I'd share this poorly documented info with the rest of the world .
Alan.
|
|
|
|
|
Hi !
In Visual Studio 6, when I right click on a class name or a function, I can select 'Open Document' or 'Go to definition of xxx'.
But when I do that, I get this error:
C:\xxx\xxx\myproject.bsc
This is not a valid browse information file.
What can I do to solve this problem ?
Thanks !
Jerome
|
|
|
|
|
Delete the .BSC (source browser) file and let it get recreated.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
can you make me an example with while and for,
thank you,please describe everything im a beginner.
thanks.
bye
khodadad@eminem.com
|
|
|
|
|
for(int nLoop = 0; nLoop < 10; nLoop++)
{
}
int x = 0;
while(x < 10)
{
x++;
}
If you are a beginner, I suggest you need a few books to learn the basics of C++.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
|
Don't mind me, I'm in a teaching mood!
There are three diffrent looping structures within The C Programming Language and C++ (an extension of C). There are:
- for
- while
- do-while
Here is a brief description for each:
- for: The for loop is mainly used to step through something, like an array. It syntax is "for( staring index ; condition ; increment ) Statement" These statements can be incremented (or decremented) by a known value, like 1, 3, 5, 56, ... You don't need all the items within the paranthesis, but you do need the semi-colons. Example:
for( x = 0; x < 10; x++ ) a[x] = x; for( ;; )... Here I have an endless loop. for( ; x < 10; ) ... Here it is like the while loop.
- while The while loop is used to do looping until a condition is met. One example for the while would be in polling something. You continue waiting until the event occurs then drop out of the loop. You can interchange the for/while exactly like one of the post stated. The condition testing is done at the beginning of the loop.
- do-while This loop structure is a different animal than the rest. Unlike the for/while loops where they must first pass the condition to execute, the do-while will always execute the loop once. The condition testing is done at the end of the loop instead of the beginning.
I hope this helps. The uses that I described are not hard and fast, but they can be used as a guide line if your new until you get more experience.
Larry J. Siddens
Cornerstone Communications
TAME THE DOCUMENT MONSTER
www.unifier.biz
|
|
|
|
|
Hi there
Example, new to this myself!!
{
//Create vector put 26 numbers into it
//using for loop
for(int i = 0; i < 26; ++i)
{
Vec.push_back(i * 2); // pushback * 2
//2,4,6,8,10......
cout << Vec.at(i) << "\n"; //Display
}
Not that dificult hey.
Regards bhangie
|
|
|
|
|
How can I know if user clicked on the balloon help for the tray icon (Win2k, WinXP)?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hi all,
I have developed a dialog based application in VC++ 6.0
I have dropped a button and attached a event handler with this button.
I have created another dialog template for my child windows.
On button clicks I am calling new operator to create those MODLESS child dialogs windows.
Now when I call the Show(...) method and minimzes it, the child dilaog minimizes above the task bar rather then like normal dialog windows.
You can visualize the situation like, when we have a MDI application, and whenever we create a new view it minimizes within the MDI application rather then in the task bar.
Please anybody helps me in this regard.
The Phantom.
|
|
|
|
|
Hello!
I think I have read about ProfUIS library for C++ developer on this forum some days before, but I could not find the article this time. Could you, please, help me and give me a link to the article or any other article about ProfUIS.
Best Regards,
Haldir
|
|
|
|
|
http://www.codeproject.com/docking/prod_profuis.asp[^]
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Hey all,
I need some help using SDI with formviews. I can't seem to figure out how to change the screen to a different formview.
For instance I have created two different formviews, one with a button on it, and another with just text on it to see if it will work. The problem I have is I don't know what to put in the button to make the view change resource IDD's and use the second formview. It looks like it is as simple as changing the ID, then calling invalidate to repaint the view with my new formview. Can anyone help me on this??
Thanks,
Mike
|
|
|
|
|
Not that simple, I'm afraid. You have to create the second CFormView object and perform some low-level "trickery" to swap them -- I'm sure there's an article about switching forms around here somewhere...
Steve S
|
|
|
|
|
|
Thanks a bunch. That's exactly what I was looking for.
|
|
|
|
|
Got another question for you that pertains to the question above, if you're able to answer it. A general doc/view question though.
The application I want to use the SDI for I have programmed in a dialog based interface. The reason for the switch is to create printable reports, which I don't see a way to do in dialog based.
What I'm doing is reading in tables from a database and displaying them in dialog windows, and allowing things to be entered into the database through the dialogs. The question I have is, is this something that should be used in an SDI like I'm thinking or should it be used in an MDI?
I'm still pretty new to the doc/view structure and SDI/MDI. I've only really done one program using it about a year ago during my last year of school. Anyway, I don't really need any detailed explanations or anything like that, just wondering what the best way to go is, so I don't spend my time learning something that isn't going to be useful for my project. (I do realize that MDI builds off of SDI, but if MDI is the way to go I'd rather learn how to build the multiple views using that instead of what I'm currently doing with SDI).
Thanks,
Mike
|
|
|
|
|
Hi.
I want my view support zoom in/out feature, such as Word and Visio, user can
set view scale to 400%, 200%, 100%, 50%, etc.
Currently I implement this feature by GDI mapping( MM_ANISOTROPIC ), my view
contain a workarea and some graphs( bitmap ), I change GDI mapping when user
set view zoom.
Now the problem is GDI mapping is not good when draw a bitmap, even worse
then StretchBlt. what are you think about it? or have better ways to do it.
|
|
|
|