|
I'm having some trouble with screen flickering when the browser window (or active X test control container) is scrolled.
It is really quiet bad, Is ther any way to get better redrawing? with less flickering? I've tried some double buffering but it doesn't seem to work. Especially with the CDC that the OnDraw function gives me.
It is an MFC base Active X control.
Any ideas, would be great
thanks,
JAred.
|
|
|
|
|
try overriding the WM_ERASEBKGND. It might help.. If the control is in the whole window
|
|
|
|
|
Hi, thanks for the reply, But I've already done that, and it doesn't seem to make much of an improvement with or without it.
The main flickering occures when the container window (IE) is scrolled or resized.
I'm not sure what else to do, or if this is a common problem.
Jared
|
|
|
|
|
Hi,
I want to attach a small Dialog Box which I have built through resources to a CFileDialogBox() and then use it. How can I do it.?
Vikas
|
|
|
|
|
I was looking at my code and noticed a bunch of SQL calls in the middle of some of the business logic, and thought that they needed some cleaning up and refactoring. I was wondering if there was a design pattern of some sort that would be useful here.
Basically I'm looking for something that would work similar to the flat file serialization offered by inheriting from CObject and using CArchive to serialize the class, but am looking to instead serialize to a database.
Also, is there a framework of some sort available that supports class <-> ADO database.
Thanks!
|
|
|
|
|
Hello
how can set event at run- time for controls? for example: if i create a button at run-time, how do i "tell" it what to do when is will be clicked?
thanks
RG
|
|
|
|
|
Implement a class derived form CButton and the override the BN_CLICKED message in there. Create the object of this class then at runtime.
I hope u get this and it works;)
|
|
|
|
|
I have a stand-alone application which exports a class.
How can I load this exe-file statically like a normal dll? I need to create somehow the CDynlinkLibrary object to initialize the runtime-class stack...
|
|
|
|
|
|
int a = 10;
printf("a(dec) = %d\n", a);
printf("a(hex) = %X\n", a);
will output
10<br />
a
|
|
|
|
|
I look for a function that doing it
|
|
|
|
|
Hexadecimal, octal and decimal representations of numbers are used only when the number is converted to text for reading by humans. The computer always handles the number as binary. If you want to save it in a text file as hexadecimal, use the fprintf function instead of printf.
|
|
|
|
|
i wrote some code in destructor for the purpose of deletion after object have been used.
by the way, error is occured in "delete pObject" sentence.
i don't know why the sentence is happened.
the code is like the following.
********************************************************************************
CPerson::~CPerson()
{
for(int i=0; i< m_PtArray.GetSize(); i++) // m_PtArray is CObArray type.
{
CObject* pObject = (CObject*)m_PtArray.GetAt(i);
delete pObject;
}
m_PtArray.RemoveAll();
}
********************************************************************************
have a nice day
|
|
|
|
|
Why do you need to do the case ? Is it not a CObject * already ? If it isn't, then surely the wrong destructor is going to be called ?
Also, have you tried going in reverse order ?
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Try:
CObject* pObject
for(int i=0; i< m_PtArray.GetSize(); i++) {
pObject = NULL;
pObject = (CObject*)m_PtArray.GetAt(i);
if(pObject)delete pObject;
}
|
|
|
|
|
Hi all,
I'm writing program about database.
In my database i have 3 tables:
CDINFO, PERSON, GETGIVE
And i have 3 fields in CDINFO table:
FILMNAME ---> Text
FILMCODE ---> Integer
COUNT ---> Integer
I'm using of three objects of CDaoRecordset for opening each table ...
Now, i want to add new record in CDINFO:
COleVariant var;
char *szFilm = new char[50];
var.vt = VT_INT;
GetDlgItemText(IDC_EDIT1, szFilm, 50);
var.intVal = GetDlgItemInt(IDC_EDIT2);
m_rsCDINFO->AddNew();
m_rsCDINFO->SetFieldValue("FILMCODE", var);
m_rsCDINFO->SetFieldValue("FILMNAME", szFilm);
m_rsCDINFO->SetFieldValue("COUNT", var);
m_rsCDINFO->Update();
SetDlgItemText(IDC_EDIT1, "");
SetDlgItemText(IDC_EDIT2, "");
delete[] szFilm;
This code have not any error or warning, but when i'll running this code, program indicate to me error about: "Out of memory" !!!
Please tell me, what is my wrong ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I need to put a jpeg in a dialog , i used a CImgEdit .
when i use it in a regular mfc application it's working good,
but when i use it in a dll ( the same application but i changed it
from Exe to Dll ) it isn't working.
can someone help me ?
Thanks.
|
|
|
|
|
Hello all, I want to use microsoft's text to speech, to let my software speek, but I don't know how and where to get TextToSpeech API, can you help me?
|
|
|
|
|
http://www.microsoft.com/speech/
Tons of documents, downloads, and links from there. Good luck.
|
|
|
|
|
I am developing a chm help file tool, so I need a specification for .chm file, but I cannot find it in microsoft.com, any help?
Thanks!
|
|
|
|
|
What is the purpose of the .chm file? Is is specific to a particular program or something? That info sure would help me help you....
-Reid the C++/C# programmer
(Caution: I am a teenager, and that means that I think I know everything...but probably don't...)
Maybe this will help you understand:
CPerson Reid = "Teenager";
CPerson All_C_Programmers[9999999999];
int i;
int num_Programmers_That_Are_Teenagers = 0;
for (i=0;i<9999999999;i++)
{
if (All_C_Programmers[i]=="Teenager")
{
num_Programmers_That_Are_Teenagers++;
}
}
cout << num_Programmers_That_Are_Teenagers;
-------------
1 <------
|
|
|
|
|
how can i learn visual c++ in ashort way or in the long way
but not in along time.where can i get exampels an stuff?
thank you for your help
itai
|
|
|
|
|
This is bad, bad advice. Some of the books mentioned are good books, but no-one, repeat no-one should EVER set out to learn programming Windows without learning C++. In fact the Visual C++ in 21 days is a very simple book, it was my second. The reason I grasped it easily and this person obviously did not is not my stunning intellect ( ask anyone who has met me ), it's because my first book was C++ in 24 hours. Forget windows, menus and everything else until you know enough C++ to write a linked list, populate it from command line input and write it to a file. Once you know some C++, then you'll know half of the stuff in the Visual C++ book, and you'll be able to concentrate on the other half.
C++ is a language created by Bjarne Stroustrup, which amonst other things added classes to the C language. The C++ language does not know about MFC, you can write Windows programs in C++ without using C++, but MFC is a class library that *does* simplify Windows programming.
I'd also recommend buying books instead of downloading them - it takes forever and in the end they are not practical. The books I downloaded early on I either did not use, or I bought.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Thank you
You look very boring ...
AHMAD ALWASHALI
|
|
|
|
|
I'm sorry if you took my comment personally, but your advice *was* bad, and I'm also sorry that you think learning to program properly sounds 'boring'.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|