|
Vaclav_Sal wrote: I am still not sure about MFC QuerySiblings - from page "up" the sheet and than "down" the pages. If you are wanting one page to be able to notify the other pages of a change, calling QuerySiblings() is the way to go. If some other route needs to take place (e.g., document notifying the sheet of a change), that may not be the best solution.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
David,
I have been going round and round tryig to figure out why I am udating only one page. Did not quite catch anything strange stepping thru the MFC code. Than I read the "fine print"
"...to each
// LOADED page (a page won't be loaded in memory until it is shown)..".
Make sense, why update something which is not active.
I assume that it means when I change the page (tab) I better make sure that the whole view update business better starts again. It should work.
This has been educational for me.
Thanks.
|
|
|
|
|
Consider an 8-bit compiler say Turbo C, in which we have an integer of size, say 2-words i.e. 16-bits or 2 bytes. You need to store three integer values which are supposed to be as:
Name | Range | Size Required
=====================================
Integer 1 | 0-3 | 2bits (00-11 in binary)
Integer 2 | 0-5 | 3bits (000-101 in binary)
Integer 3 | 0-7 | 3bits (000-111 in binary)
In total, we need only 8bits to store all of these three values. Which means that a single variable of integer data type has enough memory to accommodate these values.
The challenge is to store all of these three variables into a single instance of integer data type and retrieve it whenever required.
In other words, you need to develop a program which can - at the maximum - use only two instances of integer data type, first one for the purpose of scanning values from the standard input device say keyboard and the second one to store the data entered by user in the form of three integer variables as discussed above and print them by retrieving it from the second instance in which the data was stored.
Company Description Secpanel is a DIY security tool for cloud servers.
Please see www.secpanel.com Requirements We are trying to solve the security problem for millions of servers on the internet. We are looking for people who are crazy enough to think they can solve the toughest of problems. And do. If you love to code and are sick of the protocol/HR/politics of big organizations, you should talk to us.
Instead of a resume, please write a small piece of code for the following scenario:
Consider an 8-bit compiler say Turbo C, in which we have an integer of size, say 2-words i.e. 16-bits or 2 bytes. You need to store three integer values which are supposed to be as:
Name | Range | Size Required
=====================================
Integer 1 | 0-3 | 2bits (00-11 in binary)
Integer 2 | 0-5 | 3bits (000-101 in binary)
Integer 3 | 0-7 | 3bits (000-111 in binary)
In total, we need only 8bits to store all of these three values. Which means that a single variable of integer data type has enough memory to accommodate these values.
The challenge is to store all of these three variables into a single instance of integer data type and retrieve it whenever required.
In other words, you need to develop a program which can - at the maximum - use only two instances of integer data type, first one for the purpose of scanning values from the standard input device say keyboard and the second one to store the data entered by user in the form of three integer variables as discussed above and print them by retrieving it from the second instance in which the data was stored.
|
|
|
|
|
nobody here is going to do your work for you.
and if you can't do the work, you shouldn't get the job[^]
|
|
|
|
|
priceless!!
Watched code never compiles.
|
|
|
|
|
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
hi all, i'm in trouble by writing the header of a jpeg file. after i acquire the raw image and processing it by DCT, quantization and huffman coding, i would like to save it in the correct format. i can't found any libraries that help me to write proper header file, insert the 2 tables that i used (huffman and quantization), so i start writing every byte by myself... i start with the SOI marker, frame header and so on.... but when i try to open the jpg image with a viewer, it shows nothing... even in the properties do not shows any information, nor the image dimension etc, even if i insert those info like written in the official documentation... i try to scan the header with other program, but they show errors... so my question is "simple"... how i can write a proper jpeg header? thanks p.s i use VS 2010 and c++
|
|
|
|
|
have you looked at jpeglib? it has a function called "write_file_header" that looks like it might help you...
|
|
|
|
|
i can't see any function called "write_file_header", or something like that... where did you find such a function?
|
|
|
|
|
|
ok, i see, but it's useless, it only write SOI marker and APP, and i write them too in the correct way, or at least in the same way that other jpeg file are written...
|
|
|
|
|
have you tried reading it with Jpeglib, to see where the problem happens?
|
|
|
|
|
no, i will try... thanks for suggestion...
|
|
|
|
|
i was thinking to start basic gaming c++.
i want to know how to start the game development.
please post a simple game in c++ if possible.
thanks!
NISHCHAY
|
|
|
|
|
Member 9138924 wrote: i was thinking to start basic gaming c++.
You would be better advised to go for XNA[^].
|
|
|
|
|
Well, a game is a LOT MORE than just programming.
(short summary as I do not have my morning coffee yet)
You need an idea what the game will be. once you get an idea, you will have to put it down on paper (virtual paper) and write down the synopsis of the game (the actual story, can be simple (tic-tac-toe), or very complex (GTA) ).
When the synopsis is done, you need to define how the game will be played (still no line of code programmed yet). This involved a lot of play-acting : RTS, FPS, RPG, Simulation, Game, ...
You will create a storyboard for the different phases of the games, the different "levels".
You will define the art work for the game (2d, 3d, cartoon, real-life, ... ) and create basic drawings (paper, photoshop, ...) of the characters, the play field.
After that, when you feel you have a good grasp of what your game will be, you can start looking at the different technologies to build the game (graphic engine, sound engine, Artificial Intelligence engine).
During that stage, you will write down (with bad ugly code) prototype displaying the different capabilities of the engine you choose, how the characters move, how the graphics will be displayed, show simple game mechanisme, display the (ill)logic of the AI, ...
Once that is done, then you can start to write some real nice code.
anyway, a simple game (not compiled, not tested)
bool found = false;
while (!found)
{
cout << "guess a number." << endl;
int value;
cin >> value;
srand ( time(NULL) );
if ( value == rand() )
{
cout << "you found it";
found = true;
}
}
Watched code never compiles.
|
|
|
|
|
LOL! A number guessing game was the only simple example I could think of.
|
|
|
|
|
Open-GL is a nice library for people who want to do basic gaming in c++. I mean the library is good to start with line drawing and in the mean time you can end in rich particle system that gives the effect of fog, blast, burn etc
|
|
|
|
|
i want to make a line in c++
and want to know how to do so
and which header files i should include and the complete code.
NISHCHAY
|
|
|
|
|
Okay sure, no problem.
You need to create a windowed or a dialog app, handle the WM_PAINT message, then use the MoveToEx[^] and LineTo[^] functions.
You should #include <windows.h>
There's a million examples already around. You can google for and find them yourself with very little effort.
|
|
|
|
|
Cant i make it by using graphics and pixels if anyone has the idea please tell
|
|
|
|
|
Could you be more specific please?
I'm not using sound, nor is the line drawn using Vegemite-sandwiches!
The line is drawn using pixels and (obviously) graphics!
If you'd like to use graphics.h (Are you using TurboC?) and would like to calculate the position of the individual pixels themselves, you should look up lineDDA or Bresenham or if you'd like it anti-aliased, the Wu Anti-Aliasing algorithm.
There's a million examples already out there. As a programmer, one of your fundamental skills (and tasks) is that of researching!
Go on, have a look it's not that hard. - If you want to code the line function yourself, you should be prepared to read some older code, since for the most part this is a problem that is solved using pre-existing functions, like the ones I linked you to. Functions that will work anywhere, regardless of the BitDepth or resolution of the display monitor. They are also optimized, that is to say they DO-NOT call Pixel(x,y,col) for each point in the line - they'll be a squillion times faster than anything you write yourself - many will also be seamlessly hardware-accelerated.
|
|
|
|
|
when i am using the dda algorithm it shows some errors like setpixel() should have a prototype
how to over come that.
|
|
|
|
|
|
it shows that the setpixel() function used to set pixel(point) for drawing the line, should have prototype.
|
|
|
|
|