|
Buyer1 wrote:
Secondly:
I tried what you told me, but i keep getting this error when i compile:
midl : command line error MIDL1001 : cannot open input file Program.
Are you doing something with COM? Using AppWizard, what type of application did you opt for, and what other options did you select?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Wait that was something else.
Sorry about that.
I got it working how you told me.
Thank you so very much!!!
|
|
|
|
|
Hi Community,
I want to extend the detail view of the explorer shell to handle video summary information for mp4 files in the summary tab of the advanced property page under XP on an NTFS file system.
This behavior is already included for mp3 and avi files, although mp3 and avi aren't compounded documents. So therefor, I must implement the IPropertySetStorage interface. What do I have to do to implement that interface? Is there an example somewhere?
It is important to me, that the metadata is not stored in an additional NTFS
stream, but inside the mp4 file itself. So I have to handle this by my
own shell extension code. But how, where, when ...
Thanks in advanced,
David
|
|
|
|
|
I have added a define in my Visual Studio .Net configuration. However my #ifdef's do not see the define. Anyone knows how this can be?
|
|
|
|
|
Hi,
I have a CDateTimeCtrl which I am growing in size when the focus is set and shrinking back to its normal size when focus is killed.
at the moment the only way I can get the control to lose focus is to set the focus onto another control.
Ideally when the user clicks anywhere outside of the control the focus should be lost and the CDateTimeCtrl shrink back to its normal size, but I can't see how to capture a mouse click on a CDateTimeCtrl.
The ComboBox control obvioulsy does something similar but can I do it with my CDateTimeCtrl?
Many Thanks
|
|
|
|
|
you could handle the WM_KILLFOCUS message for your control.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
error C2079: 'm_RealTime' uses undefined class 'CRealTime'
What is this error?
CRealTime is a modless dialog I use from a diffrent dialog and I have not seen this error before. It have work OK but now it happens is there anyone that now what it is?
|
|
|
|
|
if CRealTime is declared in the calling class's header file, you'll need to make a forward class declaration so that the compiler knows that it's a class when it compiles the header. Here's an example:
class CRealTime;
class CCallingClass : public CSomeClass
{
CRealTime m_RealTime;
};
Who are all these people and what are they doing in my house?...Me in 30 years, inside a grocery store
My articles[^]
bdiamond
|
|
|
|
|
I am trying to do some data validation on a dialog application and present the user with a message box when the user tries to input invalid data. The test work but when it gets to the point that it is supposed to display a message box, the dialog application greys out as if it no longer has the focus, but no message box is shown and the application hangs. At this point, I have to do the control alt delete to get it to close. Help! Oh this is with Visual C++.net.
Thanks for any help!
Chris
|
|
|
|
|
when should it get called? How do you do it? How and when do you the validating?
this will help all the ones trying the answer your answer .
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
The validation is occurring when a user pushes a button on the dialog. The validation is on an edit control. See below.
int Pos;
int NumChars;
BOOL RtnVal=TRUE;
CString strEditText;
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT1);
pEdit->GetWindowText(strEditText);
NumChars = strEditText.GetLength();
for(Pos = 0; Pos < NumChars; Pos ++)
{
if(!isdigit(strEditText[Pos])&&(strEditText[Pos]!='-')&&(strEditText[Pos]!='.')
{
RtnVal = FALSE;
}
}
if(RtnVal==FALSE)
{
MessageBox("One or more of the values you typed are not numeric!", "Error", MB_ICONERROR | MB_OK);
}
Hopefully this will help you help me!
Thanks for any help!
Chris
|
|
|
|
|
First it looks as though your missing a ')' at the end of your if statement.
Programmer_Chris wrote:
if(!isdigit(strEditText[Pos])&&(strEditText[Pos]!='-')&&(strEditText[Pos]!='.')
Second why don;t you do this
Programmer_Chris wrote:
if(!isdigit(strEditText[Pos])&&(strEditText[Pos]!='-')&&(strEditText[Pos]!='.'))
{
MessageBox("One or more of the values you typed are not numeric!", "Error", MB_ICONERROR | MB_OK);
}
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Programmer_Chris wrote:
MessageBox("One or more of the values you typed are not numeric!", "Error", MB_ICONERROR | MB_OK);
Is the message box actually displayed? Unless you are using ATL, or you have your own flavor of MessageBox() , shouldn't there be four parameters with the first one being the handle to the owner window?
While not related to the problem, I would suggest terminating the for loop once an invalid character is found.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
I have placed a Check Box on 1st property page.
The propertysheet containing this property page is on the form view of my MDI MFC Appwizaerd
Application.
I have placed a push button on form view of the application.
In its(push buton's) member function, named OnPress, I want to fetch the value of the checkbox
of that propertypage.
ID of Check Box is IDC_CHECK_SUBFOLDER
If I place the code as follows in OnPress member function, I get an access violation error when
I run it.
(((CButton *)GetDlgItem(IDC_CHECK_SUBFOLDER))->GetCheck() == 1);
Please Help me to fetch the value.
Drushti
|
|
|
|
|
missnazar wrote:
(((CButton *)GetDlgItem(IDC_CHECK_SUBFOLDER))->GetCheck() == 1);
It's never a good idea to use hard-coded values like this. Compare against BST_CHECKED instead. That's not the cause of the access violation, however.
Rather than lump all that into one convoluted statement that makes debugging rather difficult, how about breaking it up into something like:
CButton *pButton = (CButton *) GetDlgItem(IDC_CHECK_SUBFOLDER);
if (NULL != pButton)
{
if (pButton->GetCheck() == BST_CHECKED)
;
} Now you can get a better idea as to where it's failing.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
DavidCrow wrote:
Rather than lump all that into one convoluted statement that makes debugging rather difficult, how about breaking it up into something like:
Once the problem is fixed, would you put the code back to a single line? Whilst it is not as 'nice' to read I imagine it would execute quicker, not that the difference in speed will amount to much anyway. I just wondered what other people thought - more convulated, easier to read/maintain code, or 'many commands nested on one line'.
Cheers
Angel
***********************************************************
The sooner you fall behind, the longer you have to catch up
|
|
|
|
|
Angel1058 wrote:
Once the problem is fixed, would you put the code back to a single line?
I personally would not.
Angel1058 wrote:
...I imagine it would execute quicker...
True, assuming your stopwatch can measure things in nanoseconds.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello there,
I want to draw the frame around my edit controls myself.
Where should I start???
The WM_PAINT message doesn^t seem to get send untill I enter data in the control, so that`s not the way... Which message should I capture so that I can draw the frame of my edit control myself?
Thx for any help you can give.
Greetz,
Davy
|
|
|
|
|
Probably WM_NCPAINT (Non-Client paint)
If you vote me down, my score will only get lower
|
|
|
|
|
Hi!
Is there anyway of se which ethernet cards that exists on your computer? I would like to choose which one of them to use when I program a Socket with C++. For example you can have one ethernet-card that are wired and one that are wireless. How can I in Visual c++ .net choose which one to use?
Do microsoft have an class or library for this?
It would be very good if someone only have an idea of this.
/Martin
/Martin
|
|
|
|
|
why don't you take the easy way and let windows decide whats the best interface to use?
Don't try it, just do it!
|
|
|
|
|
I can´t because we are suppose to have a seamless communication between them. If you unplugs the cable for example the application shall use the wireless communication instead of the wired without loosing any data.
Is it possible to choose in any way instead of letting windows do it for you?
/Martin
|
|
|
|
|
Hi,
I need to write a little app which loads an image file (bmp, jpg or png), displays it, accesses pixel info and paints flat colour rects onto the image (- don't ask, it's a long story!).
Anyway I've done a fair bit of playing with MFC and Win32 over the past year but haven't yet touched graphics work. I intend to do a lot of graphics stuff in the future. Could anyone suggest the best approach to doing this project with a view to it giving me an intro to graphics work. Should I be concentrating on the Win32 api or GDI+ or DirectX or something else? I've no experience of GDI or DirextX at all. What are the strengths and weaknesses. All my future graphics work is likely to be 2D based.
Any advice would be much appreciated.
Many thanks,
Simon
|
|
|
|
|
If you search for CxImage on this site, you will found a nice library for working with images and image data for many graphics formats. You could do this all yourself, but why bother, since others have been down this path already.
When you say "doing graphics work," are you going to be concentrating on a GUI approach, or on a processing approach? Much of my work involves graphics processing, but there isn't much of a GUI since all the data comes from other places, is processed, and then output and manipulated in various formats without user intervention.
If your graphics work is directed toward gaming, then that is a different topic.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
Hi Dave,
Thanks for the reply. I took a quick look at CxImage and did think it looked ideal. The thing that put me off is that the author implies it has now been superseded by other technologies - I didn't want to spend time getting to grips with something then to realise I have to get to know GDI+ or DirectX.
I know DirectX is heavily used for games. A few of the projects I'm interested in looking at include playing back image sequences using RAM buffers, and importing, scaling, compositing and displaying image files in an application environment. As these are pretty performance driven I wondered if DirectX's 2D capabilities may be desirable.
I also heard there's a new display technology available through Longhorn, and would rather spend time learning something that will be around for a while.
Anyhow, your suggestion of using CxImage has confirmed my feeling that it is probably a good place to start so I'll check it out again.
Cheers Dave,
Simon
|
|
|
|