|
I have a dialog in my MFC app with a toolbar. Each button has an icon with text underneath. On one button click I want to toggle the dialog state, and show different text on that button.
I've got it working with SetButtonText, but my buttons resize themselves automatically when this functions is called. I'd like to set my button widths to the widest value initially and have them stay that way, so it looks like only the text is changing.
Does anyopne know how to stop the buttons resizing themselevs?
Dan
|
|
|
|
|
Hi,
I konw this is a very stupid quetion, i am so confused at this moment.
Is a binary file a sampled file?
I mean when i have a binary file do i need to sample it again? Or i just take it a an already sampled file in VC++.
Thx
F.K
|
|
|
|
|
flora_k wrote:
Is a binary file a sampled file?
What do you mean by sampled file ?
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
If the binary file contains data, you may have sampled data
in the binary file. How are you getting your data? How often are you sampling it? You should know a bit about the data as well - is it voltage vs. time, height vs. position...?
I don't know exactly what you are doing, but I will give you a brief
explanation of data acquisition and hope that clears your confusion. I am not sure what type of data you have exactly, but that shouldn't matter.
Data sampling is generally an attempt to take discrete samples (or data) of a 'continuous' function. Sampling is generally done at some
regular spacing or interval (ie: frequency). In order to avoid the problems of 'undersampling' (taking too little) or 'oversampling' (taking too much) data is usually obtained at the Nyquist frequency. This helps to avoid trouble later on.
Anyways, the whole goal is to obtain an approximation to a continuous function by taking (sampling) data at discrete and regular intervals. Thus you have an approximation to the function on which you can perform various operations, statistical analysis, Fourier analysis, the list goes on...
Hope that helps...
|
|
|
|
|
Hi,
Thanks for the explantion on sampling, i get it clearer now.Here is the situation. I have created a binary file in Matlab (very simple) and i am using that binary file in my C code via an appropriated interface.
I have a sampling rate,but i wanted to know if i have to sampled that binary file with the specification i got or it is already sampled(?) somehow.
Thx
P.S: It sounds confusing because i am interfacing matlab in VC ++
F.K
|
|
|
|
|
Are you trying to read the data from the Matlab file
into vc++?
I guess what I mean is that you have sampled data in a Matlab
binary file and you would like to get at the rows and columns,
right?
You would like to convert from Matlab binary to floating point in vc++?
For example from binary to something like:
time Voltage
0 7
1 6
2 5
3 4
4 3
5 2
6 1
7 0
Is that correct?
|
|
|
|
|
A binary file, unlike an ASCII file, contains more than plain text. And if it is sampled or not depends on the program that created that file. If you would have a normal text file you could open it with notepad, for example, and see what it contains. But with a binary file it is much more difficult to know...
Sampling, in DSP is a way to describe a signal that you are sending or receiving. Using filters you take away noises that don't belong to the signal. To get that noise away you many times do Fourier Transforms so that you see the signals frequencies.
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving her *c.* and Deb scoffing chocolates in the corner.
...Good heavens!
|
|
|
|
|
In one of the projects that I'm working on, whenever I open the workspace, the IDE can't remember/open the files I was working on the last time. I get a message "Not all of the windows in the workspace could be opened" or something, and of course none of the windows (files) that I was working on the last time are open. This happens only in this one project, all others are fine. Since I need to keep several files open at the same time, it's a hassle trying to remember where I was and what files were open each time. It's driving me nuts. Is there anything I can do to correct it?
I'm using VS6, SP5.
Thanks.
Regards,
Rohit Sinha
Do not wait for leaders; do it alone, person to person. - Mother Teresa
|
|
|
|
|
Already try to delete the .ncb file ? Close VC++, delete this file, reopen VC++, load your file that have to stay open, close VC++ (also make sure in the options that you have the checkbox for reopening files "as they were when workspace got closed"), and reopen.
If this does not work, check if the date of your files are not in the future.
~RaGE();
|
|
|
|
|
I tried what you told me, but it didn't work, unfortunately. Even the dates are alright, as they should be.
Rage wrote:
also make sure in the options that you have the checkbox for reopening files "as they were when workspace got closed"),
I didn't find any such checkbox in the options. Where is it?
Regards,
Rohit Sinha
Do not wait for leaders; do it alone, person to person. - Mother Teresa
|
|
|
|
|
Hi world,
Does the ShellExecute function works in a console application?
The first argument of the ShellExecute function is the Handle to a parent window... but a consol application doesn't have window handle!!!
I only want a solution for running an application (exe with argument) in a console application!? What's the simplest solution?
Hello World!!!
from Raphaël
|
|
|
|
|
yes it works. While a console has now window you can do one of two things: 1) pass NULL, 2) pass the result of ::GetDesktopWindow(). The only thing that HWND is for is act as the parent window for any other windows that come up as result of your execution. If what you are executing has no windows it doesn't matter all. If it does they will just be directed to the desktop.
Hope that helps.
Joseph Dempsey
joseph_r_dempsey@yahoo.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Thanks for your reply...
(I've replied to myself too )
Hello World!!!
from Raphaël
|
|
|
|
|
OK... I've found the solution by myself...
simply use NULL for the first argument of ShellExecute
Hello World!!!
from Raphaël
|
|
|
|
|
I am not sure how correct this is, but when I don't have my own window I often use GetDesktopWindow().
|
|
|
|
|
I want to create a pop menu which items are buttons but not general ones,such as buttons on the photoshop's tool panel:hide multibuttons into one,and when u click(LbuttonDown i mean) it the others pop up so u can select .Further more these buttons on the popup panel(or menu)have different states too.i don't know if i discribed this problem clearly.Who can give me some tip?Thanks a lot!
|
|
|
|
|
Does anyone know where to get the source for this algorithm?
I've searched on the web, but there's nothing but science papers on the algorithm which only compare it to other algorithms.
So if any one has it could ya lend us a hand and pass it on, please. Even if you have it in a different language it will be fine.
Thanks,
Thomas
|
|
|
|
|
Hello
In project which designed in VC6, when i write any object then the member variables and functions of this object are written or appeared automaticly as in VB6, but this nice feature doesn't work in all functions .
How can I solve this problem?
Best Regards
|
|
|
|
|
Are you talking about Intellisense?
|
|
|
|
|
yes
Best Regards
|
|
|
|
|
Tools, Options, Editor tab, Statement completion options. If it is not working, it usually means the code has a syntax error.
|
|
|
|
|
I think so because I can get the members list in some funcions that decleared as virtual function and I cann't in other functions that decleared as afx_msg function. I donn't know why
Best Regards
|
|
|
|
|
I'm having a serious amount of trouble interpreting some data in an AS400 database file.
If I look at the Binary representation of the data in the AS400, I see
(The values are vertical/columns)
Example 1:
<br />
001<br />
10F<br />
Now on the AS400 this = 1001
When I pull this data to Windows, I get Hex(01 00 1F) or 65567
Example 2:
<br />
000<br />
01F<br />
Now on the AS400 this = 10
When I pull this data to Windows, I get Hex(00 01 0F) or 271
Example 3:
<br />
001<br />
00F<br />
Now on the AS400 this = 1
When I pull this data to Windows, I get Hex(00 00 1F) or 31
Now the project at hand is build a utility that will extract this data, and populate a perform value analysis on this.. But I can't figure out an algorithm which will convert this so something useful.
Has anyone got any clues about converting this?
|
|
|
|
|
Don't you need to convert from EBCDIC to ASCII?
|
|
|
|
|
I hope it's as simple as that.
ALthough from the reading I've done.. EBCDIC isn't that easy to convert from.
I could be due to the fact the AS400 (rpg) programmers don't really know how it(as400) packs the data, it just "is"
|
|
|
|