|
Does [this] article help?
|
|
|
|
|
Yup it helped.
But actually what i did was to resize the dialog boxes after all the splitter controls were created.
|
|
|
|
|
Hi all,
i want to know how can i save my CTreeCtrl Structure in a file ,and again load same a previous from reading the save file.
thanks.
|
|
|
|
|
See my answer to your other question. Alternatively you could learn about the CFile class and roll your own.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Again, once you have grasped the MFC serialization fundamentals (please see the link to the documentation I provided in the below thread), you'll find yourself how to serialize the CTreeCtrl object.
Veni, vidi, vici.
|
|
|
|
|
Why file? Thats so Windows 3.11's win.ini
Do it in the registry.
But here you go.
|
|
|
|
|
Actually serialization has (almost) nothing to do with .ini files and it still a well-alive technique (one may argue that .ini files too are still used).
Veni, vidi, vici.
|
|
|
|
|
Again you are always right.
The Wiki page states:
Serialization is the process of converting a data structure or object state into a format that can be stored (for example, in a file or memory buffer, or transmitted across a network connection link) and "resurrected" later in the same or another computer environment.
http://en.wikipedia.org/wiki/Serialization[^]
The INI file format is an informal standard for configuration files for some platforms or software. INI files are simple text files with a basic structure composed of "sections" and "properties".
http://en.wikipedia.org/wiki/INI_file[^]
|
|
|
|
|
TopCoder23 wrote: Again you are always right.
May I forward your sentence to Mrs 'The Wife'?
Veni, vidi, vici.
|
|
|
|
|
thanks its done from ur help...
|
|
|
|
|
|
Hi all,
please guide me or help me to use serialization in my dialog based application.
thanks.
|
|
|
|
|
You have been a member here long enough to know that questions like this can be researched quite easily by using Google and/or MSDN. For MSDN you can go directly to the CArchive class and learn how to use that.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
There is nothing special in using serialization in a dialog based appication. You might start reading the documentation[^] in order to implement it.
Veni, vidi, vici.
|
|
|
|
|
|
|
|
Hi,
I have a Worker thread started in my main thread CWinAPP
and I am trying to do a SendMessage to a CDIalog
seems I can only do a Send/PostMessage to the CMainFrame Main Window
can someone corrabrate or dispute this
and if so is there a way to get a Message to the CDialog
thanks
|
|
|
|
|
What kind of communication you want to make with the dialog?
Is that dialog is alive when you send the message?
Note that the Post message will not block your thread, and sendmessage will.
|
|
|
|
|
The Thread is Created in the CWinApp::Initinstance
seems like either Send/PostMessage always references the MainWinow CMainFrame
I keep on getting CInvalidArg exception because my WIndow Handle is the CDialog
|
|
|
|
|
Before trying to use threads to communicate with the GUI I strongly suggest you reading some Newcomer's articles about. You may start, for instance with "Using Worker Threads"[^].
Veni, vidi, vici.
|
|
|
|
|
Please answer :
- Whereby does the secondory thread know the dialog ?
- When will the first message be sent ?
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
I save a CWnd * or Cialog * pointer in a global object on the heap
The thread retervies that pointer
However it seems that the Send/PostMessage can only send messages to the CMainFrame
|
|
|
|
|
Do you have such an "if" statement ? :
{
HWND hDlg = g_pcDialog->GetSafeHwnd();
if (hDlg) {
::SendMessage(hDlg, WM_COMMAND, IDOK, 0);
}
}
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
modified 30-Jul-12 8:48am.
|
|
|
|
|
ForNow wrote:
However it seems that the Send/PostMessage can only send messages to the CMainFrame
That's not true... you can post messages to any HWND[^] (which is the appropriate method versus saving a CWnd or CDialog). In another words, you can send messages to anything that has a window associated with it (not the only way, but it's a good generic statement), which sort of leads to a common way of messaging to classes that don't have other framework characteristics, make an invisible window for them that others can use as messaging targets.
|
|
|
|