|
If you are seeing flicker at that point, it may be that the implementation of your data store may not be as fast as it should be. Since you are using a virtual list control, you need to provide data to the control as it asks for it.
If the data store you are using is too slow, you may see flicker because of that - the updates will be slowed down because of slowness.
May want to look into speeding up the handling of data.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
uups, i didn know that this can be a problem:
zitat:
If the data store you are using is too slow
thanks for information about!
regards
termal
|
|
|
|
|
Dear all
i need your help. in advance i thank u. my issue is as follows:
if i have a menuitem, after i click it, one dialog appears:ask users to enter parameters below: length=10 pixel, width=10pixel, height=10 pixel, then click ok.correspording to cube will show in window. how to program this point? who have any such snippet? so urgent. thanks very much.
regards
zhiyuan
Li Zhiyuan
5/10/2006
|
|
|
|
|
One way would be using MoveTo (int nXCoord, int nYCoord)/MoveTo (CPoint point) and LineTo (int nXCoord, int nYCoord)/LineTo (CPoint point) of the DeviceContext in cascade for every plane, and then once every one to connect the visible corners.
Use the OK to set a BOOL to true and in the OnPaint...
pDC->MoveTo (0, 0);
pDC->LineTo (width, 0);
pDC->LineTo (width, height);
pDC->LineTo (0, height);
pDC->LineTo (0, 0);
For the second square you should make the same but adding "length" in every coordinate to draw it "in front of the other one"
Then you have to connect every corner with
pDC->MoveTo (0, 0);
pDC->LineTo (length, length);
pDC->MoveTo (width, 0);
pDC->LineTo (widthlength, length);
and so on with the other pair of corners
Note:
I am using the CDC* pDC that is in the OnDraw message for VC++ in the CView derived class. In dialogs you should look at OnPaint and if the cube has to be drawn there, use the CreateCompatibleDC to and draw using it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Hello Guruji
I am making an application using modal dialog based application
my need is save .txt and word file in database
( file name saved in database and file save in folder )
i can fetch file name using some obj.GetPathName() function
but now how i saving this file to folder and also how i will be
feaching it.
Note : i used database as MySQL
Now one of another question how feach data from MS word file
Please told me
if possible with example
Regard's
Kaushik
|
|
|
|
|
Since MySQL support BLOB columns, I would suggest compressing the data (zLib comes in handy here), and then stuffing the resulting data into a BLOB column, possibly storing the "real" length of the data somewhere to optimize your uncompression process.
How you get that data into a BLOB column depends on the API you are using (MySQL Connector/ODBC), but you should have documentation that explains how to do that.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Problem is that i know only file path and file name now
how can i save it in database.
When downloading how can i open it
Regard's
Kaushik
|
|
|
|
|
The complete path to the file is enough information to get at that file's data. In a nutshell, you can load the file's data, and then upload it to the database. As I said before, the documentation for the API you are using will show you how to pass data to the database.
When downloading the data from the database, you will save it on disk (oh, and also remember to keep the filename and extension of the original file so you can recreate it correctly), and then you can launch it from wherever you saved it on disk at.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Y_Kaushik wrote: how can i save it in database.
Read the contents of the file into a buffer, and store that buffer to the BLOB column.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi i have to read the keys pressed in keyboard and send that to a drive. how to receve the keys pressed using vc++. pls help me
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Hi,
If I understand your question correctly, try using one of these
_getch, _getche
Get a character from the console without echo (_getch) or with echo (_getche).
<br />
int _getch( void );<br />
int _getche( void );<br />
Example
#include <conio.h>
#include <ctype.h>
void main( void )
{
int ch;
_cputs( "Type 'Y' when finished typing keys: " );
do
{
ch = _getch();
ch = toupper( ch );
} while( ch != 'Y' );
_putch( ch );
_putch( '\r' );
_putch( '\n' );
}
_kbhit
Checks the console for keyboard input.
int _kbhit( void );
Example
#include <conio.h>
#include <stdio.h>
void main( void )
{
while( !_kbhit() )
_cputs( "Hit me!! " );
printf( "\nKey struck was '%c'\n", _getch() );
_getch();
}
Or have a look at SendKeys in C++[^]
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
If you want to write a Key Logger , you might want to start by stating so, and searching Google for Key Logger source code.
In the simplest form, you would create a Keyboard Hook (in a DLL), and intercept keyboard events and write them to a file.
In the more robust and professional forms, you use a Window Message Hook and pay attention to keyboard-related and mouse-button-related events so that you can correctly capture user input from several sources (on-screen keyboards, enhanced keypads, buttons that trigger text macros, voice recognition/dictation, mouse gesture systems, Accessibility aids/applications like Dasher[^], etc.)
I believe that far too many so-called "key loggers" are written by amateurs that think that the only way to get a character into an edit control is by pressing a key on a keyboard. Nothing is worse than bad software masquerading as security. (Well, maybe except for the companies that use them!)
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
Hi all.
In an earlier question I indicated that I generate child dialog by means of "Create". However; when defining a new entry I prefer to use a modal dialog for a number of reasons. This means that - for example - in the OnOK routine, I can have a modal dialog or not; which means that I need to react differently. Anyone have any idea how to find out if the dialog is modal or not? I could of course set a flag myself (since I know how I am creating the dialog) but isn't there a neat way of doing this?
Thanks in advance
William
|
|
|
|
|
If you are using MFC, modal dialogs are implemented a little differently - they simply disable their parent window. You should be able to get a dialog's parent window handle (HWND ), and then see if it is disabled or not.
Not really neat, but it may work for you. Might just be better to set a flag!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
James,
Thanks for your answer. I have now indeed introduced a flag, which is set in an overridden DoModal routine. Works just fine.
Thanks,
William
|
|
|
|
|
|
Hi,
I am trying to fetch the information about remote computer. Initially, I need the information of number of physical disks and their sizes.
I am taking help of the following registry key to get the number of physical disks (I am opening remote registry and querying these keys):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE<br />
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI
These keys contains the number of disks on the system. But, I am unable to fetch their sizes. CreateFile is not opening physical disks on remote system (returning INVALID_HANDLE_VALUE).
Can anybody help resolving this issue?
Kiran.
|
|
|
|
|
I suspect the answer might lie with WMI (Windows Management Instrumentation). In theory this technology can get you the information you want but I can't say I've had much luck with it myself. I'd be interested in any solution you finally come up with though as I've stalled on a similar problem in the past. Microsoft don't seem to publish an interface for talking to the Logical Disk Manager, even locally. If this has changed perhaps somebody else will be able to post a link.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi all,
I'm trying to create a time stamp [format: yyyymmddhhmmss], but as always I'm experiencing some problems. I have tried the following:
char dateString [20];
char timeString [20];
struct tm *newtime;
time_t long_time;
time( &long_time );
newtime = localtime( &long_time );
sprintf(dateString,"%d%d%d",newtime->tm_year, newtime->tm_mon, newtime->tm_mday);
sprintf(timeString,"%d%d%d",newtime->tm_hour, newtime->tm_min, newtime->tm_sec);
But I not very familiar with the expression to use. Can anyone please help??
Many Thanks
Regards
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi,
For the year, you need to add 1900 (see MSDN for more information). So, your sprintf turn to:
<br />
sprintf(dateString,"%4d%02d%02d",newtime->tm_year + 1900 , newtime->tm_mon, newtime->tm_mday);<br />
sprintf(timeString,"%02d%02d%02d",newtime->tm_hour, newtime->tm_min, newtime->tm_sec);<br />
The bold letters are those places where I made changes.
Hope that helps.
Kiran.
|
|
|
|
|
|
Programm3r wrote: format: yyyymmddhhmmss
Use: _tcsftime (dateString, 20, _T("%Y%m%d%H%M%S"), newtime);
|
|
|
|
|
Thank you very much for the help.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: ...I'm experiencing some problems.
One of which seems to be not explaining the problem.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|