|
hey,
I am trying to divide the property sheet into parts. It will be a dialog based application. The first half will have only one dialog box and the second half will have tab structure.
Please help me out.
|
|
|
|
|
I'm a bit confused what you're trying to do.
If the property sheet is not in wizard mode, then you will have two tabs - one for each dialog.
There's nothing stopping an individual page / dialog from having tabs on it. Just go ahead and write it just like a normal dialog box.
So, I'm not sure how to answer other than: "Go ahead and write it! Good luck!"
If you can expand on your question, I may be able to help more. Have you tried writing this yet? Did you have any trouble?
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hi All,
Problem:-
Using MFC,Dialog Based applications.
I have created one class which is derived from CDialog. In that iam doing some customizations such as drawings and all. And i have overrided PostNCDestroy() in the class. In that function, i am destroying the this ptr such that more than one thread can make use of it. I have created one testapp to run this class. In the dlg class iam newing the object(local) of the class and calling its functions. My problem is after closing the maindialog One heap assertion coming stating not a valid heapptr like that.. What will be the reason?? please give me some solutions..
Regards,
Spk 521
|
|
|
|
|
Essentially, it is not safe to do things with MFc from more than one thread. The mapping from real windows things (like window handles) to MFC thingies (like CWnd's) "live" in the main thread.
I am going from your sentence:
S p k 521 wrote: In that function, i am destroying the this ptr such that more than one thread can make use of it
In my big fat app, I use MFC in the main thread, and occasional use of things like m_pSomeWnd->PostMessage (wm_blah) to talk back from threads.
So I suspect the multithreaded dialogs are shooting you in the foot, and you're getting lovely race conditions.
I don't know what to recommend other than redesign of you app. Or maybe going pure Win32 old school if you must have dialogs running in different threads...
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
S p k 521 wrote: And i have overrided PostNCDestroy() in the class. In that function, i am destroying the this ptr...
Is this a modeless dialog?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Yes it is a modeless dialog.
|
|
|
|
|
I hav 2implement distributed mutual exclusion in c....can any1 help me to implement this algo in c...or any other programming language...
|
|
|
|
|
Please reformat your post, SMS style is not encouraged here.
A good idea would be reading this [^], before posting.
BTW What have you done, so far? Have you, at least, choosen one algorithm [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello guys,
I've got a problem with a MFC project on Visual Studio 2008.
Whenever I want to Compile it, it Rebuilds. Whenever I clean, it Rebuilds. When I want to Launch Debug after having compiled, it Rebuilds and then starts debugging.
In other words, it seems that the project never gets updated.
Is there some setting that I can change to avoid this stupid behaviour, or is it a bug?
If you need more info, please ask me, I can even submit the .vcproj.
Thanks a lot
E.R.
|
|
|
|
|
Check the file dates and times of your source/include files. There's probably one or more file dates that are set in the future.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi,
I looked for files with a date in the future, but I couldn't find them.
Now I moved the project to sourcesafe 2005 and when I made "get latest version" the files result created today ( in the past, anyway ).
So now I think that's not the problem...
any other ideas?
Thanks
E.
|
|
|
|
|
Hi.
When I encountered the problem, it has always been due to corrupt file dates.
If that's not the case, I would recommend that you run the Make-command manually, usually there are a debug/verbose switch that you can use to find out the reason for your eternal rebuilds.
Good luck.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Solved!
Me stupid! My clock was one month behind... wrong date.
Thanks a lot.
|
|
|
|
|
That was a new cause of the problem (for me)!
But of course, it can give the same results.
I'm glad to be able to assist you.
Have a Happy easter, in case you celebrate it. Else, have a nice spring.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi all
How to get the total time of a wav file.
Please help me
|
|
|
|
|
Perhaps looking through the WAV format[^] would be of help, or maybe a quick search[^].
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for the reply
If i am having the forumala
Sampling rate * Bits Per Sample * Channels)/(Bits Per Byte) = Bytes Per Second.
eg If we are playing audio at 44,100Hz and we have 16 bit audio and 2 channels,
Collapse
(44100 * 16 * 2)/8 = 176400 Bytes Per Second
Is there is any use.
I can read the file size also from the header.
But what i actually need is the total time of the wav file.From header data, Is there is any method for calculating this or
Is there is any MFC classes for handling multimedia so that i can use any functions for getting the time period.
|
|
|
|
|
Deepu Antony wrote: Is there is any use.
I believe the formula is:
FileSize / (SampleRate * BytesPerSample)
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
That information i got from code project article
[^]
|
|
|
|
|
Thanks for giving your time.It was very easy.
The only thing has to do is to get the length of file name and divide it by bytes per second.
int length =file.GetLength()-44;//Header size
int dwTotSeconds =length/16000; //16000 bytes per second.
|
|
|
|
|
Hi all,
In my application for buttons control,i use the property Owner Draw for buttons and drive the variable of this button from CBitmapButton class.
and use image over the button control.
but here tabstop is not working.
please tell me Tabstop not working on buttons if i used image over it.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
If I can rephrase you question...
When I used a normal button, pressing TAB on my dialog selected the button.
I have changed to an ownerdraw style, and TAB no longer selects my button?
If that is a reasonable summary, then I bet you're wrong - I bet that the tab button is still fine, and if you press SPACE, the button will still work - BUT it's not drawing itself in a selected state. But that's your job now. You said "I'll draw you!".
The button will send a WM_DRAWITEM message, and that will point to a DRAWITEMSTRUCT structure.
DRAWITEMSTRUCT::itemState is a variable with bits used as flags, so you can do:
if (dis->itemState & ODS_SELECTED)
{
}
in your drawing routine.
Hope that helps,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hello everyone,
First time post here so please be lenient.
My question is in regards to a C++ syntax problem. I am trying to make a standard (DOS) program that can capture TCP/IP traffic. This will be an academic project between a friend and I.
Question is this; how do we go about getting the program to interface with the Layer 3 (network layer) to capture TCP/IP traffic?
We are also trying to figure out how to retrieve device properties and display them in the terminal. Information such as a standard input “ipconfig” to display the network adapter’s information.
This entire program will be in C++, using N++ for a editor and Dev++ for a compiler.
Please if there is any required reading you would recommend, please include it in your response.
Thank you very much in advance,
V/R
Rob&Big
|
|
|
|
|
it looks like you're attempting to write a driver/system like this :- http://www.winpcap.org/[^]
rbwest86 wrote: C++ syntax problem
dont understand what you mean here
rbwest86 wrote: standard (DOS) program
huh ? do you mean a console-mode executable ?
It really depends on what the purpose of the exercise is - you can waste a lot of time writing something as good as winpcap yourselves, and/or its cousin 'WireShark' for viewing the data
rbwest86 wrote: We are also trying to figure out how to retrieve device properties and display them in the terminal.
c'mon - google for it - there's plenty of examples out there, even some here on CP
|
|
|
|
|
Welcome to codeproject!
To echo Garth a bit:
c++ syntax has nothing to do with this. That's things like "How do I make a for loop", not "how do I access hardware to grab TCP/IP data".
Next, do you *really* mean DOS? Those installation disks must have been very dusty...
If you mean "I'm running windows, but I don't know about messages and things, so I just want a console program", then codeproject can help you.
Have a look in:
http://www.codeproject.com/KB/IP/[^]
I can see three articles in as many seconds, searching for "sniff":
Statistic consol sniffer – no driver installation is needed[^]
WinSniff :The packet capturing application for Windows[^]
Sniffing using Winsock[^]
That should keep you going a little while.
Other search term you might want to use is: "promiscuous". It's what a network card that's listening to *everything* is called.
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|