|
When I saw first link on status bar I guess its acquainted both of them are nice
|
|
|
|
|
Hi all,
My application is an MDI application
I have an "open" button in one dialog box , which upon click, opens up a child window . But one i close the child window , i need to close the dialog also . I know that i should handle within the CChildFrame::OnClose() function,but i dont't know how to get the dialog handle and close it.
I have tried creating
CMydialog *dlg in the CChildFrame class
and invoking
dlg->ShowWindow(SW_CLOSE), but the dialog is not closing
Could you please tell me how to overcome this problem
|
|
|
|
|
Try dlg->DestroyWindow() instead.
You also have to delete dlg at some point unless you've taken the steps to make the modeless
dialog self deleting.
Mark
|
|
|
|
|
(Okie i have many a times heard that theres no such thing as a stupid question, so here goes)
Suppose the wav recorder api stores the sampled data over two characters. How do i read that sample into (one) float data type ???
|
|
|
|
|
Why do you want to use a float? if you want to store two chars into something, you can very well use a WORD. can't you? chars (ASCII) is 8 bits long, which is a BYTE. Two bytes can be placed inside a WORD. So you may consider this:
<br />
char c1='a';<br />
char c2='b';<br />
WORD w1,w2;<br />
<br />
w1=c1<<8;<br />
w2 = w1|c2;<br />
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
The two byte sample will be used for various mathematic manipulations so we need precision.
Could you also explain how the above code works ???
Thanks..
|
|
|
|
|
What precision values are you storing inside a 'char' ?? I dont understand you. Can you give me some sample data?
hey btw, the << , | thing, let me explain you.
<br />
00000001 - char1<br />
00000010 - char2<br />
Now,
A word is about 16 bits.
so A Word(w1)->00000000 00000000
push the char1 to the upper 8 bits
<br />
w1=char1<<8;<br />
now,
<br />
w1= 00000001 00000000<br />
Now, OR the char2 value
<br />
w1|char2;<br />
00000001 0000000<br />
00000000 0000010<br />
----------------<br />
00000001 0000010<br />
----------------<br />
Now you have the two values inside w1.
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
(I am not using it right now but) the wav recording API has an option for storing each sample's amplitude in either one byte or two byte. Now these amplitudes are to be mathematically manipulated several times later on. So if we do these operations on just 2 byte "data container" then i guess we'll loose lots of info.... so we need to convert the two byte samples into float data type. (Or maybe i'am not geeting things )
Anyways thanks for the help ......
|
|
|
|
|
You have any documentation online for that?
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Are there any GDI guru's out there who could possibly help me out a little? I'm trying to reduce the amount of drawing required within my skinned window by only drawing to invalid regions. The trouble is, GetUpdateRegion() always returns a RECT for the entire window. When resizing this is simply not true, there are a few moved/resized controls and the covered/uncovered edge of the window, but for the most part the window contents remain the same.
The window is created without the CS_HREDRAW and CS_VREDRAW and the only time I call InvalidateRect() or InvalidateRgn() is when the window and child windows are first created. I can't understand why I'm being forced to redraw the whole window when it's not required.
|
|
|
|
|
I have never used GetUpdateRgn(), I always use GetClipBox() for this purpose.
That being said, the update region is going to be the XORed total of all the individual update regions in the window, so if you have a small region to be updated at the top left corner of the window and another small one at the bottom right the total XORed region will be the entire window.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hello,
I start to learn Visual C++ .NET.
The first program I made (by a book)(MFC program) show me an error message:
" The NULL device is missing from your system. We are unable to launch a build. Project: error PRJ0015 "
This error occur when I want to build my project.
I tried to restart my computer and to re-install VS 2005, but the error continu.
I couldn'y find a practical advice in MSDN.
Please tell me what to do to fix this problem,
Reuven
|
|
|
|
|
According to this[^] link in MSDN either your computer has insufficient resources (not enough RAM etc.) to complete the task at hand or your user priviledges are set too low.
First thing to check is your user priviledges. If that does not help then make sure your PC meets the minimum requirements for VS2005.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
My computer is meets the MSDN minimum requirements.
About check user privilegs - please tell me how to do it, so I can check.
Thank you very much for answer,
Reuven
|
|
|
|
|
Assuming you are using XP
Control Panel
->Administrative Tools
->Computer Management
->System Tools
->Local Users and Groups
->Users
Find your user name in the list, right click, select "Properties"
Select "Member Of" tab
Which group are you a member of?
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I'm using win XP Home Edition.
In Local Users and Groups I don't have "Users" but in Users in the Control Panel I check, and my user have admin properties (There is only one user in the computer).
The VS still don't building my projects ....
|
|
|
|
|
I am sorry, but I have never had the problem you are encountering and other than my interpretation of what MSDN says about the problem I have no experience to guide you farther. I hope someone else on this board can help you.
I usually do not endorse cross posting but maybe you could try asking on the Visual Studio[^] forum if you do not get an answer here soon.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Thank you very much for trying helping me ! (-:
I'll ask in Visual Studio form.
Reuven
|
|
|
|
|
I found the way to fix the problem, and I've been started to learn VC++.NET.
The solution was:
1. In Computer Management, select device manager.
2. In View select show hidden devices.
3. Then you need to locate The Null device in the list of Not plug-and-play device managers.
4. As you find it you double-click it and validate it working properly and running (in device manager tab -> device status).
5. In the registry go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Null
and validate Hexadecimal-Value Named "Start" exists and had the value 1 (in hex).
If not - add it.
6. Restart your computer.
Now is the big problem :
========================
According to step 4 above, the Null device may not working properly (like I did).
To fix it you double-click it and choose to remove this device.
Then you doing steps 5 and 6 above.
After you restart the computer you need to run the Visual Studio Setup in repair mode - This will reinstall the Null device properly.
Restart your computer, hold up your fingers and pray to god when it restarts
After you restart the computer you can Build and even Run your C++ programs in visual studio !!!
|
|
|
|
|
Good stuff! Glad you got it working.
And thanks for following up by posting the solution to the problem. Now if anybody else ever has the same problem they can find the solution by searching this forum.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Why the variable bool is implemented as 8 bits ? 1 or 0 can we say it with 1 bit? or the minimum size the system can allocate comes in "Bytes" ?
|
|
|
|
|
Astricks wrote: the minimum size the system can allocate comes in "Bytes"
Yes, the smallest unit that the computer can store in memory is a BYTE. Although you can work with bits if you use the bitwise operators.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Imagine I have a string like "code,project,bob,vc++" and I have array or vector like
vector<string>vec_strings;
Is there any function that lets me break the words with "," delimiter and put them into the vector automatically? I prefer to use STL.
|
|
|
|
|
|
Hi friends,
I have a export function in the DLL.
When this function is to be called from other application,
it has to show the form in which the DLL was built with.
Can anyone help out?
For example
//DLLMain.cpp file
extern "C" __declspec(dllexport) void MyDLLFunction(double* Data,int nData)
{
//what code should I write to show the form
}
//GraphDlg.cpp
class CGraphDlg : public CDialog
{
// Construction
public:
CGraphDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CGraphDlg)
enum { IDD = IDD_GRAPH_DLG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGraphDlg)
public:
virtual void OnFinalRelease();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CGraphDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
|
|
|
|