|
Are you using a dialog from resource? If set style as child and Uncheck the System Menu check box in Dialog Property. Also you have to launch it by using Create API.
- NS -
|
|
|
|
|
F.Smadi wrote: How Can I Make Achild Window In Win32 .
Any window with a style of WS_CHILD is a child window. What matters is the parent window.
F.Smadi wrote: I Need The Child Window With Out Close button , i,e in the midddle of the parent window
To center a window use CenterWindow(...)
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
How Can I Make Dual Window With OpenGl .
One for Display 3ds files and the second to display text .
|
|
|
|
|
Can anyone point me towards any examples of custom controls that are derived from CDialog? I've been searching for a while, and just can't find everything useful (just controls derived from CWnd, which doesn't seem to work properly for me - my dialog seems to just fail DoModal when my control is placed)
Thanks
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
benjymous wrote: Can anyone point me towards any examples of custom controls that are derived from CDialog?
You cannot make your custom control inherit from a CDialog (as far as I know)
benjymous wrote: (just controls derived from CWnd, which doesn't seem to work properly for me - my dialog seems to just fail DoModal when my control is placed)
Instead of looking for crazy replacement solutions, why don't you simply correct the problem ? What is the problem exactly with your control and your dialog ? What do you mean by fail DoModal ? The function is exited immediately ?
Can you provide more information about your custom control: do you register it (with RegisterClass) ? If yes, are you sure the name you put in the resource editor (for the class property of the control) is the same than the one you used ?
-- modified at 7:13 Wednesday 10th May, 2006
There is a tutorial here[^] that explains how to use custom controls
|
|
|
|
|
I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following:
- display 'Please wait..' in rich editor
- do some processing
- display 'Done' in rich editor.
- exit.
Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited.
How can I force the rich editor to refresh immediately?
|
|
|
|
|
Do the processing in a separate thread. That will keep the dialog "alive" during the processing.
|
|
|
|
|
Is there a simple way besides having a thread?
|
|
|
|
|
Sorry for the late answer.
Yes, you can have your own message pump function and make sure you call it every once in a while during the lenghty processing.
-- modified at 6:00 Friday 12th May, 2006
|
|
|
|
|
after you write the "please wait" message, try calling RedrawWindow() on the rich edit object to force an immediate repaint. Then continue with the processing.
If pRichEdit is a pointer to your rich edit object, then you would call pRichEdit->RedrawWindow().
Regards,
Dan
Remember kids, we're trained professionals. Don't try this at home!
|
|
|
|
|
|
I have an application with several rich edit views, and one of them is used as a running log. When two or more additional rich edit views are opened, the log slows right down; the slowdown happens in the view rather than in the code generating the log.
All of the rich edit views in the application use SetSelectionCharFormat() to set character formatting; if I comment out the calls in the log, which are to colour text and underline links, it runs at full speed.
Should I:
- Optimise the calls to SetSelectionCharFormat() to remove calls that repeat the existing format or where no text is output using them?
- Use RTF streaming instead of SetSelectionCharFormat?
- Buffer the log instead of displaying it continuously?
- Abandon rich edit views for another technique altogether?
|
|
|
|
|
I got some trouble with a mdi frame derived from Ctreeview, i need update my treeview data (insert or setitem several items very often ~100ms) and there is a blinking effect. When i use a CListView class to display my data i don't have such problem... Is it possible to do something to prevent my view from blinking my optimizing something? Thanks in advance. If someone needs more precisions please ask. Bye
|
|
|
|
|
|
It's is already done but it didn't do anything...
|
|
|
|
|
You can also try making sure not to remove items and then add them back, or to add and then remove items.
|
|
|
|
|
Could you explain a little bit more. In my case i don't remove anything i just and or update items every 100ms...
Here is my code (may be it can help)
OnTimer()
{
GetTreeCtrl().SetRedraw(FALSE);
while (something to add or update)
{
//Add Trace item in the ListCtrl/Treeview
AddOrUpdate (SetItem or InsertItem)
}
//Allow to draw all modified lines in the ListCtrl
GetTreeCtrl().SetRedraw(TRUE);
}
|
|
|
|
|
Maybe you should call SetRedraw(TRUE) only when there is a change in the tree.
Something like this:
OnTimer()
{
BOOL bChanged = FALSE;
GetTreeCtrl().SetRedraw(FALSE);
while (something to add or update)
{
bChanged = TRUE;
//Add Trace item in the ListCtrl/Treeview
AddOrUpdate (SetItem or InsertItem)
}
//Allow to draw all modified lines in the ListCtrl
GetTreeCtrl().SetRedraw(bChanged );
}
-- modified at 7:49 Wednesday 10th May, 2006
|
|
|
|
|
Unfortunatelly... I really think it comes from InsertItem/SetItem itself... it seems it erase the item and redraw item... and that for every items it's a christmas tree.
|
|
|
|
|
At one time I was creating and deleting tree items in a tree and it flickered. Are you doing anything similar? Maybe you are changing node names or similarly visible attributes.
|
|
|
|
|
Yes I change visible attribute but i do not erase anything. The blinking is quite special because even if my timer is 100ms the blinking period is not 100ms... it is almost 500ms... very strange, most of time treeview items remains and are not blinking even if item name changed! and others time it seems to erase item and redraw it => so blinking effect...
|
|
|
|
|
myTreeView.BeginUpdate();
// do my refresh stuff
myTreeView.EndUpdate();
|
|
|
|
|
Hi,
I have several applications that have to use a set of same constant values.
Those constant values are defined in several CPP files in the
following way:
const char* name = "text";
I want to compile those CPP files to some software component
(maybe lib or dll) in order to use it in runtime in my application.
I considered to build those CPP files to DLL and then to load it explicitly
(by LoadLibrary() and GetProcAddress()).
The problem is that this way requires redefinition of all the constants defined in
CPP files in my executable and I would like to avoid the redefinition.
Is there any other way to compile those CPP files to software component in a way that my
applications will load it in the run time and there will be no need to redefine the constants
and no need to compile or link my applications each time the CPP files are changed?
Thanks in advance,
Avi
|
|
|
|
|
A solution with configuration files is not good ? It is just a suggestion, maybe it's not adapted to your problem.
mush hashor wrote: Is there any other way to compile those CPP files to software component in a way that my
applications will load it in the run time and there will be no need to redefine the constants
and no need to compile or link my applications each time the CPP files are changed?
If you use GetProcAddress you don't need to include files. You just need to typedef the prototypes of the functions that you need to load.
|
|
|
|
|
Suppose in WSAAsyncSelect model.
Peer A send "1234" to peer B. Just when "12" is arrived at Peer B, the network is disconnected. Will peer B be notified with FD_READ and receive "12"? What is the case if the receiving buffer is just full after receiving "12"?
|
|
|
|