|
I'm only able to see:
LBN_DBLCLK
LBN_ERRSPACE
LBN_KILLFOCUS
LBN_SELCANCEL
LBN_SELCHANGE
LBN_SETFOCUS
it doesn't matter what i select from the combobox.. i tried all combinations. i'm using vc++6.0
|
|
|
|
|
Those are listbox, not list control, notifications. You need to handle the WM_RBUTTONUP message for that control.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
would you mind telling me where could i read how to do that?
thanks!
|
|
|
|
|
Search MSDN for WM_RBUTTONUP and OnRButtonUp() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
i use visual C++.Net.
at starting a new form is formed automaticaly that's name is Form1.
but after i form the second form that is Form2, i cannot reach any variable or function in Form1.
since i write #include "Form2.h" in Form1.h so i can use any variable or function in Form2 but i don't write #include "Form1.h" in Form2.h so i cannot reach things that is in Form1.
when i write #include "Form2.h" in Form1.h and #include "Form1.h" in Form2.h after this the compiler give an error that is "multiple defined variables and functions".
so how can i reach the Form1 from Form2.
|
|
|
|
|
Look at the top of a .h file that ClassWizard creates. Notice that it adds both #if !defined and a #pragma once preprocessor directives. Those are to keep the file from being included more than once.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I need to inverts a rectangle. My drawing code is based on Gdi+, and Gdi+ doesn't provide any function to do this. so i used Windows API function ::InvertRect.
It works fine when direct draw to screen, but when i used double-buffer, the result was wrong. here is the code:
void CTestView::OnDraw(CDC* pDC)
{
CTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CRect rc;
GetClientRect(&rc);
Bitmap bmp(rc.Width(), rc.Height());
Graphics* pGraphics = Graphics::FromImage(&bmp);
SolidBrush brush(Color(255, 255, 255));
pGraphics->FillRectangle(&brush, rc.left, rc.top, rc.Width(), rc.Height());
HDC hdc = pGraphics->GetHDC();
CRect rc1;
rc1.left = m_pt.x;
rc1.top = m_pt.y;
rc1.right = rc1.left + 10;
rc1.bottom = rc1.top + 10;
::InvertRect(hdc, &rc1);
pGraphics->ReleaseHDC(hdc);
Graphics g(pDC->GetSafeHdc());
g.DrawImage(&bmp, Point(0, 0));
delete pGraphics;
}
What's wrong?
|
|
|
|
|
Hi,
Is there a way to programatically add an icon for a contact ( in MS Outlook )?
Ex: for a contact which has an icq email address to put the icq icon.
Thanks
|
|
|
|
|
|
my application looks like
http://www.treetops.com.sg/before.jpg
when I fill an IC in patient IC textbox and click search button, it's supposed to query database and show what found in the right hand side listview. Everything seems ok by using mouse click, however if I want to use keyboard 'Enter' instead of mouse click what happen is all controls in this 'Patient Infomation' tab dispear:
http://www.treetops.com.sg/after.jpg
I have to manually switch to other tab then switch back, controls in Patient Infomation will appear. Anybody encountered this kind of problem before?
|
|
|
|
|
Well, I think you have for each tab a dialog and only one of them at a time is visible.
Normally, dialogs have an "OK" and a "Cancel" button. If you only delete them, the functionality still is in the dialog and "Enter" or "Esc" will close your dialog.
To avoid this, you should override (implement) the "OnOK" and "OnCancel" functions, but without calling its parent functions.
void CMySubDialog1::OnOK()
{
//CDialog::OnOK();
}
void CMySubDialog1::OnCancel()
{
//CDialog::OnCancel();
}
This should solve your problem.
|
|
|
|
|
Its sounds as though the Search button is not the default button. Does the property sheet have an OK button?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Does anyone know if there's a relatively easy way of inserting the VERSIONINFO data into a C++ comment. I want to annotate my changes with the current build number. Any ideas?
Many thanks,
Robert Pickford
|
|
|
|
|
Robert Pickford wrote:
Does anyone know if there's a relatively easy way of inserting the VERSIONINFO data into a C++ comment.
Do you mean at compile time or run time?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I actually mean at edit time. What I really want is a Visual Studio add-in or macro that inserts a comment like:
.... // Modified R A Pickford [02-Jun-2004 Build 2108]
Doesn't have to be exactly that format but it's getting the build number in that is foxing me at the moment. I may have to write my own addin.
|
|
|
|
|
Robert Pickford wrote:
...but it's getting the build number in that is foxing me at the moment.
Isn't that number determined by you?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes and no. I use VERSIONINFO and increment the Build number on every major release build so I wanted to automatically put that number into my comments.
|
|
|
|
|
Use a version control package. Then consult the documentation for that package. In CVS you can use
/* $log$
*
*/
to place your change comments in the code, but if you don't use CVS that isn't helpful. There are other things too that you can add, some of which are suitable for assigning to a variable so you can manipulate the version in code.
|
|
|
|
|
When using both modeless dialogs and formviews together in an application, is it an inherent nature of the modeless dialog to always overlap the formview? I know that a possible solution is to pass GetDesktopWindow() as the second parameter in the Create() function for dialogs, but that is not desirable for what I am doing. I want the application's mainframe window to be the parent window. However, when I use this in the Create function, the dialog still covers the formview. Is there any way to prevent my modeless dialogs from hiding my formviews?
Thanks for any suggestions.
|
|
|
|
|
I have problem with an executable with a MFC dialog. Whenever my dialog is up and i switch to MS Word or Paint then close down Word or Paint my exe locks up. It does not seem to repaint or return control when word or paint is shut down.
any suggestions?
|
|
|
|
|
Are you doing anything within OnPaint, KillFocus or SetFocus that could be looping?
I suggest that you:
1) run your application in debug through the IDE.
2) Switch between programs.
3) When you switch back, use the IDE to break into your program.
You should have a better understanding of where it is and what it is doing then.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
My dialog(modal) does not get WM_NOTIFY messages.
How can it be fixed?
Thanks.
avivhal
|
|
|
|
|
Hello everyone,
I am updating the code of an already working service. I am trying to start a service on a remote computer from within the main function of the initial service. First I check if the executable of the service is in place and the check fails even if it is there. When I remove this check and try to start it anyway I cannot access the Service Control Manager with the following command:
scmHandle = ::OpenSCManager(serviceComputer, 0, SC_MANAGER_ALL_ACCESS);
It works locally, let's just say for simplicity that I specify as service executable:
\\mypc\c\temp\bla.exe
Is it possible what I am trying to do (by changing permissions in the creation of the initial service or something), or should I forget the whole thing?
Thanks a million in advance
|
|
|
|
|
I have a CDialog.
I'm trying to implement tooltips for the edit controls of the dialog.
I adde the code :
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXT,0,0xFFFF,OnToolTipNotify)
in the message map
and my function is :
BOOL CPageCurrentLoop::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult )
The problem is the OnToolTipNotify never gets called. Even if the mouse pointer is over CEdit controls of the dialog.
Thanks.
avivhal
|
|
|
|