|
Ah, but the C# people didn't answer quickly enough, so he came to the clever people. He just didn't want to disturb us at first...
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
Sorry to say but you got it all wrong. C# forum is where the good answers where given, and they appeared there sooner than here.
|
|
|
|
|
Well, that's called efficiency. You C# wallahs needed a 3 minutes head start.
Our answers used lazy instanstiation - so were not needed.
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
|
In a tree control I' like to replace the collapse/expand icons. Is this even possible?
|
|
|
|
|
You can change the icons alongside the + ans - signs with the TreeView_SetImageList[^] command.
It's time for a new signature.
|
|
|
|
|
|
I'm not sure on this as I have only used the TVSIL_NORMAL image list. I would suggest you give it a try and see what happens.
It's time for a new signature.
|
|
|
|
|
|
hello guys...I know what is bool but what is the difference between BOOL and bool. Some other examples are TRUE and true, FALSE and false, LONG and long. Why do we need such key words in capitals.
|
|
|
|
|
The ones in capitals are a throwback to the early days before these types were part of the language. They were added to the C headers to improve readability of programs.
It's time for a new signature.
|
|
|
|
|
The one in small case is C/C++ native data type that is one byte long and is used to store boolean values. The one in caps is M$ typedef'd variable. It is (usually ?) same as int or long which of course range in sizes from 2 to 4 bytes.
I personally use caps bool only to confirm to MFC/Win32 APIs and I use the native one everywhere else.
...byte till it megahertz...
|
|
|
|
|
What keywords are those? BOOL, LONG, TRUE and FALSE aren't keywords in C or C++?
I'd assume the ones you're talking about are a part of a Microsoft operating system interface (either typedeffed or defined) and are there to aid portability and/or get over particular problems with specific compilers.
Cheers,
Ash
|
|
|
|
|
|
the big onte are macros (per #define) declared types, the ones with small caps are parts of the languaage.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi,
How to minimize a dialog in taskbar.
i tried like ShowWindow(WS_MINIMIZE); but not working...
|
|
|
|
|
|
not is system tray, I want to make it minimize in taskbar.
|
|
|
|
|
john5632 wrote: i tried like ShowWindow(WS_MINIMIZE); but not working.
It should be ShowWindow(SW_MINIMIZE); - WS_ values are windows styles, SW_ values are ShowWindow() command parameters.
It's time for a new signature.
|
|
|
|
|
I would apply just the following to the words of Richard:
there are two - known for me - reasons for "a dialog" to be minimized:
- the dialog is modeless (could be a child of the desktop )
- the dialog is the application window (the style WS_EX_APPWINDOW could be applied in OnInitDialog() )
An emulation of the second reason:
int CYourDialog::OnInitDialog()
{
int iResult = CDialog::OnInitDialog();
LONG lStyle = GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE) | WS_EX_APPWINDOW;
SetWindowLong(GetSafeHwnd(), GWL_EXSTYLE, lStyle);
return iResult;
}
virtual void BeHappy() = 0;
modified on Monday, August 16, 2010 3:48 AM
|
|
|
|
|
Eugen Podsypalnikov wrote: there are two - known for me - reasons for "a dialog" to be minimized
Thanks, I couldn't think of one; but, hey, the customer wants it, the customer can have it.
It's time for a new signature.
|
|
|
|
|
I've a structure like this:
struct STRUCT<br />
{<br />
bool b;<br />
int i;<br />
double d;<br />
}str;<br />
str.b = true;<br />
str.i = 18;<br />
str.d = 20<br />
and because I know I can't get the real size of a structure using operator sizeof, I write it into a file in this way:
wofstream of("FileName.dat", ios:out
of.write(reinterprete_cast <char*> (&str.b), sizeof(bool));
of.write(reinterprete_cast <char*> (&str.i), sizeof(int));
of.write(reinterprete_cast <char*> (&str.d), sizeof(double));
and finally when I read it again into "str" and display it using cout, I got this values:
str.b = true;
str.i = 18;
str.d = 20.001
why 20.001 instead of 20 is written? I took a look into the file using a HEX-Editor and I saw 20.001!!!
|
|
|
|
|
|
Thank you! but one expects to get whatever he's saved on a file as the original value. I'll read that article for sure. but for now could you explain what should I do to save and retrive a "double" value. a short exam will be appreciated.
|
|
|
|
|
that article explains why you are seeing that value - what you are seeing is 20 +/- epsilon, written out with the precision you specified (or rather in this case, didnt specify)
you need to look at using <iomanip> and the precision specifier at least
so google iomanip and precision
'g'
|
|
|
|