Click here to Skip to main content
16,005,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get press enter key message from combobox control? Pin
Rajkumar R23-Jul-07 22:56
Rajkumar R23-Jul-07 22:56 
QuestionOverlapped I/O with I/O Completion Ports Pin
Zerox MXI23-Jul-07 22:14
Zerox MXI23-Jul-07 22:14 
AnswerRe: Overlapped I/O with I/O Completion Ports Pin
Mark Salsbery24-Jul-07 5:37
Mark Salsbery24-Jul-07 5:37 
GeneralRe: Overlapped I/O with I/O Completion Ports Pin
Zerox MXI25-Jul-07 16:17
Zerox MXI25-Jul-07 16:17 
Questionzooming progam for dialog window Pin
Rokini23-Jul-07 22:11
Rokini23-Jul-07 22:11 
AnswerRe: zooming progam for dialog window Pin
Arman S.24-Jul-07 1:58
Arman S.24-Jul-07 1:58 
QuestionRe: zooming progam for dialog window Pin
David Crow24-Jul-07 3:26
David Crow24-Jul-07 3:26 
AnswerRe: zooming progam for dialog window Pin
Rokini24-Jul-07 18:48
Rokini24-Jul-07 18:48 
hai,
thank you for ur reply...
i will post my code...

BOOL CLcdDispDlg::OnInitDialog()
{


int i,j;
CDialog::OnInitDialog();

// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here


lWhiteBrush.CreateSolidBrush(crWhite);
lRedBrush.CreateSolidBrush(crRed);
//lGreenBrush.CreateSolidBrush(crGreen);
//lAmberBrush.CreateSolidBrush(crAmber);
//lBlueBrush.CreateSolidBrush(crBlue);
lYellowBrush.CreateSolidBrush(crYellow);
lGrayBrush.CreateSolidBrush(crGray);
lWhitePen.CreatePen(PS_SOLID,1,crWhite);
lGridPen.CreatePen(PS_SOLID,1,crGrid);
lBorderPen.CreatePen(PS_SOLID,1,crBorder);
lRedPen.CreatePen(PS_SOLID,1,crRed);
//lGreenPen.CreatePen(PS_SOLID,1,crGreen);
//lAmberPen.CreatePen(PS_SOLID,1,crAmber);
//lBluePen.CreatePen(PS_SOLID,1,crBlue);
lYellowPen.CreatePen(PS_SOLID,1,crYellow);
lGrayPen.CreatePen(PS_SOLID,1,crGray);
for (i=0;i<240; i++)
for (j=0;j<128; j++)
{
lcd[i][j][0]=i*pitchx;
lcd[i][j][1]=j*pitchy;

}

return TRUE; // return TRUE unless you set the focus to a control
}

void CLcdDispDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}

// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.

void CLcdDispDlg::OnPaint()


{

int i,j;
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{


CPaintDC dc(this); // device context for painting
CRect lRect;
lRect.left=x-10;
lRect.right=x+dx+10;
lRect.top=y-10;
lRect.bottom=y+dy+10;
lOldBrush=dc.SelectObject(&lGrayBrush);
lOldPen=dc.SelectObject(&lGrayPen);
dc.Rectangle(lRect);
dc.MoveTo(x,y);
dc.LineTo(x+dx,y);
dc.LineTo(x+dx,y+dy);
dc.LineTo(x,y+dy);
dc.LineTo(x,y);
lOldPen=dc.SelectObject(&lYellowPen);

for (i=0;i<240;i++)
for (j=0;j<128;j++)
{

x=lcd[i][j][0];
dx=2;
y=lcd[i][j][1];
dy=2;
dc.MoveTo(x,y);
dc.LineTo(x+dx,y);
dc.LineTo(x+dx,y+dy);
dc.LineTo(x,y+dy);
dc.LineTo(x,y);

}


for(i=0;i<240;i++)

{
for(j=0;j<64;j++)
x=lcd[i][j][0];
dx=1;
y=lcd[i][j][1];
dy=1;
dc.MoveTo(x,y);
dc.LineTo(x+dx,y);
dc.LineTo(x+dx,y+dy);
dc.LineTo(x,y+dy);
dc.LineTo(x,y);
}



for(j=0;j<128;j++)
{
i=55;
x=lcd[i][j][0];
dx=1;
y=lcd[i][j][1];
dy=1;
dc.MoveTo(x,y);
dc.LineTo(x+dx,y);
dc.LineTo(x+dx,y+dy);
dc.LineTo(x,y+dy);
dc.LineTo(x,y);
}



lRect.left=lcd[i][j][0];
lRect.right=lcd[i][j][0];
lRect.top=lcd[i][j][1];
lRect.bottom=lcd[i][j][1];
dc.Ellipse(lRect);


CDialog::OnPaint();
}

}



void CLcdDispDlg::OnZoomin()
{
i want to add code here;


}
please give some idea..
i implemented so many mehods...
but it didnt work out..
thank you in advance...
rokini.k
AnswerRe: zooming progam for dialog window Pin
Rokini24-Jul-07 18:58
Rokini24-Jul-07 18:58 
QuestionA Question about lib files Pin
mt_samiei23-Jul-07 21:34
mt_samiei23-Jul-07 21:34 
AnswerRe: A Question about lib files Pin
Jonathan [Darka]23-Jul-07 21:42
professionalJonathan [Darka]23-Jul-07 21:42 
GeneralRe: A Question about lib files Pin
mt_samiei23-Jul-07 21:54
mt_samiei23-Jul-07 21:54 
GeneralRe: A Question about lib files Pin
Jonathan [Darka]23-Jul-07 22:09
professionalJonathan [Darka]23-Jul-07 22:09 
GeneralRe: A Question about lib files Pin
mt_samiei23-Jul-07 22:13
mt_samiei23-Jul-07 22:13 
AnswerRe: A Question about lib files Pin
Rajkumar R23-Jul-07 22:30
Rajkumar R23-Jul-07 22:30 
GeneralRe: A Question about lib files Pin
mt_samiei23-Jul-07 22:36
mt_samiei23-Jul-07 22:36 
AnswerRe: A Question about lib files Pin
Rajkumar R23-Jul-07 22:43
Rajkumar R23-Jul-07 22:43 
GeneralRe: A Question about lib files Pin
mt_samiei23-Jul-07 22:48
mt_samiei23-Jul-07 22:48 
AnswerRe: A Question about lib files Pin
Md. Ali Naser Khan24-Jul-07 0:23
Md. Ali Naser Khan24-Jul-07 0:23 
QuestionTooltip for disabled control Pin
Hans Dietrich23-Jul-07 21:17
mentorHans Dietrich23-Jul-07 21:17 
AnswerRe: Tooltip for disabled control Pin
Jonathan [Darka]23-Jul-07 21:21
professionalJonathan [Darka]23-Jul-07 21:21 
AnswerRe: Tooltip for disabled control Pin
Abhijeet Pathak23-Jul-07 23:10
Abhijeet Pathak23-Jul-07 23:10 
AnswerRe: Tooltip for disabled control Pin
Wes Aday24-Jul-07 4:35
professionalWes Aday24-Jul-07 4:35 
AnswerRe: Tooltip for disabled control Pin
Mark Salsbery24-Jul-07 5:40
Mark Salsbery24-Jul-07 5:40 
GeneralRe: Tooltip for disabled control Pin
DevMentor.org24-Jul-07 21:27
DevMentor.org24-Jul-07 21:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.