|
|
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
|
|
|
|
|
YaronNir wrote: but the problem is that when i click this link, nothing happens.
u can u use ShellExecute function to open a internet explorer for the specified url when the user clicks in the url.
YaronNir wrote: and also, how do i catch copy & paste methods
handle WM_COPY and WM_PASTE messages for this.
nave
|
|
|
|
|
thanks for the reply.
how do i catch the click on the url to call the shell execute?
what about my third question : right click on the rich edit doesn't show default pop up menu (with the items of copy paste etc....)
thanks again
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
You can use //::ShellExecute(NULL, "open", "iexplore.exe", "your_url.htm", NULL, NULL, SW_SHOWNORMAL); or see CHtmlView maybe it is some helpful to you
whitesky
|
|
|
|
|
thanks for the reply.
how do i catch the click on the url to call the shell execute?
what about my third question : right click on the rich edit doesn't show default pop up menu (with the items of copy paste etc....)
thanks again
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
i have created a window how to add menu to my window
i have written code like this
int CNode::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
CMenu* pNewMenu = new CMenu;
pNewMenu->LoadMenu( IDR_MENU2 );
SetMenu(pNewMenu);
return 0;
}
and my window style is
DWORD dwStyle = WS_CHILD|WS_VISIBLE|WS_OVERLAPPEDWINDOW|WS_BORDER
but i am not getting menu to my window
can any one help me
B.LakshmipathiRao
-- modified at 3:08 Saturday 8th July, 2006
|
|
|
|
|
no need of doing all this.
just right click on the dialog. Take properties from the menu.
In the general tab u can find a combobox called menu. Select "IDR_MENU2" from that one. Build and run the project.
nave
|
|
|
|
|
LakshmiPathiRao wrote: CMenu* pNewMenu = new CMenu;
pNewMenu->LoadMenu( IDR_MENU2 );
SetMenu(pNewMenu);
There is nothing wrong in your code.
It is working fine here.
Just debug the code once,keeping a breakpoint at OnCreate()
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
hi,I have created a tabcontrol in formview, CBaseFormView:CFormView,Each tab in the tabcontrol is a formview,CTab1View:CFormView,CTab2View:CFormView..I have handled WM_CONTEXTMENU in CBaseFormView,in the context menu i have two item "Print" and "PrintPreview".I have Handled ON_COMMAND for both menu items in CBaseFormView,When i right in BaseFormView,print and printpreview are working,even the print command in printpreview is working,When i right click on tabcontrol..print is working,print in printpreview is not working ,what could be the reason..?
Thanks in before
James
|
|
|
|
|
Can u give some more details ??
To know the routing of the command,Keep message boxes in each view and run the application.
I think this must help you to know the command routing.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
i have overriden Onfileprint,onfileprintpreview,Onprepareprinting,OnPrint,OnEndPrinting,in all view,I am handling printing in the respective view..
|
|
|
|
|
I am building a BHO that is meant to popup a IHtmlPopup window on a mouse over image event. All the code works fine if the image is in the main Window.
However if the image is in a frame then I get the following error:
{"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"} System.Exception {System.UnauthorizedAccessException}
This happens when I try to create the Popup Window or access its Document
The code below is in C#, but I think it would apply to C++ too.
I have tried getting the parentWindow from the Frame's document and from teh main document.
<br />
IHTMLWindow4 parentWindow = (IHTMLWindow4)PageDocument.parentWindow;<br />
<br />
IHTMLPopup popUp = (IHTMLPopup)parentWindow.createPopup( ref argIn );<br />
IHTMLDocument2 popupDoc = (IHTMLDocument2)popUp.document;<br />
Any ideas?
-- modified at 2:31 Saturday 8th July, 2006
|
|
|
|
|
|
Thanks, but I am not sure that is my problem. My code works when there are no frames in the html. It fails when we have frames. Also, I can get it to work using simple javascript even in frames. Just cant get the C# code to work with frames.
|
|
|
|
|
Sounds like a cross frame security issue.
Steve
|
|
|
|
|
Yes it is. But how do I overcome it? Is there a way around?
|
|
|
|
|
|
|
can't brouse the page...are u sure about the link?
|
|
|
|
|
Yes..It is getting opened here.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
I can't....
mybe the priblem is couse use Opera?
|
|
|
|
|
Could you post article here...or emai...
|
|
|
|