|
Thank you very much for your comments. I will read both articles and I hope it will help me.
Best Regards,
micutzu.
|
|
|
|
|
In MDI,I want a child window with some text from Main window menu list and also from tool bar?
|
|
|
|
|
|
i run in a very strange c++ compiler problem.
until now i used the definition 'id' which gave me the right value ( = 0x00006964 ).
because i compile under window, mac and linux and the mac gcc compiler complains about wrong 4-byte-characters i added '\0\0id' to the definition which should give in my opinion the same result. but the vc++ and intel c++ compiler generates other values.
'id' = 0x00006964
'\0\0id' = 0x64690000
' id' = 0x20206964
'\40\40id' = 0x64692020
the most interesting things are the last 2 lines. what is the difference between a space written as space or as a esc-character? ... why does the compiler generates swapped values?
that doesn't makes sense to me ... any hints would be great ...
thanks
tilo
|
|
|
|
|
|
it's not the byteorder why i'm surprised. i'm confused because the 3rd line gives another byteorder than the 4th line with the same compiler and machine ...
tilo
|
|
|
|
|
|
e.g.
#define ANY_ID_1 'id' // gives the warning under gcc mac
#define ANY_ID_2 ' id' // gives the same byteorder like 'id'
#define ANY_ID_3 '\0\0id' // has the wrong byteorder
i use the defines as longs ...
cheers
tilo
|
|
|
|
|
the compiler is probably treating '\40\40id' as a numeric literal (which causes the machine's byte-order rules for numerics to get involved).
it probably sees ' id' as a string literal (even though you shouldn't put multiple characters inside single quotes), and ends up doing something like:
char *p = " id";
long f = *(long*)p;
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
hmmm ... strange things happens ...
i tried this one here ...
char *p = "\0\0id";
long f = *(long*)p;
if running this code f results in 0x64690000 ... that's exactly the same what the compiler generates with the constant '\0\0id' .. and that's swapped compared to 'id' which results in 0x00006964 ?!?!?!?!
this is one of the days where i don't understand compilers ... i want that the compiler generates the same constant when i write 'id' and '\0\0id' because this is obviously the same (for me!)
cheers
tilo
|
|
|
|
|
bytefactory wrote: i want that the compiler generates the same constant when i write 'id' and '\0\0id' because this is obviously the same (for me!)
how about:
long f = (0x00) << 24 | (0x00 << 16) | (0x69 << 8) | 0x64;
?
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
that would work but make a lot of work at another place in the program because i use the includefiles are parsed with an own scripting language that understands only 'xxxx' and numbers
thanks for the suggestion ...
tilo
|
|
|
|
|
This is just a shot into the blue, but isn't Unicode basically not a system type? Like, int would be "swapped" on little endian/big endian" but unicode would be the exact same binary pattern?
I remember being lectured on something like that, but I might be way off here.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
How to create a new window(child window) from menu list...and also from toolbar?
|
|
|
|
|
I did'nt get your question..Please add more information
|
|
|
|
|
what is a window ?
i give you the example for a new dialog box. if you want something else, make the conversion.
when you click on a toolbar button, on on a menu item, handle the WM_COMMAND event that is thrown, and overload it :
void OnSClickMenuAbout() {
CAboutDlg dlg;
dlg.DoModal();
}
(here i consider you open the "About" DialogBox on clicking its item in the menu...)
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
Anu_Bala wrote: (child window)
may be she must be talking about MDI.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
i only gave an example...
the
CAboutDlg dlg; line can be replaced with something like :
CChildFrame frm(this); where this is the parent for instance...
i hope the guy can search for infos by himself, and not waiting for everything well done and well written, until he just have to copy/paste the solution in his code...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
hmmmm
OT:How was your holidays buddy?
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
VivekuniQ wrote: How was your holidays buddy?
hummm, very nice !!!
i took time with soome of my friends i didn't see since almost 1 year...
i saw back my little brother an my mom'... enjoyed the fresh snow of the alps... got very tired to go to bed late every nights
but now, everything's ok. i'm back in the sweet arms of my girlfriend, i've signed for a new contract at the office, so, Year 2006 starts very well for li'le tox' !! :->
and you ? what did you do during these 2 weeks ? and how are you buddy !?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
toxcct wrote: and you ? what did you do during these 2 weeks ? and how are you buddy !?
Just a moment!. attendez monseiur.i'll be back.
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
toxcct wrote: i'm back in the sweet arms of my girlfriend,
Great , congrets
toxcct wrote: Year 2006 starts very well for li'le tox' !!
yep seems too
"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
|
|
|
|
|
please help me...
i want to run c++ program on linux platform so what is the process for this .
if any one have tutorial for linux support C++ then please forward me....
bankey.khandelwal@solversa.com
Thanks N Regards
Bankey Khandelwal
Mobile : 98504-32990
Office : 020 25521888
Solversa Technologies
15, Yeshwant Ghadge Nagar,
Range Hill Road,
Pune - 03,Maharashtra,India.
|
|
|
|
|
have you heard about compilers?
I think there are compilers in linux too and probably the best one (ppl say that) its called gcc.
-Prakash
|
|
|
|
|
Mr.Prakash wrote: the best one [...] called gcc
just a correction.
gcc knows C.
g++ know C++.
moreover, this is maybe the best thing to do to recompile the project. however, if the program is designed for windows specific libraries, they won't work under linux (and won't even compile - for e.g. MFC...)
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|