🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #13811

Re: alignment

#13811
From: Antonio Farfan
Date: Tue, 16 Sep 2003 17:40
106 lines
3607 bytes
This a part of my code:



file://MyFile.h


.........

//   TPS_Settings is one struct defined in a file .h . It has the same
struct that it is keeping in memory
//     I define this struct the same way that in the memory

    TPS_Settings  *SettingsGood;




 file://MyFile.cpp


extern TRegBuffer RegBuffer;
........................
// -------------------------------------------
// Making copy of RegBuffer from FRegistros
// In the  Buffer RegBuffer are the data read from the memory.
// ---------------------------------------------------------

for (int i=0;i<MAX_REG_LONG;i++)
{
    SettingsForm->RegBufferSettings[i]=RegBuffer[i];
}

// --------------------------------------------------------
// Assigning the RegBufferSettings to Struct SettingsGood
// --------------------------------------------------------



SettingsForm->SettingsGood=(TPS_Settings*) SettingsForm->RegBufferSettings;




//-------------------------------------------------------------
//Setting the Components of this form to values of SettingsGood
//-------------------------------------------------------------






       switch (SettingsForm->SettingsGood->fLanguageLocale)
             {
               case ValuesAutomatic:   {

SettingsForm->LanguageRadioGroup->ItemIndex=0;
                                break;}

               case  ValuesEnglish: {

SettingsForm->LanguageRadioGroup->ItemIndex=1;

                                break;}

               case  ValuesSpanish: {

SettingsForm->LanguageRadioGroup->ItemIndex=2;
                                break;}

            //default: { FormRegistros->NoCorrectValue
(LanguageRadioGroup); }



When i accesed to the values (like fLanguageLocale) is not gotten correctly,
normally is displaced. I don�t see the number of displacement in the buffer
RegBuffer. Now i solve this adding fields to my struct (TPS_Settings) , but
this is very graceful.

if you need see more code you can request me

br
Antonio

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> escribi� en el mensaje
news:3f674494$1@newsgroups.borland.com...
>
> "Antonio Farfan" <amfm0777@hotmail.com> wrote in message
> news:3f673746@newsgroups.borland.com...
> > I don�t understand this because i think that i set the
> > same alignment that at memory.
>
> Please show your actual code that is failing.
>
>
> Gambit
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
>
>
Technical Details
Message-ID: <3f6749b2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f673746@newsgroups.borland.com> <3f674494$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,a9334a47483d8c0e
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-16 10:40:43 PST
From: "Antonio Farfan" <amfm0777@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f673746@newsgroups.borland.com> <3f674494$1@newsgroups.borland.com>
Subject: Re: alignment 
Date: Tue, 16 Sep 2003 19:40:34 +0200
Lines: 108
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 62.15.230.33
Message-ID: <3f6749b2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063733682 62.15.230.33 (16 Sep 2003 10:34:42 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail