i can get the code to compile just fine but when i go to launch my application i get an assertion error, i narrowed down the block of code that might be causing it but i also think i am not correctly writing the code to display the bitmap.
this block of code in my OnInitDialog function is where i get the problem from i think.
tried using the code and sayign hdc is undeclared and when i make it a hdc variable it says oen fo them was used without being initialized. how i set up my dialog was i made a picture control and from there not quite sure exactly what to do, the code you gave by its self wont just display my image as i am sure more code is needed but i get multiple assertions when i load my app and if i ignore them it loads but no image loaded.
this is my code so far(most commented out though) that would do the image loading, but i get multiple assertions.
What does it mean when a structure member declaration is followed by a colon, then a number, as in:
typedef struct tagMENUBARINFO
RECT rcBar; // rect of bar, popup, item
HMENU hMenu; // real menu handle of bar, popup
HWND hwndMenu; // hwnd of item submenu if one
BOOL fBarFocused:1; // bar, popup has the focus
BOOL fFocused:1; // item has the focus
} MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
The "fBarFocused" member has a ":1" after it. What does that mean?
As the others have said, it says that that field takes up one bit.
However, don't be tempted to use bit fields in your own structures. They are highly non-portable, even when compiling for the same platform. Different Windows compilers may treat them in different ways. Even different versions of the same compiler on the same platform can treat them differently. Use them only if you can guarantee that you will only ever compile your code with the same compiler (same version, same vendor etc...). The problem is that the C standard does not specify in which order the fields are to appear in memory - compilers are free to do whatever they like.
"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"
Just wondering because...some things...strings, iterators, lists, etc are nice and clean in java and c#, but are ugly or lacking in c++.
Over time i see code project articles try to bring some of that c# goodness to c++, like with delegates, foreach, and properties...so is their any library out there that does this in a big way...make c++ like C# with memory leaks i mean :P
If you've looked at Boost you'd be asking the opposite question. For example the multi index containers and the Boost graph library are unbelivable and only available in C++. Some of what you mention has been available (in the STL) for years, in fact before dotNET even existed - std::string and iterators for example.
I am having a 16bit ascii file which contains signed integers from -8191 to +8191. These integers are stored in a file in a single row without any delimiters. Can anyone gimme a sample code which can read this kind of file for the signed integers (b/n -8191 and +8191) stored in it or do I need any more info to perform this?
I was thinking that in some ways, STL is the CRT so the two cannot really be separated...but here's a thought:
If you define the STL to be just a collection of header-files, and the CRT to be things like new, delete etc
Then it would be possible to write your own implementation of global new, delete, plus provide a few other necessary house-keeping routines like mainCRTStartup. Add the compiler option to strip the CRT, and maybe one could cobble something together which, when linked to your 'custom' CRT, could be twisted enough to meet the original requirement...