|
Using MFC? Override CFrameWnd::OnUpdateFrameTitle .
Here's the implementation I used to add a 'document is modified' marker:
void CMainFrame::OnUpdateFrameTitle(BOOL bAddToTitle)
{
if ((GetStyle() & FWS_ADDTOTITLE) == 0)
return;
CDocument* pDocument = GetActiveDocument();
if (bAddToTitle && pDocument != NULL)
UpdateFrameTitleForDocument(pDocument->GetTitle() + (pDocument->IsModified()?"*":""));
else
UpdateFrameTitleForDocument(NULL);
}
|
|
|
|
|
THanks for your reply but i need this for Winword document. Once we open any document (Test.doc), it will show its name at top left but I want to append my string to the cation of it "Test.doc (MyDoc)".
Do you have any idea how to do it?
SNI
SNI
|
|
|
|
|
Hmmm - so how is that appropriate for a C++/MFC forum?
Anyway - the Word object model has 'Caption' properties for the Application and Window objects, but not for Document objects. I'd suggest you open the VBA IDE for Word and look through the Word object model with the object browser, to see if anything looks like it could be the property you need.
|
|
|
|
|
You need to get handle of Word you can use of FindWindow and then you can use of SetWindowText.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
I had found many samples in socket programming. But all it deal with
simple text transfer between sockets. But I have to send CStringArray from server
to client. Anybody can help me?
Thanks in Advance
|
|
|
|
|
In the socket layer everything is considered as a stream of bytes.
Whatever you want to send or receive through sockets has to be converted to a stream of bytes.
Socket do not understand objects, don't differentiate between ASCII, UNICODE, BINARY etc.
«_Superman_»
|
|
|
|
|
|
It looks like you need more help on dealing with CStringArray s than with sockets.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello,
I am new to this forum so please point me in the right direction if I am posting incorrectly.
I have an application that uses Video For Windows for capturing Webcam images. I have only found two ways to get to the image. One is to save a DIB to a file and the other is to save a DIB to the clipboard. Saving to the clipboard seems to work ok. I was able to test by pasting it in MS Paint.
Below are the essential lines of source. I have removed the error checking for clarity. I have verified that hDIB is nonzero. I have been reading for way too many hours and not getting it.
Tom Hubin
thubin@earthlink.net
capGrabFrame ( hwndVideo ) ; // snapshot one frame
capEditCopy ( hwndVideo ) ; // save DIB to clipboard
OpenClipboard(NULL) ; // open the clipboard
HANDLE hDIB = GetClipboardData(CF_DIB) ; // get handle to DIB
// todo: fetch DIB from clipboard
CloseClipboard() ; // finished with clipboard
// todo: convert DIB to 8 bit grayscale
|
|
|
|
|
I can think of a couple of posting errors (neither shooting offences!) - it's unusual to post your email, as replies to your posting get sent to you.
And secondly, what is your actual question?
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Does this article [^] help?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
The article should help but I have not yet gotten it working. However, I have learned a bit more about capGrabFrame and the capture window. So, let me try a different question.
I want to grab a 640x480 camera image and display it as 320x240 while keeping the 640x480 bitmap for image processing.
I would prefer not to use the clipboard since it is possible for some other application to alter the clipboard before I read it. Am I wrong about that assumption?
I just found capPreviewScale(hwnd,TRUE) which setup the window to automatically scale the image to fill the window.
So my only question just now is how to get to the captured bitmap.
Any suggestions on how to fetch a 640x480 capture window bitmap for image analysis without using the clipboard?
Tom Hubin
modified on Monday, February 16, 2009 7:23 PM
|
|
|
|
|
Checkbox transparency is failing giving black color on the background when my project is in UNICODE, but in NONUNICODE version it giving tranparency.
Some where i read it because of InitiCOmmonCOntrols(), how can i reslove it?
|
|
|
|
|
64 bit version of Activex control MSchart is avaliable or not?.Plz reply if anybody knows.
Thanks & Regards
VIJITH VIJAYAN
|
|
|
|
|
As an alternative (I have no idea if a 64 bits version is available), you can have a look at my sig. I developped a charting control and it could maybe be a replacement for the MSChart.
|
|
|
|
|
Is it existing in your system? (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSGraph.Chart)
If it's there you can surely use
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
hi,
i am connecting the server PC. and running some long duration application. but it get disconnect if PC is idle for more than 2 minutes. i have to write some script so that mouse get click after every 1 minute.
waiting for any suggestion, help or any example.
Thanks
"We can't solve problems by using the same kind of thinking we used when we created them"
|
|
|
|
|
Check out the SendInput Windows API.
«_Superman_»
|
|
|
|
|
Could you plz elaborate it more??
"We can't solve problems by using the same kind of thinking we used when we created them"
|
|
|
|
|
Create an application with a timer whose duration is 1 Minute.
In the timer routine, call SendInput with a left button down message.
«_Superman_»
|
|
|
|
|
Mmmm - that really isn't safe, randomly clicking the mouse every minute.
What's the root cause of the disconnection?
|
|
|
|
|
actually it needs some hardware interrupt. if i click any where on remote EM screen or higlight the remote EM window , it remains active session otherwise connection gets lost.
can i do like this, just to highlight that window, by command prompt coding.. etc
"We can't solve problems by using the same kind of thinking we used when we created them"
|
|
|
|
|
- Can you define what you mean by 'connection'
- What does 'EM' mean?
|
|
|
|
|
ok, i am not making you understand...
..once more...
i am connecting server remotely. and running a long duration application on it...now from my local pc, if i don't highlight or run any hardware interrupt on that remote pc, session get disabled. so i want to run such a script, so that..i can highlight that remote PC window after every 1 minute....
"We can't solve problems by using the same kind of thinking we used when we created them"
|
|
|
|
|
I'd try something like getting the window handle with FindWindow and then activating the window every minute.
|
|
|
|