|
The Worker Thread in my MFC SDI Application does some heavy job.
The user can stop in between by pressing the <stop> toolbar button or Tools menu -> Stop.
To enable the Stop toolbar button before the control enters the worker thread, i have used the following line of code:
pApp->bDiskReadProcessStarted = TRUE;
pframe->pToolBar->SendMessage(TB_ENABLEBUTTON,ID_TOOLS_STOPCURRENTPROCESS,(LPARAM)MAKELONG(TRUE,0));
& then is the code for the creation of the Worker Thread:
pApp->pWorkerThread = AfxBeginThread(MaskingFiles_WorkerThread, (void*)pApp->MFC_Obj);
BUT as a result of the above code the Stop button is enabled only after the worker thread has completed. where as i wanted it to be enables before the start of worker thread.
code in the OnUpdateUI for Stop button:
void CMainFrame::OnUpdateToolsStopcurrentprocess(CCmdUI* pCmdUI)
{
CStellarPhoenixApp *pApp = (CStellarPhoenixApp*)AfxGetApp();
if(pApp->bDiskReadProcessStarted)
{
pCmdUI->Enable(TRUE);
}
else
pCmdUI->Enable(FALSE);
}
I donot understand y this is happening.
Waiting for suggestions
dp_76
|
|
|
|
|
Hi all,
I'm finish to write a software to visualize very big files showing thats as an image that could be bigger than 1000x1000000 pxl (so very very long images).
I choosed to don't load the all the file into RAM (required from 100MB to more than 1GB), but load only some rows and colums building a sort of undersampled image: in this way I need only 2/5MB of RAM memory. And at the moment the visualizator is very fast.
Now I'm thinking that a future version of that software could show (in 3D) with OpenGL more files showing thats one on the other, like some sheets of paper that surely you have behind your eyes on your desk.
I'm a beginner in OpenGL so I'm asking myself if, with this big files, it is possible or not to do that in an efficient way without lose a lot of CPU-speed!
Can you tell me some good tips/news? Some good articles?
Thanks in advantage, Matteo.
|
|
|
|
|
Matteo_78 wrote: Some good articles?
Some good articles[^]
Rajesh R. Subramanian
Akruti Software,
Bombay, India.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
I want to construct an xp style radio button and checkbox
in vc++
I mean in case of check boxes the checked state should be
green and in case of radio buttons the if the radio button is enabled the enabled state is described by putting color dot into the radio button.
If somebody sends me the code project , I am in urgent need of it.
My mail id is pankajgarg10@rediffmail.com ,
pankajgarg10@yahoo.co.in
Thanks and Regards
|
|
|
|
|
will you stop posting your email on the forum please ?
it's enough !!
if you want a personal answer, without anybody seeing how to solve your problem, find the one who will give you what you want, but don't provide email addresses or web URL on your posts...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote: will you stop posting your email on the forum please ?
I agree with toxcct. This is not one place where you could just post your e-mail address and ppl around here will mail you the solution. One should understand that people here help because it is not that they have no other job or this is their duty . It's that "They love helping."
Rajesh R. Subramanian
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
-- modified at 5:03 Tuesday 29th November, 2005
|
|
|
|
|
arg...
what's that enormous sig ?!
nice reflection though
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 5:16 Tuesday 29th November, 2005
|
|
|
|
|
I think, as far as I could tell,
its a receipt for apple pie
codito ergo sum
|
|
|
|
|
Hi..
Try using manifest file
|
|
|
|
|
Hello,
I am interested how I can monitor the printer activity on a workstation that does not have a printer connected. Is there a way that I can monitor a local queue before the print job is sent to server? If so, can anyone point me a good article? (c++)
Regards,
Dan.
|
|
|
|
|
I want to perform the mathematical operation Like
16536356523426235462353525473264534563 * 28346524346765566856556557575557837467
Now I want to get the result in 32 digits with the required exponential
If somebody sends the code project , I shall be highly obliged
My mail id is Pankajgarg10@rediffmail.com
Thanks and Regards
|
|
|
|
|
Hallo,
I have been working for a long time with Windows 2000 with SP4 as my operating system. Now I have moved to Windows XP with SP2. Unfortunately that had a nasty side effect I cannot yet understand:
When I do run a debug version of my application outside the debugger and an exception occurs, Windows 2000 notifed me about it and I could choose "Retry" to debug the application. The IDE came up and I got every information about the stack and its variables.
Under Windows XP the "Retry" button was replaced by "Debug", but when I use it the IDE comes up and I do not get any useful stack information, just Assembler code that is not very useful for me.
Finally I found out that this behaviour is connected to the SetUnhandledExceptionFilter() function. Without it even Windows XP will show me the stack information. But I really need my custom exception filter, so I cannot leave the application without it forever. Does anyone know how to get the full stack information under Windows XP?
Thanks,
StHubi
----------
"Have no fear, the saint is here!"
-- modified at 3:35 Tuesday 29th November, 2005
|
|
|
|
|
HI.
When i use CListCtrl in MFC and set the width of column is larger than 32767, the area of exceed couldn't display.
How can I get a OnDrawItem message in CListCtrl if the width of column is larger than 32767 unit.
Could someone can resolve it ?
thanks.
|
|
|
|
|
The list control is probobly storing the column width as an int , 32767 being the maximum value for an int theres going to be no easy way around it. Might seem like a stupid question but why the hell whould you want a column that big for anyways...?
Gavin Taylor
w: http://www.gavintaylor.co.uk
-- modified at 1:31 Tuesday 29th November, 2005
|
|
|
|
|
Gavin Taylor wrote: why the hell whould you want a column that big for anyways...?
LOL Gavin Taylor... I too do not understand, Why a column that big? Funny.
Rajesh R. Subramanian,
Akruti Software,
Bombay, India.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
|
Oh, Maybe i should say the it's a List that had many column, and the summary width of columns are over 32767, ex. 660 columns * 50 width/column. It' possible, right!
I know the problem due to limit of the 16 bit, but have another way i can resolve???
|
|
|
|
|
660 columns . Write your own List Control?
Seriously, thats a HELL OF A LOT of columns to be handling all at once, if your dealing with that much data in one go i'd be thinking of designing a better UI, maybe a collapsible grid so you only show relivent information in groups or something... Just a suggestion...
Gavin Taylor
w: http://www.gavintaylor.co.uk
|
|
|
|
|
Hello
I am using Tree Control in MFC in which some directories and files are papulated. Now i want to implement the function of drag and drop to drop files from one directory to other. Can anyone please tell me how can i implement drag and drop function. I know how to change paths of files, i just want to ask how to implement drag and drop.
We Believe in Excellence
|
|
|
|
|
Aqueel wrote: I know how to change paths of files, i just want to ask how to implement drag and drop.
If you just need to know how to implement drag and drop, Microsoft has given you an example just for that. You can find the article in the following link.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q148738[^]
I Strongly suggest you to go through David Fleming's article on Drag and drop between CListCtrl also. You may find the same in the following link.
http://www.codeproject.com/listctrl/dragtest.asp[^]
Regards,
Rajesh R. Subramanian
Akruti Software,
Bombay, India.
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
What is transparent bitmap?
Is there any article on this subject?
NSS
|
|
|
|
|
I guess it's a bitmap that has a transparent area. If you're not supporting W95, there's a TransparentBlt method. This assumes you have one colour that is transparent. If you want to make a range of colours transparent, you need to use GDI+ ( check my articles for info ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How to load some icons from a file into a listcontrol? I want to load some icons from a file into a list control,but I'm not able to do it ?help me.
|
|
|
|
|
If we're talking about the common control version of List Control (CListCtrl in MFC) it's pretty easy.
The list control just uses an imagelist object to retrieve it's images from, all you need to do is create an CImageList object and bind it to the list control, then all you've got to do is specify the index for the image you want a listitem to have.
You'll need to add something like CImageList m_imageList; into your class definition for the parent window, then in your initialisation routine (OnInitDialog or whatever) you'll need something like:
CListCtrl pListCtrl = NULL;<br />
CWinApp * pApp = NULL;<br />
<br />
pApp = AfxGetApp( );<br />
if( pApp == NULL ) { _ASSERT( FALSE ); return FALSE; }<br />
<br />
pListCtrl = ( CListCtrl * ) GetDlgItem( IDL_LIST );<br />
if( pListCtrl == NULL ) { _ASSERT( FALSE ); return FALSE; }<br />
<br />
if( m_imageList.Create(32, 32, ILC_COLOR8, 0, 4) )<br />
pList->SetImageList( & m_pImageList, LVSIL_NORMAL);<br />
finally, when adding your items into the list control, you'll need something like:
<br />
HICON hIcon = NULL;<br />
int idxIcon = 0;<br />
<br />
hIcon = pApp->LoadIcon( MAKEINTRESOURCE( IDI_INDEXFORICON ) );<br />
idxIcon = m_imageList.Add( hIcon );<br />
pList->InsertItem( 0, TEXT( "items description" ), idxIcon );<br />
I think the code is correct (the theory is at least) as i dont have a copy of Visual Studio to hand to try it and notepad ain't quite the same
Gavin Taylor
w: http://www.gavintaylor.co.uk
|
|
|
|
|
Thank you for your warmest help,but the icon is still not able to display?
could you help me ?
|
|
|
|