|
Hello all.
Can someone tell me in simple way what happen when I use preprocessor option #pragma pack ? I tryed it but I thing there is no effect.
Can you tell me what exactly happen?
Thank you a lot.
<br />
<br />
#pragma pack(1) // turn byte alignment on ?????<br />
<br />
enum mENUM<br />
{<br />
};<br />
struct p_mStruct<br />
{<br />
UINT m_Ui;<br />
};<br />
<br />
#pragma pack() // turn byte alignment off ?????<br />
Jaja Paja
|
|
|
|
|
Perhaps a simple example is better than any explanation.
First case:
#pragma pack(1)<br />
struct MyStruct<br />
{<br />
BYTE a;<br />
UINT b;<br />
};<br />
#pragma pack()
sizeof(struct MyStruct) will return 5 bytes (1+4=5)
Second case:
#pragma pack(4)<br />
struct MyStruct<br />
{<br />
BYTE a;<br />
UINT b;<br />
};<br />
#pragma pack()
sizeof(struct MyStruct) will now return 8 bytes! (1+3+4=8) because the compiler aligns each member of MyStruct to a 4 bytes boundary. Concretly, the directive tells the compiler that the address of each member must be divisible by 4. To do that, the compiler insert the necessary blank bytes between variable members.
|
|
|
|
|
Ok.
I understand now. Thank you a lot.
xSoptik
|
|
|
|
|
Anyone know if the Ultimate Grid is included in the Ultimate Toolbox? The website has no contact information, and the only way I can see to purchase these products is through codeproject...
Chris Maunder's DataGrid is great, but I just don't have the time to implement slider controls and spin boxes. If anyone knows of good implementations of these, let me know. (The GridTreeCtrl has a spin box cell class in it, but it doesn't seem to work very well without the ability to hold down the spin control, and frequent double-count for a single click of the buttons.)
|
|
|
|
|
I want to a program in vc 6 by using which i can send message say "HELLO" to all the active users on internet.
Can any one guide me or refer me to a good site or refer or provide me some useful links or direct or provide me some source code in vc 6 of the above stated problem.
|
|
|
|
|
|
Well i don't want to develop a Chat type of application.
I want to write an application just containing a "HELLO" message box , which is when activated spreads itself on the internet.
Thats what i mean.
|
|
|
|
|
usmanmir wrote:
which is when activated spreads itself on the internet
You mean like..a virus?
I Dream of Absolute Zero
|
|
|
|
|
Hahahaha... You're stupid. So you want to write a virus right? And you don't have the foggiest idea how to even start. And you ask the question in a forum for people who build software for a job. You really are stupid.
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^] - now available in MSWord format![^]
|
|
|
|
|
Seeing the older posts he made, i guess he is trying to code a worm but using VB
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
actually it's quite simple :
foreach(System.Internet.User usr in System.Internet.AllUsers)
{
usr.System.Windows.Forms.MessageBox.Show("Hello");
}
but maybe you will have som problems porting this C# code to VB
|
|
|
|
|
The. Whole. Entire. Internet. ?.
regards,
Paul Watson
South Africa
PMW Photography
Gary Wheeler wrote:
It's people like you that keep me heading for my big debut on CNN...
|
|
|
|
|
Paul Watson wrote:
The. Whole. Entire. Internet. ?.
Yep, So that he send Morning wish to each Internet user ... Good Morning
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
Yep, So that he send Morning wish to each Internet user ...
Is he aware of time zones ???
Greets
Roland
|
|
|
|
|
That won't work since there are people in different timezones... I don't like to get a goodmornig message before I go to sleep..
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
... I don't like to get a goodmornig message before I go to sleep..
let convert It! he will send "GOD BLESS YOU"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
RegardLess of the time zone, when i send my that application containing hello message , it should go to all the users who are currently using the internet.
Yup you were rite. SomeThing like a virus but just from spreading point of view.
|
|
|
|
|
Why do you want something to spread just like a virus? If somebody wants your code, they will download it or something, but if somebody doesn't want it, don't bother them with it
Blog[^]
|
|
|
|
|
Paul Watson wrote:
The. Whole. Entire. Internet. ?.
He just wants to write a "hello world" program...
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Jeffry J. Brickley wrote:
He just wants to write a "hello world" program...
Literally...
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Luis Alonso Ramos wrote:
Literally...
That was my point.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
usmanmir wrote:
...send message say "HELLO" to all the active users on internet.
Perhaps you meant intranet?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
we are hopes blue color ( or several color ) for highlighted eria.
We could not color by our coding.
Please advice as soon as possible.
|
|
|
|
|
We tried it what take stopgap way of programming. The result was no good which is temporizing, mess and so on.
If you suggest the GridCtrl, we are very sorry that could not use it because most of the programm make by ClistCtrl & CheaderCtrl.
Therefore, please advice the about ClistCtrl & CheaderCtrl as soon as possible.
|
|
|
|
|
We have process as the following,
1. The user does the tracking at detaile of list, same as tracking at between the header items.
2. We does flow of programming as following,
2-1. changes cursor image then on the vertical grid line and near the it, like the hover motion on Header CTRL.
2-1-1. When start up the programm, does get the Header Ctrl of Hover Motion information.
2-1-2. Also, does get the tracking cursor image.
2-2. prepare tracking then hold the left click on mouse.
2-3. indicate vertical solid line then moving mouse cursor with holding Lclick.
2-3-1. When, does indicate solid vertical line, same as header tracking info of size, and so on.
2-4. indicate the look of tracking continury unless does not hold off the click.
2-4-1. using the OnMouseMove event function.
2-5. Then finish of tracking by hold off click, move & indicate the rows of width & positions.
2-5-1. When hold off, get the horizontal position & movement quantity.
2-5-2. set pos, width and so on, repaint these rows
3. We are certain of process flow, but we does not known functions and so on, about CListCtrl & CHeaderCtrl. so we could not coding to make the programm.
Therefore, please advice as soon as possible.
In conclusion, i am very sorry for my poor english.
|
|
|
|