|
Hi,
I think this is because combo box is not a single window,it is a combo of list box, edit box and combo itself.
Try CComboBox::GetComboBoxInfo() and it has three HWND handle and match the EDIT box handle as the Enter key message must have been issued from edit control.
Best regards
Rajkumar
|
|
|
|
|
As I looked at some of the examples and articles posted on this site, and trying to code a scalable server, I have a few questions about the design.
How many I/O completion ports does a scalable server usually will use? I thought about it and decided maybe 2 or more? However, most examples I saw uses just 1. Two would mean one for a thread that solely accepts new connections using AcceptEx extension function loaded using WSAIoctl, and the other for another thread that deals with overlapped send, receive and transmit.
Or is it better to have a completion port per task? Say four for new connections, send, receive and transmit each on their own thread?
|
|
|
|
|
|
Thanks for the tip, I think I finally managed to get it working, well, just a basic implementation. I got a much clearer picture of how it works in the background.
|
|
|
|
|
hai,
i am a new member..
i am doing zoom program in vc++ using buttons.
i am creating a lcd display having 240*128 pixls.
i have to zoom a wave in lcd either in right,left,up,down using these buttons.
any body please help me.
thanks in advance..
rokini.k
roki
|
|
|
|
|
Although I don't know the details of how you have implemented your lcd, a technique that might be useful is changing the mapping mode of the window (lcd). IOW, you would scale the dimensions of your current mapping mode (if your mapping mode is MM_ISOTROPIC or MM_ANISOTROPIC)...
Please, give more information, if you think you need more precise answers.
--
=====
Arman
|
|
|
|
|
Does this help?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
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
|
|
|
|
|
hai friend,
thank you for ur reply..
But i am not using bitmap..
directly in onpaint() method i created lcd display screen.
i want to zoom this display..
rokini.k
|
|
|
|
|
Dear all
I add one lib file to my VC++ 6 project. and want to debug my project.
But I can not add debug information of lib file to debug information of my project.
I have the source code of lib file also.
If you know how I can remove this error please let me know.
Regards
Monhi
|
|
|
|
|
What happens when you try to debug ?
What error are you getting ?
|
|
|
|
|
I should remove "Use program database" option to compile the code,
In this situation I cannot debug the program.
If I make that option active then I get following error.
atapid.lib(tapireq.obj) : fatal error LNK1202: "D:\users\TCMon_1\Debug\vc60.pdb" is missing debugging information for referencing module
I should find one way to add debug information of lib file to project which I want to add lib file to that.
Regards
Monhi
|
|
|
|
|
Have you tried rebuilding the entire project, just in case things have gotten a little confused ?
regards,
|
|
|
|
|
Yes I do it But It does not work.
Several times I do it.
|
|
|
|
|
Hi,
I think this is because both the application and library refers to the same debug info file "VC60.pdb" and build seperately causing only the application's debug information stored. Since you have the code for library, in the project setting change the Debug database file name to the project name, say atapid.pdb rather than vc60.pdb. or do the same for your application yourApp.pdb.
Best regards
Rajkumar
|
|
|
|
|
May you please give me the place which I can change debug information file name in visual C++ 6.00.
In which menu.
Regards
Monhi
|
|
|
|
|
In project->settings->link(tab)->customize(in category list box)->program database name(edit box)
|
|
|
|
|
|
Run the source code of the lib file in debug mode. Use the created lib file in your project and rebuild the project. Now I think you can debug the lib from your project.
|
|
|
|
|
If you have a control that normally has an associated tooltip, what would you expect to happen if the control was disabled? Should the tooltip still be shown?
|
|
|
|
|
Hi Hans,
I've seen disabled controls both with and without tooltips, but if I was coding it I'd be tempted to show the tooltip anyway.
regards,
|
|
|
|
|
Yes, definitely...
If a control, or menu item is disabled but still shows Tooltips, then it gives a good idea of what that button does and saves precious time as we don't have to look into help files...
|
|
|
|
|
Hans Dietrich wrote: tooltip still be shown
My vote would be yes also.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
|
|
|
|
|
Another vote for yes!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Are you jumping on the yes bandwagon? is there any more room left...LOL
Yours Truly, The One and Only!
|
|
|
|
|