|
void CMyList::OnPaint()
{
CPaintDC dc(this);
CMemDC memDC(&dc);
DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0);
} Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks Ryan! Now list of files is drawn, but for example column headers are not visible till I click on them. I'm using Custom Draw feature, maybe it has something to do with it...
|
|
|
|
|
s_k wrote:
I'm using Custom Draw feature, maybe it has something to do with it...
Possibly, but I'd still expect it to work. I haven't done this with custom draw, so I don't really know. Try removing the custom draw, and then trying again. If it paints, then that's good, and you might just have to do without the custom draw. You might need to do full owner draw instead. If not, I'm sorry I can't help much more.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
You have to exclude the headers from the clipbox,
Try something like this...
CPaintDC dc(this);<br />
<br />
CRect headerRect;<br />
CRect clientRect;<br />
<br />
GetClientRect(&clientRect);<br />
GetDlgItem(0)->GetWindowRect(&headerRect);<br />
ScreenToClient(&headerRect);<br />
dc.ExcludeClipRect(&headerRect);<br />
<br />
CMemDC memDC(&dc);<br />
<br />
DefWindowProc(WM_PAINT, (WPARAM)memDC->m_hDC, (LPARAM)0);<br />
<br />
Arjan
|
|
|
|
|
Does CListCtrl::Scroll() not work?
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
maybe I post my question in a wrong way - I AM able to scroll the content of my ListView, I have vertical scrollbar there and pressing Key Down/Up keys also scroll the ListView. But in case when I have for example 10.000 files in ListView and I'm holding Page Key/Up or moving fastly with scroll bar, ListView "flashes", or how to say that...So I'm looking for some method with help of which I would make my ListView scroll without flashing/flickering...And in post there is link to one piece of software that does it greatly.
Best regards,
Standa.
|
|
|
|
|
Ok, I misunderstood your question.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
how can i put a flash interfacein my MFC Program????
|
|
|
|
|
10 Simple steps
1. Make a movie in flash that is one frame long, and all the other movie clips are in this one movie.
2. Add your buttons and controls in flash.
3. Using actionscript add a global variable for when each control is selected or moused over etc (Roll Over)
4. Add the ocx and header stuff to your MFC app
5. Include the swf file in your workspace
6. Use the res protocol to load the swf movie when needed
7. Start a timer.
8. When the timer fires have it poll the flash variable to see it's state.
9. Do the button actions intentions.
10. If all this works out Ok, to show your appreciation you can write a CP Article about how it's done.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
HMMDemo compiles but I get this error
In function cvGetMat():[......cvarray.cpp Line 2734]....
NULL pointer passed....
ErrMode=CV_ErrorModeLeaf
What should I do to correct this error?
(MSVC++ 6.0 sp5, windows xp home)
Later, JoeSox www.humanaiproject.org
"The worst fad has been these stupid little robots,
Graduate students are wasting 3 years of their lives
soldering and repairing robots, instead of making them smart.
It's really shocking." -Marvin Minsky.
|
|
|
|
|
Hi all!
I'm trying to execute:
_asm
{
hlt
}
and of course I am getting an error (since hlt is a privileged ASM instruction). I'd like to know how to get this working (I know software like CPUIdlePro does that, so there MUST be a way
Thanks in advance.
|
|
|
|
|
I believe Win2k and XP are already doing this. And the answer to your question is you have to write a device driver.
John
|
|
|
|
|
Hi all,
I am wondering how to read an XML feed from a website programatically?
If I am using a browser I just type in the corresponding info into the address bar and the results are returned as an XML file displayed in the browser.
How programatically can you query a website for its XML feed without opening the browser?
Thanks,
Steve
|
|
|
|
|
How about using WinInet
and stuff like CInternetSession, CHttpFile, CHttpConnection, depending on what you want todo their are several ways of doing this.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
|
It's simple if you're using the MS XML parser:
#import <msxml.dll>
MSXML::IXMLDOMDocumentPtr pDoc;
pDoc.CreateInstance ( __uuidof(MSXML::DOMDocument), NULL,
CLSCTX_INPROC_SERVER );
pDoc->async = VARIANT_FALSE;
pDoc->load ( "http://www.foo.com/path/to/file.xml" ); You'd need to add error handling, of course
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Thanks all very useful info.
Steve
|
|
|
|
|
Hi
Is there any method to view EXE flash macromedia file in a window in my application ? (like avi files)
Thanks very much
|
|
|
|
|
Yes and No, the projector type files are not really designed for this.
However you could include an exe as a resource to your project and then extract out from the PE the swf format, and run it in new ocx. Or even extract the swf at run time from a PE.
It would be easier to extract the swf files beforehand and then use them in your app, whether you include them internally or just load them.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
Thanks very much for your answer
But
is it possible to extract the swf format from the PE ?!?
And How to download the ocx of FLASH Macromedia ?
Thanks very much
|
|
|
|
|
bfadi wrote:
is it possible to extract the swf format from the PE ?!?
I have seen hacker type tools that remove the swf.
Unfortunately I can't find an example online at the moment.
bfadi wrote:
And How to download the ocx of FLASH Macromedia
Check to see you have swflash.ocx already on your PC, most have. Otherwise Macromedia are only to happy to provide it.
Note it is the same ocx that IE uses to run any Flash movie
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
Hi
Thanks very much. I found one program exe2swf
And it work fine.
I found 2 ocx of flash in my computer, on flash.ocx (version6) & swfflas.ocx(version 5)
BUT I get error when trying to insert it in a Dialog
I tried the add registred Active control, but it did not add anyting. Do you have any great idea ?
Thanks very much
|
|
|
|
|
I have always just added the ocx from the menu method as you appear to be doing with no problem
The only thing I can think of, is that maybe you created a Dialog MFC project and did not select ActiveX Support,
I tried it and used the "Shockwave Flash Control". Note: Shockwave and Flash are seperate things.
Regardz
Colin J Davies
* WARNING * This could be addictive The minion's version of "Catch "
It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
|
|
|
|
|
Hi,
I am working on an old set of code, where the main program is written in C. It uses a DLL which is statically linked to MFC. Now I want to put a CHTMLCtrl (defined in the DLL, act like a CHTMLVIEW) into the frame window of the C program so that I can view HTML inside the control.
How do I create such a MFC control defined in a DLL in my main C program? How does the message loop works?
Thanks.
--Michelle
|
|
|
|
|
Hi
While creating a owner-drawn menu I have found, that MFT_OWNERDRAW style does not apply to any item with identifier ID_FILE_MRU_FILE1. Here goes my code:
int nItemCount = GetMenuItemCount();
MENUITEMINFO mii;
ZeroMemory(&mii, sizeof(mii));
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_TYPE;
mii.fType = MFT_OWNERDRAW;
for (int i = 0; i < nItemCount; i++)
{
CMyMenu* pMenu = (CMyMenu*)GetSubMenu(i);
if (pMenu)
pMenu->MakeOwnerDrawn();
SetMenuItemInfo(m_hMenu, i, TRUE, &mii);
}
If I use ModifyMenu instead of SetMenuItemInfo, everything is OK, except clicking on items have no effect.
Any suggestions?
Best regards,
v0id
|
|
|
|