hi all,

Strange issues seems to hav a affinity for me.

I have Created buttons using resources and it works fine in emulator. But on device the buttons are not displayed. It enters the the fn where i create buttons...but still the buttons r missing...

Here's how I create button :

Code:
void Demo:CreateButtonUsingResource()
{
   iNextButton = CAknButton::NewL();
    iNextButton->ConstructFromResourceL(R_FIRST_BUTTON);
    iNextButton->SetContainerWindowL(*this);
    iNextButton->SetRect(TRect ( TPoint(530,310), TSize(30,20) ) );
    iNextButton->SetObserver(this);
    iNextButton->MakeVisible(ETrue);
    iNextButton->ActivateL();
}
Here's my resource file:

Code:
RESOURCE AVKON_BUTTON r_first_button
    {
    flags  = KAknButtonNoFrame;
    states =
        {
        AVKON_BUTTON_STATE
            {
            helptxt = "";
            bmpfile = BUTTON_IMAGE; 
            bmpid = EMbmdemoNext;
            bmpmask = EMbmdemoNext_mask;
            },
        AVKON_BUTTON_STATE
            {
            flags = KAknButtonStateHasLatchedFrame;
            bmpfile = BUTTON_IMAGE; 
            bmpid = EMbmdemoNext;
            bmpmask = EMbmdemoNext_mask;
            }            
        };
    }
I understand that harcoding d SetRect values for button is not a bright idea....but can tht be d reason for not displaying it at all..i tried a couple of permutation-combination with the co-ordinates. Noting worked....

Ny thing tht I'm missing..???
aniticipating ny kind of clue,suggestions,help....i lost it again...