|
how to create explorer toolbar using dll in MFC?
as
|
|
|
|
|
how to create toolbar using MFC?
as
|
|
|
|
|
You will be asked if the toolbar have to look like IE when creating your MFC Project with teh wizard (there is a checkbox to check).
~RaGE();
|
|
|
|
|
So, does anyone have any ideas on how to remedy this...?
My static text reflects the progress of a lengthy process; it indicates of many percent of the operation that has been completed.
How can I make sure only the the new string gets "painted" and not the entire control (with bakground and everything)...? Disabling refreshing the background? How do I do that?
Thx a whole bunch,
/T
|
|
|
|
|
Use OnEraseBkgnd and return TRUE to avoid painting the bkgnd.
|
|
|
|
|
Ok, thx!
But having "made" the control in the resource editor, have do I "Use OnEraseBkgnd"? Don't I have to derive a new class of the static control and then override the OnEraseBkgnd?
/T
|
|
|
|
|
yes.
-c
Garbage collection, making life better - for weenies!
|
|
|
|
|
Might be easier to simply paint the item less frequently.
After all no *HUMAN* could react to any updates fast
enough to cause a flicker problem, so why update that
frequently?
I'll often compute some update progress value and then
update the display only if it changes by some amount or
if the last update was some time before...
|
|
|
|
|
Is here someone using installshield, please ?
Is the InstallShield for Visual C++ 6 shipped with VC6 only some trial version, or i can use it to create commercial application ?
In readme is written :
InstallShield for Microsoft Visual C++ 6 is a powerful 32-bit setup creation application, but it is a subset of the full features and power available in InstallShield5.1 Professional Edition
Which features are missing ?
Do you use some another free/commercial installators ?
Thanks
rrrado
|
|
|
|
|
|
thanks, but it des not support scripting, which is neccesary
rrrado
|
|
|
|
|
What about NSIS from Nullsoft?
http://www.nullsoft.com/free/nsis/
allows scripting and is free. Used for Winamp and many other applications.
And no, this is NO advertisement
modified 12-Sep-18 21:01pm.
|
|
|
|
|
thanks for suggestion
rrrado
|
|
|
|
|
rrrado wrote:
thanks, but it des not support scripting, which is neccesary
It does! And it absolutely rocks! Try it out! Just seach for Inno Setup. There is a really easy to install extension that provide scripting to it.
/Tommy
|
|
|
|
|
First a brief explanation...
I am using multiple views with one document in a MDI application in order to view different datasets. There is no files involved I'm using CRecordSet to pull data directly out of an Access database.
I investigated two options of switching views. The first one was creating an extra document template using the same document but attaching it to a different view. When the user choose to view the data I would get the apropriate document Template and create a new frame. The problem with this approach is that I had to create a new document first in order to get an active Child Frame and Document and this created an empty view on the screen that would still hang around looking messy after I closed my new frame. I could simply hide this view but it seems like a messy way of doing things.
The second approach was to create a switch view function in my Child Frame class. Here I get the active view, store a pointer to it, create a new view, show it and hide the old view. This works fine but now when I choose to print from my ChildFrame Menu the main Window printing function gets called. Why is this happening? Is there a better way of switching the views? Is there light at the end of the tunnel?
Despite being the most comical appearing of all the Martial arts the monkey form should not be laughed at because it is truly one of the world's most deadly defense systems
|
|
|
|
|
If you have two views attached to your document object, the active view will receive and act on the ID_FILE_PRINT command when it is received. If you need the other view to handle the printing action which the active view has just recievd, you need to override teh standard CView OnFilePrint() function for your active view and call the same handler in your other view. You can do this by using class wizard to map the ID_FILE_PRINT command for the view.
In this procedure you can get the document pointer and from them iterate through the documents views to find the other view, and then call its OnFilePrint().
CMyDoc *pDoc = GetDocument() ;
POSITION pos = pDoc->GetFirstViewPosition() ;
while (pos)
{
CView *pView = pDoc->GetNextView(pos) ;
CMyOtherView *pOView = static_cast<CMyOtherView*>(pView) ;
if (pOView != NULL)
{
pOView->OnFilePrint() ;
break ;
}
}
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
It works
The way is a (void)
Used but never filled
|
|
|
|
|
Hello,
when I change the window size from the top or the left edges, I get flickering in the client, my program opposed to the usual behaviour want the client clipped from where the user resize the window and not always from the bottom and right. I couldn't find where windows draws the DC. if anyone could understand my poor english and also have any idea how to solve this problem, I'll appriciate it.
Thanks,
BishGada.;)
|
|
|
|
|
try overriding the WM_ERASEBKGND message with an empty function.
The default operation of the framework is to clear the window with its background colour when this message is recieved, which is probably what's causing the nasty flickering
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
thanks, but thats not that kind of flickering, I already override the erase bg the problem is that windows scroll the DC and thats what I want to prevent.
thanks anyway.
BishGada.
|
|
|
|
|
hi,
what method do you use to terminate a thread?
i am in a situation that after few thousands of restart a thread? it failed for me to create thread for me with AfxBeginThread().
i used TerminateThread() to terminate thread from the main program, in msdn, it is not a good method to terminate a thread.
i guess it leads to the problem that i can't create thread when restart.
do you have any good method to terminate thread?
thanks,
jim
|
|
|
|
|
You can usually end your thread from within the thread with Afxenthread(); If you want to do that remotedely from outside the thread, just use an event to tell your thread to end.
~RaGE();
|
|
|
|
|
hi,
i found that the thread would not terminate immediately after call AfxEndThread(). since i used TerminateThread() to terminate another thread at the same time, so i can observe such difference.
is it normal?
thanks,
jim
|
|
|
|
|
|
There are couple of ways to terminate thread safely based on the problem
here is the event approach,
- CreateEvent() (named event to use across process'es)
- CreateThread (or AfxBEginThread) and pass event as Thread Param
- Keep listening to Event Signaling at application atomic times (WaitForSingleObject).
- when Event is signaled or job is done, just return (use AfxEndThread() with AfxBeginThread() - MFC way)
From main/any thread signal the event, when u want to stop the thread safely.
To brutally kill the thread use: TerminateThread()
Refer to samples in codeproject.com OR codeguru.com.
Hth,
Ramu
|
|
|
|