|
=[ Abin ]= wrote:
Maybe I need to install newer plateform sdk or something?
That would be a good idea
It is available with the files that come with VC6, but you need to #define _WIN32_WINNT (0x0500) or higher before including winuser.h .
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"
|
|
|
|
|
Operating System: Windows XP Language: VC++ 6.0
Does anyone know of a good method to scroll images into a window (similar to how PowerPoint scrolls slides into view during a PowerPoint presentation). In particular I'm trying to develop an application that:
1. Loads images from disk and stores them in memory.
2. Scrolls a previously loaded image onto a window (bottom to top) at a configurable speed, over the top of any image that is already there.
3. Keeps processor usage to a minimum
I've done some experimenting with GDI+ using Graphics::DrawImage() to redraw the image onto the screen a couple of pixels at a time but it sends the processor usage on my computer up to 100%.
Regards
Martin
|
|
|
|
|
I use GDI+ and use FillRectangle() with a TextureBrush - it's considerably quicker than using DrawImage() . I haven't looked at the processor usage, but I think it would be much less - it doesn't have to scale the image like DrawImage() does (unless you specifically tell it to).
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"
|
|
|
|
|
I might try that myself. Thanks for the tip.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
You're welcome
I can't remember how I found that out. I think I just experimented
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"
|
|
|
|
|
Is there priority when you set Background,
Foreground and Fog color?
I made Background & Fog the same color, but
I can't change the color of object drawn in the 3D space
When I change the color of background, this object color
changes as well. It wasn't problem before I insert this
fog function. Any Idea?
Thanks for help
Shinya
|
|
|
|
|
call glColor[X] before calling the glVertex[X] functions!
Don't try it, just do it!
|
|
|
|
|
Thank you very very much. I've searching for this answer.
It worked this time. But Do you know why?
Regards,
Shinya
|
|
|
|
|
Hi!
I write a image processing algorithm library in c++. Now i try to port it into a com dll server, in that way we can use it outside c/c++ environment. Then i can sell it to the developers of vb or c#.
But there is a problem, how can i protect it. Users of my client's application should not directly use it in their own development.
I read in msdn, and know activex control has a license engine (use lic file?). Is COM dll server the same as activex control (i really puzzled in this)?
Is there some method to protect it besides controlling document of library and some law warning?
Thanks!
|
|
|
|
|
ActiveX controls let you develop controls based on the Common Object Model (COM) that can be installed in dialog boxes or any ActiveX control container application. An ActiveX control is an COM-based object. Therefore the article that you read on the lic file should apply to your com server (is it, MFC ActiveX Controls: Licensing an ActiveX Control?).
In my opinion you could try to protect the dll by distributing one version for the application and another one for the developers.
To protect it you can have the initialize functions such as CoCreateInstance perform a license check before they return anything. The license key can be generated internally by the dll (i.e. have a function that generates a key based on some hardware numbers). You know that is not a topic that can be discussed with just a few sentences. So I will stop here. Check out some packers that can protect your software and that way you won't have to worry about implementation details.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I've been looking at a mass of spagetti code (which is supposedly an MFC app) from one the other monkeys here which for some reason has a dependency on msvcp60.dll. All our other MFC apps dont have this dependency - they only require mfc42.dll and msvcrt.dll - why this one?
|
|
|
|
|
msvcp60 contains classes such as basic_filebuf, basic_ios, etc. that start with the word basic_ (those are the ones I recognize at least). Those are not the only things in the dll, there are a lot more functions and classes. Try to use dumpbin /exports to see all the functions that are being exported.
I just had another idea. Remove msvcprt.lib (that's the library I believe) from the linker's options and you will get a bunch of errors telling you that you have external dependencies missing. That way you will be able to see what functions in the source code are linked to msvcp60.dll. I hope that makes sense.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Halo,
I still have some problems retrieving the selected data from a list box,
I showed my earlier code which was wrong, and got some ideas from a friend from this site and as suggested by him I used the function LB_GetItemdata.
Here is the code
void Cdlg4Dlg::OnDone()
{
HWND w=GetDlgItem(???? ,IDC_LISTBOX1);
LPARAM j=SendMessage(w,LB_GETITEMDATA,0);
}
so the GetdlgItem returns a handle to the list box, but i dont know what to be put for the first parameter (????).The MSDN site says that it is the handle to the dialog box containing the list box, how do i get it..can i put the id of the dialog box?? )like IDD_DIALOG1..
and another doubt..Will 'j' be the data which is selected in the list box or will that be a differént one..if thats not going to be the data selected , then how can i get the data (a number in my case) selected from list box be stored in a local variable?
some example codes will be helpful..
My question might be too stupid, please excuse since I am beginner..
Thanks,
Deepak Samuel
|
|
|
|
|
Deepak Samuel wrote:
but i dont know what to be put for the first parameter (????).The MSDN site says that it is the handle to the dialog box containing the list box, how do i get it..can i put the id of the dialog box??
No, it is the window handle of the dialog box - m_hWnd
That SendMessage() call will retrieve the application-specific data for the first item in the list box. I would get the selected item like this:
void Cdlg4Dlg::OnDone()
{
CListBox *pList = (CListBox*)GetDlgItem(IDC_LISTBOX1);
int nSel = pList->GetCurSel();
}
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,
Thanks for the help, but it still doesnt seem to work..
when i print out the value of nSel, regardless of the data i selected, it shows zero
CListBox *pList = (CListBox*)GetDlgItem(IDC_LISTBOX1);
int nSel = pList->GetCurSel();
FILE *fptr;
fptr=fopen("mynewfile.txt","a");
fprintf(fptr,"The value is %d",nSel);
fclose(fptr);
Let me tell you, the way I created my list box :
I clicked insert activex control and clicked
ListBox DTC (That was what I wanted)
In the properites box, listbox style shows "DROPDOWN".
Please help me out,
Thanks.
Deepak Samuel
|
|
|
|
|
Deepak Samuel wrote:
activex
You didn't say it was an ActiveX control. Neither my nor your solution will work for an ActiveX control, only for a standard Windows listbox control. The ActiveX control you're using should have a function for retrieving the current selection, but I don't know what it is - it depends on the control. For something like a list box, I'd recommend you use the standard Windows list box control anyway, unless there is a specific reason why you want to use the ActiveX one.
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"
|
|
|
|
|
How do I load text into a browser control witout using a file(or URL)?
WebBrowser1.Navigate() take either filelocation or URL.
Thanks in advance.
H.
|
|
|
|
|
To use Windows XP-visual styles in my app I should use Manifest file. But it works only if I compile project with VC7. Is it possible to do it with VC6?
|
|
|
|
|
it is just a resource 24 (usually id 1)
if you have the actual manifest file just insert it as a custom resource.
|
|
|
|
|
I have a project that was developed using VC6 which uses a manifest file to switch on XP styles and it works fine.
Debbie
|
|
|
|
|
Hi There,
I am busy with an application that needs to pre-allocate all available space on a clean-formatted dedicated drive to datafiles of a fixed size. At this stage I am doing something like:
<br />
while (freediskspace < allocatespace)<br />
{<br />
}<br />
Creating the files like this, one after the other, I would expect that there would be minimal (if any) fragmentation on the disk. However, when I then run Microsoft Defragment to analyze the disk it reports that just about all the created files are fragmented and some of them even into 93 fragments.
I have experimented with different allocation size, writing different chunk size at a time, etc, but all of them result in fragmented files.
My question is now very simply this: How do I create files on a clean-formatted drive without them becoming fragmented ??
Thanks
OD
|
|
|
|
|
Wow, that's fascinating. Those results surprise me.
I would guess that the severe fragmenting is due to the delayed write cache that Windows uses. It sees you madly writing data, so it waits before it actually commits anything to disk. But when it does, whatever algorithm it uses causes the files to get written haphazardly, resulting in fragmentation.
I made all that up as I went along, by the way.
Anyway, there are Flush functions that may force the file buffers to disk. If you're using fopen() there is a fflush() that may do what I'm suggesting. There is also CFile::Flush() if you swing that way. I think every method of file writing has an associated flush function.
I would recommend flushing each file at the end of each loop, maybe at the end of each block write. Just to see what happens.
Let us know what you find!
|
|
|
|
|
try instead of
od@ananzi.co.za wrote:
// Write to file 10 times, (allocatespace/10) bytes at a time
write to memory until done (alloc/realloc all you want)
dump the memory to the file at once.
Otherwise I do not think you have contol over it, unless you want to write kernel driver.
|
|
|
|
|
od@ananzi.co.za wrote:
My question is now very simply this: How do I create files on a clean-formatted drive without them becoming fragmented ??
There's no guarantee that you can. It's totally up to the file system as to how it splits up a file.
|
|
|
|
|
od@ananzi.co.za wrote:
My question is now very simply this: How do I create files on a clean-formatted drive without them becoming fragmented ??
Use FAT32... NTFS should be renamed to SFFS or self fragmenting file system...
Actually I think there is a way by setting the size of the file when you create it but I am not sure...
John
|
|
|
|