|
I think your project settings are getting changed. sometimes
it happens with the VS. I think there is problem with the dsp file
i am not sure of it in your case.
|
|
|
|
|
Hi everybody,
i try to realize a buffered drawing.
My default DC is monochrome, so i have a black background at place of a light blue background,
how can i change specially the background or set the DC to a non-monochrome format?
Big thanks
|
|
|
|
|
The default bitmap for a new DC is monochrome, which explains what you're seeing. You need to create a bitmap that is compatible with your original screen DC - see CreateCompatibleBitmap() - and select that into the memory DC.
|
|
|
|
|
Thanks for your reply
I use the BufferDC class from this article:
http://www.codeproject.com/gdi/bufferdc.asp
There is a CreateCompatibleBitmap() used in the MemDC Class and
the corresponding Bitmap is created.
I color up the background at OnCtlColor.
|
|
|
|
|
Hi,
i have slider control in my dialog and i need to link this to system volume.. so that i can vary system volume from my dialog itself...
any ideas and links please share it.......
Harsha
|
|
|
|
|
Is it such an impossible thing... not a single reply...
Harsha
|
|
|
|
|
It is not so impossible. It's just that most people are not interested in doing searches for you that you should do yourself.
|
|
|
|
|
|
Here is a starting point.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thanks a lot.. i came across same link yesterday and could do it.. and now am assured what i have done is indeed a correct way... thanks
Harsha
|
|
|
|
|
Hi: How can i code a dialog box without using the wizard? I have tried inserting a resource but with no success. Pliz help.
TreeS
|
|
|
|
|
You can right click on the resource window and select Add resource and and select Dialog and click New button
|
|
|
|
|
When you insert dialog to your project its invisible you can set visible to true of property window or use of ShowWindow or when you want to create it use of WM_VISIBLE
|
|
|
|
|
Wamuti wrote: I have tried inserting a resource...
But did you add any code so access said resource?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am using directx 9 and I am wanting to create a billboard in my program.. I understand that in 3d programs billboards are used for fire, explosions, trees, ect... and they can rotate with the camera view to give a 3d effect...
I know there was an example with directx 7.
Does anyone know were I can find an example of fire or something in 3d?
or point me in the right direction?
I know they use 2d bit maps/sprites-or is that all it is?
Thanks for any help given...
|
|
|
|
|
I have seen this question before ,but i dont get the answer i want.
I develop programme with VC6.0 SP6.When i export a modal dialog in MFC extension DLL , i get the Debug Assertion.The most weird is when the DLL and the app(which uses the dll)are both Debug or Release Edition , every thing goes well.But when the DLL is Debug Edition while the App is Release Edition, i get a Debug Assertion Failed at AfxGetResourceHanle .What causes this happen????
I need your help~~~~~~~~
Thanks in advance.
|
|
|
|
|
What line of what file is asserting?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thanks for your reply.
The Debug Assertion occurs at line 22 in AFXWIN1.INL,
//
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle() //line 21
{ ASSERT(afxCurrentResourceHandle != NULL); //line 22
return afxCurrentResourceHandle; } //line 23
//
I think it must be a abnormal initialization of module state in App.But i dont know how to fix it.
|
|
|
|
|
In your exported Test() function, do you have the following as the first statement:
AFX_MANAGE_STATE(AfxGetStaticModuleState());
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
for the purpose of test , i created a compeletly new MFC extension DLL project and a accompanying MFC EXE app which implicitly loads the MFC ext DLL .Then i insert a Dialog resource by using wizard and dynamically create a instance of class CDialog using the dialog resource i inserted before. After that , i invoke the DoMdal() method of the CDialog instance and wrapped this invoke into a exported function named Test . Then , rebuild and produce the debug edtion of this DLL.
In the app , i just call the function Test . Of course , the app is release edtion. Then , run the app , and the debug assertion occurs.
just before the invoke of DoModal() function ,i insert a statement :
//
AFX_MODULE_STATE *pState = AfxGetModuleState();
//
Run debugger , I found that resource handle ,moudle handel , and winapp object..ect , all were NULL.So this could explain why the debug assertion raises. Then , i change the app into debug edtion , and found that all the fields in the AFX_MOUDLE_STATE were correctly filled.
how could this happen??!!!!!!!
|
|
|
|
|
Now faced with the same problem. Tell me, how did you solve it (if you figured it out)?
|
|
|
|
|
i have to create a delay message box ie to display a message with some time delay. how to do this. pls help me.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Your question is very unclear. The basic approach to this sort of problem is to consider the functions you need to call to make the message box do what you want, then use WM_TIMER messages to make this happen. Lookup CWnd::SetTimer and CWnd::OnTimer in MSDN and then try to make something work.
I assume that you searched codeproject, so the article "Delay MessageBox with auto-close option" is not what you want. If it is, I think it would be good practice for you to find it.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
thanks i got a sample project here.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
As previous poster, I'm not sure about your question. But my guess is , you are looking for something similar to Delay message Box[^], by Shog9, Nishant Sivakumar .
Prasad
MS MVP - VC++
|
|
|
|