|
Hi!
Plese tell me that in which function do i need to pass LVM_ENSUREVISIBLE
|
|
|
|
|
use this macro ListView_EnsureVisible if in win32/MFC both or
use LVM_ENSUREVISIBLE in ClistCtrl::Create if using MFC
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
ThatsAlok wrote:
use LVM_ENSUREVISIBLE in ClistCtrl::Create if using MFC
LVM_ENSUREVISIBLE is a message not a style.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
in my application i have used MS-access database to log events. Now i want to automatically rotate the log. i.e after a week say the log should be backed up. and then after some time deleted. how do i do it?
|
|
|
|
|
two options
1) have another DB file and when the time is up, copy all the recordsets from the current to the backed up
and empty the current
2) import an empty database in ur Exe and when the time comes copy the DB to DBBkup directory and spit out the empty DB from the Exe File (FindResource will help)
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
hi,
i want to delete the database evrery monday morning. how do i do it? can u give me some link
|
|
|
|
|
One way would be to put del ...\mydatabase.mdb in a batch file and create a scheduled task that would run the batch file every Monday. Other ways exist, too.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi all,
I want to set the WindowSize of MFC Dialog..(800 pixel width and 600 pixel height)..What is the way to do it?
If any one know this,please reply me..
Thanks in advance..
|
|
|
|
|
See SetWindowPos() and MoveWindow() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi all:
What messages my application get when I click the system staskbar consecutively such that the dialog can get minimized and maximized!
Thanks
|
|
|
|
|
|
Hi all:
I used the DrawText() to output several lines of text within a rect, but with the font I created
VERIFY(m_Font.CreateFont(
12, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
FW_NORMAL, // nWeight
FALSE, // bItalic
FALSE, // bUnderline
0, // cStrikeOut
ANSI_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, //nOutPrecision
CLIP_DEFAULT_PRECIS, //nClipPrecision
PROOF_QUALITY , // nQuality
DEFAULT_PITCH|FF_SWISS, //nPitchAndFamily
_T("Arial"))); // lpszFacename
the text appears two crowded vertically, I know with a internal leading, the text can be looked good. But the question is how to add a internal leading?
|
|
|
|
|
IIRC SetTextMetrics might help
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Thanks for your answer. But where can I get reference for this SetTextMetrics, I can't find it in the MSDN?
|
|
|
|
|
I've managed to get myself a copy of Jeffrey Richter's Programming Applications for Microsoft Windows (4th Edition), but it doesn't have the source code CD.
Can anyone provide me with a Zipped up copy of the CD's contents please ?
|
|
|
|
|
Dear Members !
I wanted a C++ code for reading and displaying bitmap file ..
And in my code an error comes with the following :
cannot cast unsigned long to unsigned char *,,,,
in the program the error is comin on the following line :
unsigned char * VGA = ( unsigned char * ) 0xA0000000L;
can anyone help me ?
Thankx,
Sneha
|
|
|
|
|
Could you show actual CODE, where you facing Problem?
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Hey Alok ! The following is the c++ code... and the " unsigned char *VGA=(unsigned char *)0xA0000000L; " is giving error " connot cast unsigned long to unsigned char * " Can you help me in this ?
And if you can provide me the bitmap_read code in C# then also it will be a great help .....
The following is the original code ::::::
Thanx a lot,,,
*********************************************************************
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <mem.h>
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 200
#define NUM_COLORS 256
unsigned char *VGA=(unsigned char *)0xA0000000L;
void setmode(unsigned char mode)
{
union REGS i, o;
i.h.ah = 0x00;
i.h.al = mode;
int86(16, &i, &o);
}
void setrgbpalette(int n, unsigned char r, unsigned char g, unsigned char b)
{
union REGS i, o;
i.h.ah=0x10;
i.h.al=0x10;
i.x.bx=n;
i.h.dh=r;
i.h.ch=g;
i.h.cl=b;
int86(16, &i, &o);
}
void putpixel(int x, int y, char c)
{
*(VGA+((y<<8)+(y<<6)+x)) = c;
}
struct Fileheader
{
unsigned short Type;
unsigned long Size;
unsigned short Reserved1;
unsigned short Reserved2;
unsigned long OffBits;
unsigned long StructSize;
unsigned long Width;
unsigned long Height;
unsigned short Planes;
unsigned short BitCount;
unsigned long Compression;
unsigned long SizeImage;
long XPelsPerMeter;
long YPelsPerMeter;
unsigned long ClrUsed;
unsigned long ClrImportant;
Fileheader()
{
Size=Width=Height=Planes=BitCount=Compression=SizeImage=XPelsPerMeter=
YPelsPerMeter=ClrUsed=ClrImportant=Type=StructSize=Reserved1=Reserved2=
OffBits=0;
}
};
struct RGBQuad
{
unsigned char rgbBlue;
unsigned char rgbGreen;
unsigned char rgbRed;
unsigned char rgbReserved;
RGBQuad()
{
rgbBlue = rgbGreen = rgbRed = 0;
rgbReserved = 0;
}
};
class Bitmap
{
private :
Fileheader f;
unsigned char* Bmp;
RGBQuad Palette[256];
public :
void ReadBitmap(char*);
void DisplayBitmap(void);
};
void Bitmap::ReadBitmap(char *file)
{
FILE *fp;
unsigned short num_colors;
if ((fp = fopen(file,"rb")) == NULL)
{
printf("Error opening file %s.\n",file);
exit(1);
}
fread(&f, sizeof(Fileheader), 1, fp);
if (f.ClrUsed==0) num_colors=NUM_COLORS;
else num_colors=f.ClrUsed;
if ((Bmp = (unsigned char * ) malloc(sizeof(unsigned char)*(f.Width*f.Height))) == NULL)
{
fclose(fp);
printf("Error allocating memory for file %s.\n",file);
exit(1);
}
for(int i=0; i<num_colors; i++)
="" {
="" fread(&palette[i],="" sizeof(rgbquad),="" 1,="" fp);
="" setrgbpalette(i,="" (palette[i].rgbred="">>2), (Palette[i].rgbGreen>>2), (Palette[i].rgbBlue>>2));
}
for(long j=(f.Height-1)*f.Width; j>=0; j-=f.Width)
{
for(i=0;i
|
|
|
|
|
Sneha Desai wrote:
And if you can provide me the bitmap_read code in C# then also it will be a great help .....
If you looking for C# code,post your problem In C# Forum.
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
Try reinterpret_cast in C++.
unsigned char *VGA=reinterpret_cast<unsigned char="" *="">0xA0000000L;
Regards,
Selvam
|
|
|
|
|
I'm looking for a way to find matching regions in a file - much like the LCS (diff) algorithm, but optimized for moved data. For example in the two strings below:
"milk and coffee"
"coffee and milk"
LCS will only find a small matching region, " and ", while the strings themself have larger matching regions. Currently I'm using a "sliding windows" approach (similar to rsync) to do this, but it gets a bit slow for large files.
Any suggestions or references would be welcome - I'm looking for both heuristics and algorithms. Im also looking for traditional diff heuristics...
/Thanks
moliate
The corners of my eyes catch hasty, bloodless motion -
a mouse?
Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours
|
|
|
|
|
Hi everyone!
I have a really silly one. Every time I close my application it ends incorrect.
In Release mode everything looks fine (some machines are showing an error, but currently not - even with the same version that did before!), but the closing is still incorrect. This means I can set an AfxMessageBox after the DoModal call in the main file for the dialog, and you will only hear the beep of the box, but the app is already gone and the box is not shown.
Unfortunally Debug mode brings no further information either!
You hear the error sound from Visual Studio debugger, but no stop or message from the debugger itself. So I can still not find out what exactly happens there! (Only the debug information about the last running thread exiting correctly with code 0, and that the program ending with code 3)
My project is already too big to give some code snippets, because it includes additional threads, "sticked" dialogs, toolbars, etc... And since I did not realize the problem early enough I could not just easily tell you what thing was included last, or how long (or already from the begin on?) the bug exists.
So finally the question: Can I set up the VS Debugger to stop in any case, even if the error is caused in some control or dll? I'd just like to know where I could start searching or what part of my app creates this problem.
Or is there some different solution to find the problem? Some free debugger? What is a typical error so the debugger brings nothing up? Any help wanted!
Thanks in advance,
Roland
|
|
|
|
|
Roland E. wrote:
This means I can set an AfxMessageBox after the DoModal call in the main file for the dialog, and you will only hear the beep of the box, but the app is already gone and the box is not shown.
This is a very common problem. The solution can be found here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Wooowdy, I love you!
You have been a real big help, it worked immediately and then I found a small bug in this never finalized end.
Again, thanks a lot!!! I wonder why I never heared about this strange behaviour...
Roland
|
|
|
|
|