|
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()
};
|
|
|
|
|
Show the dialog modal or modeless?
To do it modally, something like:
extern "C" __declspec(dllexport) void MyDLLFunction(double* Data,int nData)
{
CGraphDlg GraphDlg(NULL);
if (IDOK == GraphDlg.DoModal())
{
//user clicked "ok" - do something
}
}
You may want to pass a parent window pointer to the dll function so the dialog will have a parent.
|
|
|
|
|
As this function is called repeatedly in the calling program,
modalless dialog is needed.
<br />
CGraphDlg *pDialog;<br />
<br />
BOOL CMyDLLApp::InitInstance()<br />
{<br />
pGraphDlg=new CGraphDlg;<br />
pGraphDlg->Create(IDD_GRAPH_DLG,NULL);<br />
return TRUE;<br />
}<br />
<br />
extern "C" __declspec(dllexport) void MyDLLFunction(double* Data,int nData)<br />
{<br />
AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
pDialog->ShowWindow(SW_SHOW);<br />
}<br />
But this code does not show the window.
I get Assertion Error.
The calling application is a C program.
So cannot pass the window pointer to the dll function.
Thanks for your answers.
|
|
|
|
|
The assertion is probably because the dialog has not been created.
Where do you call pDialog->Create()?
Mark
|
|
|
|
|
Can anyone point me to a compiler that can compile a 16 bit dll for windows
Thanks
|
|
|
|
|
We use Microsoft Visual C++ 1.52. You can get it if you have an MSDN subscription.
|
|
|
|
|
Mike Dimmick wrote: You can get it if you have an MSDN subscription.
i don't any other way i can get it?
You can't see me
|
|
|
|
|
the old age borland's do that also i believe, but i don't know much, as i never really played with borland C++...
|
|
|
|
|
Borland Turbo C++ 3.0 is free for download, try to google it. You'll also need DOS or Win95/98.
|
|
|
|
|
I m doing a project on outlook recovery ie it will recover deleted mails from pst file
I m able to save those mails which are present in outlook through coding in msg format but not geting how to get deleted mails
Can anybody please help me in this
-- modified at 5:53 Saturday 28th October, 2006
|
|
|
|