|
|
I am designing a MDI program. there are many MDI child window. How can I know the user change the activated status from one MDI child window to another? Why do I want to do this? Because when one MDI child window is deactivated, I have to save its data to files.
Thanks in advance.
|
|
|
|
|
If you are using MFC CViews you will get OnActivateView() and OnKillFocus(). If you are using the Windows API you will get WM_KILLFOCUS.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
How to transform 16-bit value to corresponding symbol UNICODE ?
Obvious transformation:
TCHAR ch = (TCHAR) nValue;
will transform nValue to ANSI .
Best regards,
Eugene Pustovoyt
|
|
|
|
|
For TCHAR to be a Unicode character, you need to #define _UNICODE before doing #include <tchar.h> . Alternatively, try wchar_t ch = (wchar_t)nValue; - wchar_t is always a 16-bit character.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Not sure what you're asking. You have a 16-bit unicode value in a WORD? Then just do:
WCHAR wch = (WCHAR) nValue;
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Not. I have a word array which I want print as unicode symbols.
for (WORD i = 0; i <= 0xFFFF; i++)
{
pDC->TextOut(LOBYTE(i)*16, HIBYTE(i)*16, (TCHAR)i);
}
This code always print the ANSI code ignored the hibyte. Why?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I am using appendchunk to put images in my database (blobs). Only problemis it 'appends' as advertised. I want to clear the db and overwrite it when I run the program again so an AddChunk would be good. but I dont see one. ALso, I thought maybe some parameter in the call to appendchunk would tell it to overwrite (despite its name) but I didnt fiind that either...
Ideas?
ns
|
|
|
|
|
Have you tried passing in NULL? The documentation says that should erase what's there.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
Hi,
Can anyone put me on the right road to sending messages over the msn network, either by using the appropriate protocol or manipulating the client?
Best of all, does anyone know of any APIs that have been developed for the purpose?
Cheers,
James
|
|
|
|
|
Does this call affect the thread execution (like terminating it)? It is because I will never Wait...() on it.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
No, in fact if you don't need the return value, it is good to close the handle. Good!
VOTD: "The work of God is this: to believe in the one he has sent." - John 6:29(NIV)
|
|
|
|
|
No problem at all.
FYI: It's fairly common to get a thread handle via OpenThread(), instead of CreateThread.
Imagine if you opened a thread you didn't create. How would you close the handle if it would shutdown the thread ?
Concussus surgo.
When struck I rise.
|
|
|
|
|
I have a ListView and need to determine when a single click or double click is done. I tried searching for any clue to resolve this but can't. I know that when you will always get single click before double click. I even tried to use WM_LButtonDown, but it does not register when you are in the listview or the listview has the focus. Can anyone help me?
Thank-you
Sincerely,
RAH
|
|
|
|
|
Well, your app gets WM_LBUTTONDOWN before WM_LBUTTONDBLCLK. The hard part is to guess if this first WM_LBUTTONDOWN is just a prelude to double-click. If singleclick/dblclick actions are not compatible, you'll have to set the timer for GetDoubleClickTime() msecs. If double click doesn't come before timer message, it was plain single click.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Listview control already supported that. It sends NM_DBLCLK and NM_CLICK notification but
you need to intercept WM_NOTIFY message. Don't forget to call InitCommonControlsEx()!
VOTD: "The work of God is this: to believe in the one he has sent." - John 6:29(NIV)
|
|
|
|
|
try NM_DBLCLK
Renjith-CPian.
|
|
|
|
|
Hi !
I use a List control inside a frame window to view a list of objects. The problem is that after I handle a double click event in the list control, the parent window who started it all jumps in.
To explain:
MainFrame = Parent window
ErrFrame + ErrList = child window <--- Click inside will work but MainFrame jums in......
|
|
|
|
|
Shay Harel wrote:
the parent window who started it all jumps in.
What do you mean by 'jump in'?
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Lets say I have the main application runnig and one of the options in the menu was to run another list view. If I click on this list view which is in another CFrameWnd it will do whatever it does but then the main window will be the top most window, which it shouldn't, the top most window sholud be the second one.
Thank you
|
|
|
|
|
wut u men by jump-in..??
minimized/disappeard...?????
Renjith-CPian.
|
|
|
|
|
Lets say I have the main application runnig and one of the options in the menu was to run another list view. If I click on this list view which is in another CFrameWnd it will do whatever it does but then the main window will be the top most window, which it shouldn't, the top most window sholud be the second one.
Thank you
|
|
|
|
|
I have an MDI derived from CFormView.
In CMyFormView I have controls and stuff. On this form I want a button, [OnNextButton()], to initiate a new form so that I can graph the user inputs (Data) on this second form.
Please Help
Kash
|
|
|
|
|
Assuming that pDoc is CYourDoc pointer and pTemplate points to CMultiDocTemplate object, you can open new window like this:
CFrameWnd* pNewFrame = pTemplate->CreateNewFrame(pDoc, NULL);
pNewFrame->InitialUpdateFrame(pDoc, TRUE);
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
I already created a new class CForm2 after inserting a new IDD_FORMVIEW using the Insert | Resource menu. How to invoke this window?
Also, in the code you offered, it wont recognise my pointer to CMultiDocTemplate. Does the code go into the OnButtonClick() function?
Kash
|
|
|
|