So each time the timer fires, you are updating a progress bar, correct? Is that progress bar owned by the same thread that is running the timer? If so, it may be that the paint messages are not being processed. However, without seeing relevant code, I can't say for sure.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
Here is an OnCustomdraw() I copied from existing code and modified to do what you want it to do (hopefully). It is untested, so I don't actually know if it will work correctly (or even compile), but go ahead and try it out.
void CYourListCtrl::OnCustomdraw(NMHDR* pNMHDR, LRESULT* pResult)
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
// Take the default processing unless we set this to something else below.
*pResult = 0;
// First thing - check the draw stage. If it's the control's prepaint
// stage, then tell Windows we want messages for every item.
if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
*pResult = CDRF_NOTIFYITEMDRAW;
elseif ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
// This is the prepaint stage for an item. Here's where we set the
// item's text color. Our return value will tell Windows to draw the
// item itself, but it will use the new color we set here.
// Do not apply special behavior if the list control is disabled.
int nItem = (int)pLVCD->nmcd.dwItemSpec;
// Always draw the selected item with the highlight color.
if (GetItemState(nItem, LVIS_SELECTED | LVIS_FOCUSED) != 0)
// Store the color back in the NMLVCUSTOMDRAW struct.
pLVCD->clrText = GetSysColor(COLOR_HIGHLIGHTTEXT);
pLVCD->clrTextBk = GetSysColor(COLOR_HIGHLIGHT);
// Tell Windows to paint the control itself.
*pResult = CDRF_DODEFAULT;
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
I have a paper size and the num of image to be print on page.
if one image print over the page its working fine
but how can I identify the size of new image to print on page if multiple num of image print over the page,
like: if 40*40 is image size its print on 40*40 paper finally if only one image print over 1 page, if 2 image print on the page the image size should be 20*20 each print perfectly on page and occupy the whole area of page.
and also tell me how to arrange the images in printing like left to right or top to bottom ,to occupy the whole paper area by providing num of images on page.
I want to know how to create manifest for my c++ private assemblies. What I have done now is keeping a static manifest file(as show below) and embed it into the dll. The down side of this approach is that I cannot update the version number in the manifest file. I want to update the version in the manifest file with the version of dll.
Please advice me if anyone knows some details on creating manifest for "private assembly"
I would want to write a small chat program allowing to communicate across the Net.
But I only found classic Winsock samples with 1 server/clients, where clients need an ip address to connect with the server.
Isn't it possible to have only clients (which would probably be also servers for others clients) ?
(if I just have 2 executables on 2 different PCs, I cannot know the ip of the other client exe)
i was implemented ICredentialProviderFilter in my custom credential provider it is switch user button not showing. ie: it is showing only my custom credential provider it is not showing my other credentials please help me anyone
Hi, I have a C file which contains a simple DbgPrint in DriverEntry but, when I build my project, I get 9 errors like C:\drvtest\src\testdriver.c : error CS2059: Syntax Error : ';'
C:\drvtest\src\testdriver.c : error CS2059: Syntax Error : 'type'
C:\drvtest\src\testdriver.c : error CS2059: Syntax Error : identifier DriverDispatch
Good job you cant build it because it will BSOD anyway.
You need to do this for starters in DriverEntry:
for (Index = 0 ; Index <= IRP_MJ_MAXIMUM_FUNCTION ; Index++)
DriverObject->MajorFunction[Index] = MyDispatch;
DriverObject->DriverExtension->AddDevice = 0; // non PnP so dont set this
DriverObject->DriverUnload = MyUnload;
Your MyDispatch actually needs to do something with the Irps, set Information to 0, the status block to success and return success.
If you use a DLL, that DLL is loaded into your WinRT process space and shares the same security context as the WinRT apps. In other words, you cannot 'escape the sandbox' via a DLL.
Unfortunately, I have no experience with programming WinRT, so I can not present you with a solution, only an answer as to why this will not work.
Last Visit: 31-Dec-99 18:00 Last Update: 29-Sep-16 11:44