|
I think u forget to remove from dsp.
Remove those files from the tree view shown on VC6.0 IDE.
Величие не Бога может быть недооценена.
|
|
|
|
|
DougButtimer wrote: The dsp file references the class sources files that have been romoved, but I'm not allowed to edit this file.
Why are you not allowed to edit this file. You don't need to edit it manually, you only have to open it with visual studio and your full project will be loaded. Then in the workspace tree you simply have to delete the files, they will be removed from the build.
|
|
|
|
|
Adam/Cedric, Thank you for your advice ! All fixed now - put it down to ignorance !!
Doug
|
|
|
|
|
Hi,
I have developed a SDI application and split it into two parts. One part is simple view and another part is form view, in which i have select a dialog as child.
My problem is, I can't change the background of dialog and some 'static text' controls color.
I have used
SetDialogBkColor(RGB(255, 0, 0), RGB(0, 255, 0));
in app class. But its not working.
Pls hlp.
Thanks in advanced
|
|
|
|
|
To change the color of a static control do that in WM_CTLCOLOR [^]message
|
|
|
|
|
Hi,
Not only controls color, but also want to change the background color
|
|
|
|
|
m_mun wrote: want to change the background color
Create a solid brush in FormView's OnInitialUpdate m_wndbkBrush.CreateSolidBrush(RGB(0,255,0)); , and use this in OnEraseBkgnd overload of FormView.
void CxxxFormView::OnEraseBkgnd(CDC* pDC)
{
CFormView::OnEraseBkgnd(pDC);
CRect rect;
GetClientRect(rect);
pDC->FillRect(&rect, &m_wndbkBrush);
return TRUE;
}
modified on Monday, December 7, 2009 5:09 AM
|
|
|
|
|
Thanks, it changes the background color
modified on Monday, December 7, 2009 5:52 AM
|
|
|
|
|
Whenever i scroll down, the other portion does not changes. How can i do that?
I have used
void Cxxx::OnDraw(CDC* pDC)
{
CFormView::OnEraseBkgnd(pDC);
CRect rect;
GetClientRect(rect);
pDC->FillRect(&rect, &m_wndbkBrush);
return;
}
|
|
|
|
|
Madhu already mentioned that you must do this in OnEraseBkgnd instaed of OnDraw()
-Sarath.
Rate the answers and close your posts if it's answered
|
|
|
|
|
m_mun wrote: CFormView::OnEraseBkgnd(pDC);
You do not call this within OnDraw() .
"One man's wage rise is another man's price increase." - Harold Wilson
"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
|
|
|
|
|
I have created a new class for form view. There is no msg handler for OnEraseBkgnd
|
|
|
|
|
m_mun wrote: There is no msg handler for OnEraseBkgnd
OnEraseBkgnd() is the message handler for WM_ERASEBKGND .
"One man's wage rise is another man's price increase." - Harold Wilson
"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, but it is not displayed
|
|
|
|
|
As Madhu mentioned, WM_CTLCOLOR is not only for controls, but also for the dialog.
When the wParam is CTLCOLOR_DLG , you can return a brush for dialog box color.
Please read the documentation. It says it all.
|
|
|
|
|
i created a project which based win32, and i'll plan to create a mfc-dll for calling in win32, could this idea be implemented?
can you give me some similar code or related articles, thank you very much!
|
|
|
|
|
I guess you can call an MFC DLL from a Win32 application.
You should actually try it.
|
|
|
|
|
nenfa wrote: can you give me some similar code or related articles
Here is a sample article for calling a dll function[^] in C++
|
|
|
|
|
thank you, but it can fit my request, i real demand is to use controls like CSlider which are implemented in MFC-Dll
|
|
|
|
|
i have defined the macro which names M_DEBUG(str, msg),
now i want to rename the M_DEBUG for special usage, and i do like this:
#define _M_DEBUG(str, msg) M_DEBUG(str, msg)
but it happens that "_M_DEBUG" : undeclared identifier, why?
|
|
|
|
|
sorry, it can do!
i just used error macro-name
|
|
|
|
|
Does anyone know the fix for Windows Explorer when dealing with setting (re-setting) permissions?
I've changed this folder numerous times from Read Only clicked the applied button selected the applied to sub-folders and files. But when I again check it it is again Read Only. How do you fix this? I checked the Security tab and "Full Control" is under all available selections. What is stopping my selections?
A C++ programming language novice, but striving to learn
|
|
|
|
|
It is probably also a system folder which is why you're not able to remove its read only property.
If it is a system folder, it is not a good idea to change its attributes.
However, if you still want to change it, here is something you can try.
Open a command prompt with elevated privileges and change to the folder.
Try the command attrib -r -s *.* /S /D
|
|
|
|
|
Hi, I would like to do the following:
Allocate datas in a dll and then free them in the main application.
I have read there are potentials problems doing this because dll and process don't share the same memory, it depends on the compiler,... don't do this - ok.
So I was looking for a solution and I went accross the Heap functions.
It seems that when I allocate memory like this:
HeapAlloc(GetProcessHeap(),... the default Heap is used to store the memory. Then the dll and my application will share the same Heap for that data.
So they share the same Heap, but I still wonder if it safe is to call HeapAlloc from the dll and HeapFree from the application for the same data ?
Any idea ?
Yarp
http://www.senosoft.com/
|
|
|
|
|
why can't you provide your own FreeMyDllObject() funtion inside the DLL, matching the way your DLL code allocates its stuff. Then the caller doesn't have to know the messy details, and there is less dependency between EXE and DLL. Later on, you could even change your DLL's memory management without changing the EXE at all.
|
|
|
|