|
hi nave,
please give me a snippet of code so that i will be very greatfull towards u.
i always rember you. its an urgent requiremnt.
Uday kiran
|
|
|
|
|
void CTranspDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
int nTime = GetDoubleClickTime();
SetTimer( 1, nTime , 0 );
CDialog::OnLButtonDown(nFlags, point);
}
void CTranspDlg::OnLButtonDblClk(UINT nFlags, CPoint point)
{
KillTimer( 1 );
// show ur dialog here
CDialog::OnLButtonDblClk(nFlags, point);
}
void CTranspDlg::OnTimer(UINT nIDEvent)
{
if( nIDEvent == 1 )
{
KillTimer( nIDEvent );
// draw ur ellipse here
}
CDialog::OnTimer(nIDEvent);
}
nave
|
|
|
|
|
hai nave,
thanku very much i got it.
Uday kiran
|
|
|
|
|
Hi friends
I am developing a application " pseudo event generation " and i am facing problem in generating event message(desciption). I am using a resouce DLL for it. but i am not able to map the messages for eventID and Category.
Like if eventId is 100 and category is NONE then mesage will be different when eventId is 100 and category is Disk/printer/services etc.
if anybody had done it before then plz help me
vickz
|
|
|
|
|
Hi,
I have created a control type variable for an edit box.My requirement is if I enter anything other than a number , it should display a message.Is there any function available to check whether the entered data is a number or not?(As per my requirement the variable should be only control type but not an integer or double type)
Thanks in advance
Sandhya
|
|
|
|
|
derive a class from the CEdit and overide the WM_CHAR message. In that function u can chek the entered character is number or not.
nave
|
|
|
|
|
Set the ES_NUMBER style for the edit control.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
SandhyaSri wrote: (As per my requirement the variable should be only control type but not an integer or double type)
check NUMBER property of EditControl
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I have design the menu bar for dialog based application.
When compiling there is no error.But it is not displaying in the run time.
What to do if i want to display menu bar at run time in dailog box
Thanks
|
|
|
|
|
how did u set the menu to the dialog?
nave
|
|
|
|
|
in resource tab right click the IDD_WARTZ_DIALOG ->insert menu->menu login function
|
|
|
|
|
Did you mention the id of the menu in the menu property of the dialog?
-- modified at 0:26 Thursday 3rd August, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
You have created a menu. The id of the menu would be IDR_MENU1 or something similar to this unless you have changed it. Right click on the dialog. Go to properties and in the menu option mention the id of the menu IDR_MENU1 in this case. Compile and Execute. You will see the menu.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
right click on the dialog box( not in resources tab). Take properties.
In the genearal tab, there will be a combo box with name Menu. Ffrom that combobox, select the menu u want to set,
Buid and run the application.
nave
|
|
|
|
|
Can you show your code that you insert menu to your dialog
|
|
|
|
|
Hello all,
I have several CWinThread which I created using
AfxBeginThread
m_bAutoDelete = FALSE
ResumeThread
After I perform WaitForSingleObject and time out occur (which mean the CWinThread is still running), can I still safely delete them?
Thank you very much
|
|
|
|
|
|
|
I am in the process of writing a very simple MDI application that uses CDAORecordset and CDAORecordView classes to talk to an Access Database. I have created 2 sets of derived classes CRequestSet, CRequestDoc, CRequestView, CContactSet, CContactDoc, and CContactView. I have created the Document templates for both documents and added them.
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_REQUESTTYPE,
RUNTIME_CLASS(CRequestDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CRequestView));
AddDocTemplate(pDocTemplate);
pDocTemplate = new CMultiDocTemplate(
IDR_CONTACTTYPE,
RUNTIME_CLASS(CContactDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame for contact
RUNTIME_CLASS(CContactView));
AddDocTemplate(pDocTemplate);
I have also created the required additional resource files. I have found how to have the application start with no active documents, and how to not have the popup display when I select new from the menu.
I have added new menu entrys in the IDR_MAINFRAME menu resource IDD_ACTION_NEWREQUEST, and IDD_ACTION_NEWCONTACT. What is the code necessary to have the application create a new CContactDoc document when the IDD_ACTION_NEWCONTACT is clicked, and a new CRequestDoc document when the IDD_ACTION_NEWREQUEST is clicked.
I am a newbie so any background information and explaination will be greatly appreciated.
Thanks,
Clint
|
|
|
|
|
I think you have to keep pointers to your CMultiDocTemplate objects in your application class. Then when you need new empty document, simply call:
pDocTemplateRequest->OpenDocumentFile(NULL);
or
pDocTemplateContact->OpenDocumentFile(NULL);
I hope this helps.
|
|
|
|
|
Will this work for multiple Document templates, and if so how?
thanks
|
|
|
|
|
Hey all,
I want to display set of values in the listbox in my project.
How do I do to diplsy the values with proper spaces between them so that the "=" is spaced equally on all the lines. this makes it more easier to read.
say: like this:
fruit = 5
tomatoes = 6
Thanks in advance.
|
|
|
|
|
My suggestion is to use List ctrl instead of Listbox so that the item can be displayed in two columns.
nave
|
|
|
|