|
sorry I left office yesterday...
for that purpose, there's in Set handler function.
keep that in a member varible (pointer type of CListBox) and call when it is required.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
hello
thanx for replying..
sorry i tried to do it but i'm not getting in display function when i call the sethandler function what should i pass into the sethandler function.
i'm doing like this
CTestList::Display()
{ List control variable here
CListBox *l1 = sethandlerlist("what i have to pass here");
l1->AddString("Abc");
}
tell me where i making mistake
thanx
|
|
|
|
|
actually set handler function should be call from the owner of list. i.e in this case, the dailog class. he also contains the XYZ Class too.
so he is becoming as mediator for communication.
set set handler should be called from OnInitDialog or from the constructor.
in the class, you pls add CListBox* m_pList;
in the set handler function
m_pList = pListBox;
inside display function, you can use m_pList, if you properly set the handle.
it's actually not big deal.
I dont have time to write code, that is why im explaining through these steps.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
hello sir,
thanx for replying..
i implement it as u said but its giving me error
"Unhandled exception at 0x7c291bfa (mfc71d.dll) in Kletsmajoor.exe: 0xC0000005: Access violation reading location 0xccccccec."
i try to debug the error and found that NULL in the m_hwnd variable.
what should i do.
thanx
|
|
|
|
|
you are calling an invalid pointer.
i.e ListBox pointer is invalid
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
thanx dude
u r gr8
thank you very much
bye
|
|
|
|
|
did you solve it?
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
yes i did.
actually i was calling the display function with a wrong object.
i'm facing one another problem is that i have to add image & string simultaneously in the list i'm using listctrl for it.
but not getting the appropriate solution.
thanx
|
|
|
|
|
either derive a class from CListBox and handle it inside or use a listctrl instead. Anyway it's easy to handle it using Image lists or GDI drawing.
Check MSDN for more information. all controls have been illustrated in sample application called CTRLTEST. or search CP for more information.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
Plz sarath reply me..
i'm waiting for ur reply.
|
|
|
|
|
Hi all
i am working with mfc (VC++ 6).
In ny project i have a situation to identify the right click on a button.
Please help me
Thanks
-- modified at 6:20 Saturday 8th July, 2006
|
|
|
|
|
Dinu John wrote: the right on a button.
I didnt get you ....
right on means "accurate"
or you are trying to get mouse move? right click or what?
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
Thank u ,
I mean ,right click on button,please reply
|
|
|
|
|
Hi Dinu,
there's is no message map, that can map right button click
so derive a class from CButton.
Add WM_RBUTTONDOWN message handler and the needful there. Subclass or add control variable for your button.
now you are done.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
WM_RBUTTONDOWN / WM_RBUTTONUP?
|
|
|
|
|
->Thanks ,
but my requirement is ,i need a pop up menu when right click on the button which is on form view,ie (pop up will come over the button)
|
|
|
|
|
Why won't WM_RBUTTONDOWN / WM_RBUTTONUP suit your needs? What about WM_CONTEXTMENU?
|
|
|
|
|
Hi guys
I need to save the time with resolution of 1 milli second in one of my project.
Please give me some information in this regard.
Thanks in advance
Mahdi
|
|
|
|
|
Hi guys
I need to save the time with resolution of 1 milli second in one of my project.
I fine that CTime class has not enough resolution for this.
Please give me some information in this regard
Thanks in advance
Mahdi
|
|
|
|
|
Are you trying to time the time code takes to run? If that is the case look at QueryPerformanceCounter
|
|
|
|
|
no I just want to get time and save it in a file.
I use CTime class, but it does not have enough resolution.
I want a function or class that give me the time of system in milli second resolution.
Regards
|
|
|
|
|
|
I'm not sure whether you will get precise timing of 1 ms because as per the windows concept, each process will get 20ms of time for it's execution, it's depends on the scheuduler that your process will get scheduled.So a in the user mode, we could not ensure the correctness of the timer.
We can use waitable timer for the same, since it is a kernel object, it will signal at the specified time. But I doubt whether your application can handle do the required processing thsi small amount of time. Anyway check this.
Using waitable timer[^]
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
The Windows multimedia timers are supposed to offer the programmer the ability to get timer resolutions better than what is typically available (around 10ms on Windows XP).
I have not tested these functionalities extensivelly, but I did notice a subjective improvement in a 3D animation I was building.
Check timeBeginPeriod function and the related multimedia timer functions. The minimum resolution that can be set is 1ms.
Rilhas
|
|
|
|
|
i've made my derived CRichEditCtrl class able to receive url addresses that appear with underline, but the problem is that when i click this link, nothing happens.
also, right click on the rich edit doesn't open a pop up menu
and also, how do i catch copy & paste methods
thanks in advanced
Yaron Nir
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|