|
Ok.. i have not registered to code-project. will register now itelf and resend the mail. my mail was not in anyway trying to hurt any1. if i violated the etiquttes of the group, then i am sorry.
|
|
|
|
|
Anonymous wrote:
then i am sorry.
I do not mean that, no need for Sorry, but I just want to convey if you post by Identity, you will get better Response from other user.
Anonymous wrote:
if I violated the etiquettes of the group
That depends upon the Group Moderator
Anonymous wrote:
i have not registered to code-project.
Go and register, its free.
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Friends,
I've CListCtrl on the dialog. I am getting huge amount of data from network that i am displaying in this ListControl (Report Style).
Now, i want that whenever new item is added, the CListCtrl should automatically scroll down to show the latest added item. How can i do so.
Imtiaz
|
|
|
|
|
|
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
|
|
|
|