|
You got your answer!! What about the people who are sensible enough to use the search feature wanting an answer to the same question? Because of some silly little child, you, they will never see the answer!
|
|
|
|
|
Ok..I m sorry..See my Question " Selection change in dialog box " and if possible then try to come out me..
Thanking you ..
Shah
|
|
|
|
|
|
Don Box wrote: Plzz, make u question easy to be understand.
Please add the reference of your question so that other can view it..
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Do you have problem with dll files?
|
|
|
|
|
Hi,
I am new to VC++ programming. I want to use double buffering in VC++ .Net 2003 MFC Dialog application. Please help me to learn this technique.
Thanks in advance.
|
|
|
|
|
Is this a problem or a question?
Double buffering is where you create a bitmap and draw everthing you need to that instead of to the DC like you normally would. You then draw everything to the DC at once, reducing flicker. You only need to use a double buffer if you are doing any drawing to the screen.
|
|
|
|
|
what is your case, and what have you tried already ? (have you googled some solutions already ?)
|
|
|
|
|
In double buffering, first we write to memory dc (First buffering), then by copying whole memory to the output device (monitor)(Second buffering).
Come online at:-
jubinc@skype
|
|
|
|
|
BHBagadiya1 wrote: am new to VC++ programming. I want to use double buffering in VC++ .Net 2003 MFC Dialog application
If you are new then how do you know you want to use double buffering?
Most of us assume you are referring to double-buffering display data. Is that the case?
Mark
|
|
|
|
|
|
Hello ,
I have a application MFC SDI application that work good but I have installed my application on a other computer and now this fonction return FALSE:
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
return FALSE;
}
What can I check to fix the problem.
Thank you for help
AutreChien
|
|
|
|
|
NorGUI wrote: have a application MFC SDI application that work good but I have installed my application on a other computer
What do you mean by installed ?
NorGUI wrote: CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) {
return FALSE;
How you come to know this funcion is failing ?
|
|
|
|
|
Installed was only copy the .exe on the other computer
I know that LoadFrame return FALSE because I have put a AfxMessageBox() inside this test.
I have make some test and now I have finaly found my problem it was a com MSCOMM32.ocx that was not realy good installed of the other computer and the initialisation of this control was in Create() fonction from the Mainframe. I have reinstalled the OCX and now it work.
Thank you !
AutreChien
|
|
|
|
|
i use vc2005. when i debug in a function,the cursor doesn't piont to the excuted line. it piont to other lines before the excuted line. this has happened both in my own functions and functions of mfc library.
i am using c++,mfc, xp professional sp2, and compiling with /Od (Disable optimization) . i clean the solution, and rebuild it. it don't become normal. how shold i do?
|
|
|
|
|
This often happens when you change the source code files outside of VS, the .obj files produced by the compiler don't allign with the .cpp files. VS only checks for changes of code, not comments or white space.
Try deleting the Debug folder and perform a full rebuild of your exe, dlls and libs.
|
|
|
|
|
This happens when the code compiled from and the code-file displayed are different.
Somewhere upstream, a line has been deleted (and probably other lines have been rewritten). So the debugger, brainless as it is, displays the source line it gets from the PDB, which is not the one it should have been displaying.
Do you have installed several VC++ in parallel and are shown the wrong one?
Do you edited your file and did not recompile?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Try closing your project and deleting the .ncb file. Re-open the project and the .ncb file will be rebuilt, and I believe you may be OK after that.
Good luck.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
How can I click programmatically on a button on my form ?
|
|
|
|
|
Hi,
you call the function that realises the code which would be executed on a click.
for example :
if(cond)
OnBnClickedRefreshButton(); --> simulates the click on the RefreshButton ( the click-handler must be set )
void MyWindow::OnBnClickedRefreshButton()
{
// code
}
|
|
|
|
|
Show me those codes so to simulate the click, that's my problem
|
|
|
|
|
totally without the ressource-manager
in the header of the view :
CButton MyButton
.
.
afx_msg void OnBnClickedButton();
in the .cpp File :
BEGIN_MESSAGE_MAP(MyView, CFormView)
.
.
ON_BN_CLICKED(777, OnBnClickedButton) --> it's better to replace 777 with a #define ID_MYBUTTON 777 in your header
.
.
END_MESSAGE_MAP()
.
.
int MyView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFormView::OnCreate(lpCreateStruct) == -1)
return -1;
// Creation of a dynamic button
MyButton.Create(_T("Click me"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
CRect(10,100,100,130), GetParent(), 777);
}
void MyView::OnBnClickedSuche()
{
MessageBox("You clicked me");
}
If you click on the Button, the application knows that it's the control with ID 777, so it
looks into the MessageMap and sees that an OnClick on ID 777 must perform the function OnBnClickedSuche()
So he steps into it
If you like to launch this function yourself, you need simply to call
OnBnClickedSuche();
thats all
i hope that helps you
|
|
|
|
|
Send a message to the window specifying BM_CLICK
SendMessage( hWndOfMyButton, BM_CLICK, 0, 0 );
|
|
|
|
|
This is a little bit unsafe, since if the button doesn't has focus, it won't work unless you explicitly set the focus on the button prior to calling ::SendMessage .
It will cause the button to receive WM_LBUTTONDOWN , WM_LBUTTONUP and the parent of the button to receive a BN_CLICKED notification.
You might want to consider sending a WM_COMMAND message instead to the parent window of the button. In that case the hi-order word of the wParam argument shall contain the notification code, e.g. BN_CLICKED , and the low-order word shall contain the ID of the button.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|