|
You might to consider fixing the URL. It has a break, which might be why it's broke!
I also did not see anything in the link discussing radio buttons. Did I overlook something?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Yeap Sorry!
Correct Link is this
http://www.codeproject.com/cpp/Introduce_Yourself_to_VC.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
http://www.codeproject.com/dotnet/olddog1.asp
http://www.devarticles.com/c/a/Cplusplus/Using-MFC-in-C-Controls-DDX-and-DDV/4/
check out this two links u can find
some stuff , i have tested it they
are not broken links.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hello Dear
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 ?
I do it in such way....
void CMyDialog::OnInitDialog()
{
int NewYPosition, NewXPosition;
HWND *pWnd;
pWnd = FindWindow(NULL,"NameOfWindowToChange");
CRect MyRect;
NewYPosition = 10;
NewXPosition = 10;
MyRect.top = NewYPosition;
MyRect.left = NewXPosition;
pWnd->MoveWindow(MyRect,true);
}
It moves my new window to the desired location but also changes the size of window.
Any idea what do...so that it doesn't change the size of the window.
Thank you very much
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Hi
use SetWindowPos with flag SWP_NOSIZE
or use simething like
CRect myRect;<br />
GetClientRect(&myRect);<br />
ClientToScreen(myRect);<br />
myRect.MoveToXY(5,10);<br />
MoveWindow(myRect.left, myRect.top,<br />
myRect.Width(), myRect.Height());
Iman Ghasrfakhri
|
|
|
|
|
Thank you very much for kindly taking time to read my question and answer it.
It worked exactly the way I wanted..
Again Thankx a lot
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote:
pWnd->MoveWindow(MyRect,true);
TRy SetWindowPos(...) with last Argument equals to SWP_NOSIZE
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
how do i create a new
child frame in an MDI
create a new child frame
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi,
You can use CMDIChildWnd::Create to create the child frame in MDI.
-Selvam
Thanks and Regards,
Selvam,
http://www.wincpp.com
|
|
|
|
|
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
Mainframe window.
simply can u send me some simple
code for creatin the child window
so i can check out
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
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.
|
|
|
|
|
I've got a kernal and an image in frequncy domain and I want to perform convolution between them. Any help would be appreciated. Thx
|
|
|
|
|
I worked on images in frequncy domain in MATLAB, do you want work on it in VC++?
& what is [kernal]?
Iman Ghasrfakhri
|
|
|
|
|
Hi to All
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.
Thanks in advance.
|
|
|
|
|
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.
http://support.microsoft.com/default.aspx?scid=kb;en-us;185958[^]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag01/html/BLOB.asp[^]
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Hello All
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.
Thanks for your time
Ravi
|
|
|
|
|
//Define a user message (2008 is Beijing Olympic;P))
#define WM_DELAY_CONNECTDB WM_USER + 2008
BEGIN_MESSAGE_MAP(CXXXView, CView)
//...
ON_MESSAGE(WM_DELAY_CONNECTDB, OnDelayConnectDB)
//...
END_MESSAGE_MAP()
void CXXXView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
//Post the message here
PostMessage(WM_DELAY_CONNECTDB);
}
void CXXXView::OnDelayConnectDB(WPARAM wParam, LPARAM lParam)
{
//Begin your operation
MessageBox("Perform your connecting operation");
}
Lane
China
|
|
|
|
|
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****( ).
libo
|
|
|
|
|
Have you considered putting the database-access code in a separate thread? This would allow the primary thread, which owns the GUI, to remain active and responsive.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello All
I am accessing DB using user defined message handler.
Due to more number of threads i have avoided using one more thread. But thanks for your solution.
Have nice time
Ravi
|
|
|
|
|
Hi,
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
San
"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)
{
BITMAPINFO Bmi;
memset(&Bmi,0,sizeof(BITMAPINFO));
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");
if(image==0)
return;
int h = abs(Bmi.bmiHeader.biHeight);
int w = abs(Bmi.bmiHeader.biWidth);
Bmi.bmiHeader.biHeight=h;
Bmi.bmiHeader.biWidth=w;
int sz = Bmi.bmiHeader.biSizeImage;
BITMAPFILEHEADER bfh;
bfh.bfType=('M'<<8)+'B';
bfh.bfOffBits=sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER);
bfh.bfSize=sz+bfh.bfOffBits;
bfh.bfReserved1=0;
bfh.bfReserved2=0;
fwrite(&bfh,sizeof(bfh),1,image);
fwrite(&Bmi.bmiHeader,sizeof(BITMAPINFOHEADER),1,image);
fwrite(data,sz,1,image);
fclose(image);
}
void CFullscreenDlg::OnShowWindow()
{
HANDLE hBitMap =(HBITMAP) ::LoadImage(AfxGetInstanceHandle(),
m_bmp.m_str,IMAGE_BITMAP,0,0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION); // put here the handle of the window you would like to caputre
CBitmap bmp;
bmp.Attach((HBITMAP)hBitMap);
BITMAP bitmap;
bmp.GetBitmap(&bitmap);
int size = bitmap.bmWidth*bitmap.bmHeight*bitmap.bmBitsPixel/8;
BYTE *lpBits = new BYTE[size];
::GetBitmapBits((HBITMAP)hBitMap,size,lpBits);
WriteBmp("c:\\test.bmp",&bitmap,(int*)lpBits);
delete []lpBits;
}
-----------------------------------------------
so plz help me to solved out my printing problem.
Thanking u all
Karnal
karnal
|
|
|
|
|
How to create a .jpg file using VC++?
aasstt
|
|
|
|
|