I have a dialog based MFC application in which I get the HWND of some other running application window. Now I want to change to position of that window and not the Size of that window....So how to achieve ?
thank u Selvam
but actully i am getting
a problem i have created
the frame and want to preview
the frame for an print-out ,
but when the preview screen
closes then an assertion is
created , Wincore file
the m_hWnd is null for the
simply can u send me some simple
code for creatin the child window
so i can check out
I was about to assume that I can skip calling GetLongPathName if the path does not have a '~' character, when I saw the documentation for GetLongPathName itself suggests not to assume so:
On many file systems, a short file name contains a tilde character (~). However, not all file systems follow this convention. Therefore, do not assume that you can skip calling GetLongPathName if the path does not contain a tilde character.
So, just curious - has anyone seen any other convention for short file names?
From distant memories of Windows 98 (or maybe 95), there was a way for the user to specify what abbreviation scheme to use. (So you could leave out the tilde, or allow 2 characters following tilde, or whatever.)
I can't remember how this was done, and I don't know if this feature is still available.
snprani wrote: Can anybody help me in this regard. i have to use vc++ to store BLOBS in Oracle Databse using ADO with or without Stored procedures.
Looks like you have posted this question several times over the last week and no one has been able to help. I will give it a go.
Well storing images in a database is rather expensive. The one time I needed an app to store images I basically fudged it and stored the image on a disk drive and only stored the location / name of the file.
Blob columns in a db are easy to corrupt and very expensive server wise. There is away to do it but generally everything that I have found warns against it.
Here is some info off of the MSDN for using blobs and SQL server. This should be the same for oracle.
I am developing an SDI application in VC++ 6.0 on WIndows 2000.
I want to read some settings from Database when application comes up. I wrote DB access code in "CMyView::OnInitialUpdate()". It is working fine when DB is accessable. If DB is not accessable due to some problem, my application waits in the starting itself until the DB connection is timed out... after that application displays the Error MessageBox and then the main window is launched.
User is unable to know what is going on until he gets the Error Message. I want my application to comeup first and then I want to try to access the DB and I want to put periodic status message to the user to know about what is going on in backend.
Please let me know where I can write the code for DB accesss in order to get executed after the main window is displayed. Please note that it is SDI application.
In my opinion ,I don't put code in CMyView::OnInitialUpdate()". It may be better to use a menu named "Link DataBase",
the user click the menu ,then the application link to the DB accesss. If access failed ,you can give the user an
Error MessageBox . Thus you can put the DB access code in CMyView::On****( ).
I would like to create an owner draw CListCtrl in thumbnail mode. Can somebody please help me by giving some pointers in doing this. I have done owner draw list controls for the detail view, But for the icon view, I am very much confused.
Some articles or code sample would be really helpful.
Looking forward for a reply.
Thanks and Regards
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
I am karnal and nowadys learning Vc.
I have a problem
"I have a Dialog based MFC program via i captured Bitmap, now i want to print this captured bitmap on default network printer,
The code for capturing bitmap is as follows
void WriteBmp(char* filename,BITMAP *bmp,int* data)
Bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
Bmi.bmiHeader.biWidth = bmp->bmWidth;
Bmi.bmiHeader.biHeight = bmp->bmHeight;
Bmi.bmiHeader.biPlanes = 1;
Bmi.bmiHeader.biBitCount = bmp->bmBitsPixel;
Bmi.bmiHeader.biCompression = BI_RGB;
Bmi.bmiHeader.biSizeImage = bmp->bmHeight*bmp->bmWidth*bmp->bmBitsPixel/8;
FILE* image = fopen (filename,"wb");
int h = abs(Bmi.bmiHeader.biHeight);
int w = abs(Bmi.bmiHeader.biWidth);
int sz = Bmi.bmiHeader.biSizeImage;
HANDLE hBitMap =(HBITMAP) ::LoadImage(AfxGetInstanceHandle(),
LR_LOADFROMFILE | LR_CREATEDIBSECTION); // put here the handle of the window you would like to caputre
int size = bitmap.bmWidth*bitmap.bmHeight*bitmap.bmBitsPixel/8;
BYTE *lpBits = new BYTE[size];