|
Hi all,
I have a problem regarding performance of my application in which I have many images in tabpane in which user can select any tab and the appropriate result will be shown to the user respective to the selected tab in my MFC application.
But when user made click on that there is much fluctuation to display data and it takes long time to display a single text line.
I have loaded images by the following code:
m_btnHelp.SetButtonStyle(BS_OWNERDRAW);
m_btnHelp.LoadBitmaps(IDB_BTN_MAINHELPD,IDB_BTN_MAINHELPH,IDB_BTN_MAINHELPD);
So, can any one help me to solve this slow performance problem
or anybody knows how to load this images and open respective pages fast.
Thanks in advance!!!
|
|
|
|
|
I think you are redrawing to much. Or what else are you doing in your drawing code?
Greetings from Germany
|
|
|
|
|
Hi
I can't get your point what is redrawing means???
|
|
|
|
|
You wrote: "much fluctuation to display data and it takes long time to display a single text line"
it sounds like you draw or Invalidate() to much. Make a breakpoint in your drawing code or TRACE-statement.
Greetings from Germany
|
|
|
|
|
Hi,
Thanks for giving me your valuable time....
I have made a simple application in which if user clicks on one button then the respective page will open.
In that page I have put some buttons and at last I have attached some images to that buttons.
So, while I am clicking on the main button then the next page in which I have attached images will open after 2-3 seconds means fluctuation is displayed images are not loading fast.
So, can you please tell me where I am wrong from which I am suffering from this problem.
Thanks again
|
|
|
|
|
You need to load the images before you display the dialog. The OnInitDialog() Function is a real good place.
I would strongly advise you to learn a lot via downloading samples from CP.
Greetings from Germany
|
|
|
|
|
Hi,
LoadBitmaps belongs to CBitmapButtons right, where it resides in page or you are using it instead of Tab control
for CBitmapButtons i think BS_OWNERDRAW has to be set in Create.
|
|
|
|
|
hi sir,,
iam displaying files on the list view ... like file1,file2 ...etc.
after that iam providing multiple selection files on list view.
that is ok.. no problem. then what problem is i would like unselect the files
which files are selected.
plz give me reply
Regards,
Srinivas
|
|
|
|
|
Try this...
POSITION pstPos = GetFirstSelectedItemPosition();
while( pstPos )
{
const int nItem = GetNextSelectedItem( pstPos );
SetItemState( nItem, 0, LVIS_SELECTED );
}
|
|
|
|
|
Hi,
How can I get the System Harddisk Serial Number in MFC. I need HD Serial number for Security isssues related to my project.
Thanking You
with regards
swamy
|
|
|
|
|
Either can use WMI or have a look at this[^] article by dmihailescu.
Though there is some .net related stuff, it uses native API's to extract required information.
Prasad
MS MVP - VC++
|
|
|
|
|
|
Hi,
Can anybody pls tell me how to handle Exceptions in Constructor,in MFC?
Thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
what's the problem exactly ?
can't you just handle it as you do anywhere else ?
moreover, if you have an exception in a constructor, it's probably that an error occured and your object might not be constructed correctly... so think twice before catching there.
|
|
|
|
|
Hi all,
I keep getting this exception:
First chance exception at $7C812A5B. Exception class EOSError with message
'System Error. Code: 1400.Invalid window handle'. Process Application.exe (2932)
I have no idea where the exception takes place cause my compile open some funny code that I'm not familier with. does anyone know how to handle such an exception, or maybe what I'm doing wrong.
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Maybe posting relevant code (your not the one VS IDE prompted) will help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: Maybe posting relevant code
Don't know what code to post, cause I'm note sure where the exception occures, thus posting code would won't help. But I presume that the exception occurs on the OnClose of the form .... right ?
Thanks for the response
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Can you show code snippet?
|
|
|
|
|
When you debug the application and the exception occurs, what does the call stack look like? Can you find any code that you recognize in the call stack? Post that code in that case.
Otherwise you have to explain what you're trying to do when the exception occurs.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
Programm3r wrote: for some or other funny reason...the exception is not occuring anymore.....it would seem like the problem is solved.
Ohh, the error has corrected itself...
I just love self-correcting code.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
My code:
<br />
CString cstr;<br />
<br />
char s[8];<br />
byte b[8]; <br />
<br />
...<br />
<br />
cstr.Format("%s", s);
cstr.Format("%s", b); <br />
What class, template or object can store byte array like Cstring stroe string?
Thanks!
|
|
|
|
|
You can use CArray<unsigned char> or (better) std::vector<unsigned char> .
hanlei0000000009 wrote: cstr.Format("%s", b); /* compile no problem, but content is different between cstr and b */
What are you trying to do? (i.e. you probably have to write your own function to obtain the string representation of the array content...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hanlei0000000009 wrote: What class, template or object can store byte array like Cstring stroe string?
CByteArray.
|
|
|
|