|
tasleem143 wrote: fake char like BM p ?
Last time I checked, B, M, p, and ? were all real characters. What exactly are you referring to?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i want to see the exact fields values present in the bitmapfileheader and bitmapfileinfo,when i read bit by bit from hard disk using fread etc then those values are not matched with the current i mean read through memory values i want that both should match so that i m confirmed that these r valid values from memory.
Tasleem Arif
|
|
|
|
|
tasleem143 wrote: i want to see the exact fields values present in the bitmapfileheader and bitmapfileinfo,when i read bit by bit from hard disk using fread...
So why aren't you doing something like:
CFile fileBitmap;
BITMAPFILEHEADER rBitmapFileHeader;
BITMAPINFOHEADER rBitmapInfoHeader;
fileBitmap.Open(strFilename, CFile::modeRead);
fileBitmap.Read(&rBitmapFileHeader, sizeof(BITMAPFILEHEADER));
fileBitmap.Read(&rBitmapInfoHeader, sizeof(BITMAPINFOHEADER));
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thanks for replay!
i had done that b4 and it works,The purpose of reading from memory n displaying was that i want to confirm that bitmaps is correctaly copied in memory, and purpose of displaying through cout<< was that i m varified that both outputs are same, and if i perform the operations like changing its bits from memory then get the correct bits to change.
what i m doing i had read the file from disk through 2 methods
1.as u mentioned above and it works fine reading byte by byte or structure but this method is slow as i had to read the whole image byte by byte and it will take lot of time.
2.Through second method i m reading the whole image once not like byte by byte as method 1. i.e
file.read(buffer,filesize);
what i m doing is displaying the data using cout and confirming that both workd fine or not.
hope now u understood the situation.
Tasleem Arif
|
|
|
|
|
Is anyone kindly to tell me how can i save and resotre the child frames that last opened in a MDI program?
In the Main Frame,left side is a Tree Pane,when we selected a tree item and double click,it will create a corresponding child frame,The Child Frames are created dynamicly. When i close the program ,i need to save the status of the opened frame and open them the next time i start the program.
Is anybody can give me an example?
|
|
|
|
|
If I understood you want to save current status of your program you can save parameters to a file or on the registry and when you want to run your program first you read parameters and set your program to it.
|
|
|
|
|
How can A maximaze a dialog at runtime?
|
|
|
|
|
no need to reask
|
|
|
|
|
Is ShowWindow(SW_*) helpfuls ?
|
|
|
|
|
How can I at runtime maximaze a window?
|
|
|
|
|
use CWnd::ShowWindow(SW_SHOWMAXIMIZED);
|
|
|
|
|
Error on SW_MAXIMIZED way?
|
|
|
|
|
Larsson wrote: Error on SW_MAXIMIZED way?
what error ? i don't even understand your post...
|
|
|
|
|
If I use CWnd::ShowWindow(SW_MAXIMIZED);
I get;
error C2065: 'SW_MAXIMIZED' : undeclared identifier
Do I need to use something else?
|
|
|
|
|
fixed. use SW_SHOWMAXIMIZED instead...
|
|
|
|
|
|
toxcct wrote: use CWnd::ShowWindow(SW_MAXIMIZED);
Perhaps you meant SW_MAXIMIZE or SW_SHOWMAXIMIZED .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
you're right, i typed from my head...
fixed now.
|
|
|
|
|
|
for example:
dlg.SendMessage(WM_SIZE,SIZE_MAXIMIZED,0);
you can try this.
|
|
|
|
|
I want to use Updatedata() in Thread function
I write the code below but compile error
UINT Thread1(LPVOID pParam)
{
CTestDlg *m_dlg = (CTestDlg*)pParam;
UpdateData(TRUE);//error
AfxMessageBox(m_dlg->m_edit);
return TRUE;
}
|
|
|
|
|
Max++ wrote: UpdateData(TRUE);//error
good...
now, can we know the error message ?!
|
|
|
|
|
First, it would be nice that you provide ALL the information, that is also the error message.
In your case I suppose the problem was because UpdateData was not recognized and that's logical because UpdateData is a function from a CDialog class and your thread function is a global function. And also, it is a very bad idea to 'update' data inside another thread than the main thread (the one that manages the GUI). Instead, send a user defined message to your dialog class so that, upon receiving this message, you can update your data inside the main thread.
|
|
|
|
|
Maybe instead of
UpdateData(TRUE);
you should try this:
m_dlg->UpdateData(TRUE);
I hope this helps. Note that not all of MFC functions can be used from different threads.
|
|
|
|
|
i don't think m_dlg is visible, as used within a global function...
|
|
|
|