|
Hi..Check out..codeproject site..
A aritcle is there for saving BLOB data..use that method..that is applicable to all database...
Bye..Have fun..
Never consider anything Impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
How do you display an open/save dialog in MFC and get the file path/s that was/were selected?
|
|
|
|
|
Have a look at CFileDialog
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Try using this code:
CFileDialog fileDlg(TRUE);
if(fileDlg.DoModal() == IDOK)
{
CString strFileName;
fileDlg.GetPathName();
MessageBox(fileDlg);
}else{
MessageBox("No file selected!");
}
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Hai,
I'm doing a dialog application in win32. I have several static labels in my dialog. I'm doing a sequence of drawing and once I finish the sequence ,I Invalidate my whole dialog to erase all my drawings. When I do this my first label alone disappears and later in the application when I do again Invalidate Rect then it appears.What's the problem here? I'm not using that static label(which dissapears) anywhere in my program. It is just there as a label.What did I miss? Thanks a lot.
|
|
|
|
|
Hai,
I'm doing a dialog application in win32. I have several static labels in my dialog. I'm doing a sequence of drawing and once I finish the sequence I Invalidate my whole dialog to erase all mt drawings. When I do this my first label alone disappears and later in the application when I do again Invalidate Rect then it appears.What's the problem here? I'm using that static text anywhere in my program. It is just there as a label.
What did I miss? Thanks a lot.
|
|
|
|
|
I need to be able to detect CD Burning devices, but after searching for some time now I'm still not sure how to get the information I need.
I need to be able to detect that there is indeed a device that can burn to CD-R/CD-RW (be is a CD burner, or a DVD burner than supports burning CDs too). What I *really* need is the drive letter for that device.
I do not actually need to do any burning, I simply need to detect that one exists and report the drive's letter.
If you have any ideas that will save me from Google-Hell, please let me know!
Thanks!
: Dean
: Dean 'Karnatos' Michaud
|
|
|
|
|
Dean `Karnatos` Michaud wrote:
I need to be able to detect CD Burning devices...
Have you looked at the Win32_CDROMDrive and Win32_PhysicalMedia WMI classes?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi
i'm trying to use this package for my program: http://www.codeproject.com/miscctrl/pgllib.asp
can any one give me an idea how should i do add it? i did download it in my c drive but don't know how to use it
sorry i'm new
really thank you
|
|
|
|
|
Oriocat wrote:
can any one give me an idea how should i do add it?
Did you not read the "Installation" and "Getting your project started" sections of that article?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I did i have GDI+ and don't know ehre to find Gdiplus.dll. also i can't recompile the source which i'm not sure why
really thank you
|
|
|
|
|
Oriocat wrote:
...don't know ehre to find Gdiplus.dll.
Have you looked for it? On my machine, it's in the c:\winnt\system32 folder.
Oriocat wrote:
i can't recompile the source...
Which tells us nothing. What compiler/linker errors are you getting? What do the lines in error look like?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Oriocat wrote:
also i can't recompile the source which i'm not sure why
I am almost certain you need a compiler for that.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
1. How can I drag my dialog when draging over a certain portion of the dialog??? When I'm using:
UINT CNBinderDlg::OnNcHitTest(CPoint point)
{
UINT ret = CDialog::OnNcHitTest(point);
if(ret == HTCLIENT)
{
return HTCAPTION;
}
return ret;
}
I can drag the window by draging anywhere in the window.
2. Is it posible to hide or lock a directory, not only in explorer(with ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}") but in other file managers like TotalCommander too??? Thanx!
|
|
|
|
|
1. Easily.
As you can see in the WM_NCHITTEST message handler, you receive a CPoint object that specifies the point, in screen coordinates, where the hit test was made. If you first use ScreenToClient function to convert the CPoint into client coordinates then you can compare the coordinates to a pre-made list of where the function should return HTCAPTION . Everywhere where HTCAPTION is returned, the dialog becomes draggable.
Thus, if, for example, the x-coordinate of the CPoint is smaller than a half of the dialog's width, then you return HTCLIENT . Otherwise you return HTCAPTION . As a result, when you click and hold on the right-most half of your dialog, it can be dragged.
2. Some advanced file managers by-pass the security settings placed in the registry. To go around this, you could try the _access and _waccess functions of the Run-Time C Library. Not sure if they work though...
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Antti Keskinen wrote:
...you could try the _access and _waccess functions...
These are "get" functions not "set" functions, or did I miss your intent?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
you are right DavidCrow. _access and _waccess are get functions. I wan't set functions that hides (locks) folders no matter on what account you are, including administrator. Any ideas anybody?
|
|
|
|
|
I do not know how to do it programmatically.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have a ListCtrl that is being updated with new data, I was planning to use the doubleclick to stop the updating and allow the use to edit two fields in the list, one is decimal the other in Hex. This would be via a right mouse click.
My question is how do you edit these fields in this control. I have only ever used this control to display data (View = report style). So I would like to right-click and see the 2nd and 4th colums in an editable state.
I have set up a control variable for the control but dont know how to use it for editing data items.
Any samples or a few lines of code.
Many thanks,
Sweep
|
|
|
|
|
Pretty simple really you create an edit control dynamically and then size and position it in the area that the list control cell occupies. The user edits the edit control then presses enter which you capture as the [end edit] signal. Then you copy the edit control text into the list control and wherever else you need it and either destroy the edit control or hide it to reuse it later in another cell.
If my memory is correct there are more List Control topic articles on CodeProject than any other single topic. Take a look at them and see if they dont show you how to do that. If not post back here and I will take a shot at it. I have some code laying around somewhere where I did that and more in a list control.
Hate is not a family value.
-pete
|
|
|
|
|
I have an application where I get a message and save a real number entered by a user. This value is stored. The next time the user enters a value I want to compare it to the stored value. If the values are floats I believe they cant be compared due to rounding. Is there a way to make a comparison between to real values?
Thanks.
Jerry
|
|
|
|
|
The answer to this is found in the C++ FAQ at
http://www.parashift.com/c++-faq-lite/
If you read the whole thing you will see why I didn't point out where. I strongly recomend you read the whole thing.
|
|
|
|
|
bool IsEqual(double d1, double d2, double tolerance)
{
return (abs(d1 - d2) < tolerance);
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
jerry1211a wrote:
If the values are floats I believe they cant be compared due to rounding.
You are correct.
jerry1211a wrote:
Is there a way to make a comparison between to real values?
Yes. You'll need to decide the level of precision, however. For example:
double dVal1 = 1.245, dVal2 = 1.249;
if (fabs(dVal1 - dVal2) < 0.01)
...
else
... The number of decimal places in the constant must be equal to the number of decimal places being compared in the other two numbers.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How can you get Microsoft Visual C++ version 6.0 to display the time it takes to compile and build a project? I don’t mean the /Bt option, that displays the time taken to compile each individual source file. There’s a way of displaying the time for the whole build. I know there is because I used to do it, but I’ve just reinstalled Visual C++ 6.0 and I can’t remember how I did it before!
|
|
|
|