Click here to Skip to main content
15,888,803 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ToolBar 24-bit bitmap problem Pin
Mark Salsbery17-Dec-06 11:03
Mark Salsbery17-Dec-06 11:03 
GeneralRe: ToolBar 24-bit bitmap problem Pin
levelboy17-Dec-06 11:06
levelboy17-Dec-06 11:06 
QuestionHandles Pin
BlitzPackage17-Dec-06 6:46
BlitzPackage17-Dec-06 6:46 
AnswerRe: Handles Pin
CPallini17-Dec-06 7:33
mveCPallini17-Dec-06 7:33 
GeneralRe: Handles Pin
BlitzPackage17-Dec-06 8:38
BlitzPackage17-Dec-06 8:38 
AnswerRe: Handles Pin
Stephen Hewitt17-Dec-06 11:39
Stephen Hewitt17-Dec-06 11:39 
AnswerRe: Handles Pin
nmap.terren17-Dec-06 14:19
nmap.terren17-Dec-06 14:19 
QuestionHow to get the CEdit box to update Pin
FredrickNorge17-Dec-06 5:32
FredrickNorge17-Dec-06 5:32 
I am making a autoupdater, using a CEdit text box to show a logg during the update progress, however
only static_text and the progress bar updates as the tool runs the performed action, but only updates when the action is complete.

this code is called on each update stage, progress bar in the code bellow updates as it should, but not the SetWindowText, untill the "update button" function is complete.
void CAutoUpdaterDlg::OnBnClickedUpdate()
{
CEdit * s = static_cast<cedit *="">(GetDlgItem(IDC_STATIC_MSG));
s->SetWindowText("Please wait, update in progress.");
CButton *b = static_cast<cbutton *="">(GetDlgItem(IDC_UPDATE));
CButton *b2 = static_cast<cbutton *="">(GetDlgItem(IDCANCEL));
b2->EnableWindow(false);
b->EnableWindow(false);
sprintf(DynamicBuffer,"%s","Looking for updates...\n");OnUpdateScreen();
GetList(); // Downloads, test the list for readability

// Read the file into memory
file_LoadIntoMem("UpdateList.txt");
// Download the files read from the UpdateList
sprintf(DynamicBuffer,"%s","Downloading new content in progress...\n");
OnUpdateScreen();GetTheFiles();

// After reading it into memory, delete it.
CleanUp();

// Finaly enable the buttons again
b->EnableWindow(true);
b2->EnableWindow(true);
s->SetWindowText("");
}
void CAutoUpdaterDlg::OnUpdateScreen()
{
char LocalBuffer[10];
itter++; lineslimit++;
sprintf(LocalBuffer, "%d", itter);
CEdit * p = static_cast<cedit *="">(GetDlgItem(IDC_Window));
// static message for now
strcat(WindowBuffer, LocalBuffer);
strcat(WindowBuffer, ": ");
strcat(WindowBuffer, DynamicBuffer);
int Size = strlen(WindowBuffer);

p->SetMargins(5,5);

p->SetWindowText(Convert_A_To_DA(WindowBuffer));

CProgressCtrl * progress = static_cast<cprogressctrl *="">(GetDlgItem(IDC_PROGRESS));

progress->SetRange(0,MaxRange);Progress++;
progress->SetPos(Progress);

if (lineslimit == 11)
{
int size = strlen(WindowBuffer);
for(int i = 0; i <= size+1; i++ )
{
WindowBuffer[i] = 0x00;
}
lineslimit = 0;
}

int MemSize = sizeof(DynamicBuffer);
for(int i = 0; i<= MemSize+1; i++)
{
DynamicBuffer[i] = 0x00;
}
}
AnswerRe: How to get the CEdit box to update Pin
BlitzPackage17-Dec-06 6:52
BlitzPackage17-Dec-06 6:52 
GeneralRe: How to get the CEdit box to update Pin
FredrickNorge17-Dec-06 7:05
FredrickNorge17-Dec-06 7:05 
Questionpointers to functions Pin
emrah.a17-Dec-06 3:58
emrah.a17-Dec-06 3:58 
AnswerRe: pointers to functions Pin
Chris Losinger17-Dec-06 4:43
professionalChris Losinger17-Dec-06 4:43 
AnswerRe: pointers to functions Pin
prasad_som17-Dec-06 18:22
prasad_som17-Dec-06 18:22 
GeneralNeed Article Co-Author Pin
Jeffrey Walton17-Dec-06 3:09
Jeffrey Walton17-Dec-06 3:09 
QuestionDouble buffering in a wmp Visualization Pin
ceejeeb17-Dec-06 3:08
ceejeeb17-Dec-06 3:08 
QuestionBest way to interact with a C program Pin
Luís Brás17-Dec-06 1:59
Luís Brás17-Dec-06 1:59 
AnswerRe: Best way to interact with a C program Pin
Mark Salsbery17-Dec-06 8:58
Mark Salsbery17-Dec-06 8:58 
QuestionSend enter key? Pin
Larsson17-Dec-06 1:35
Larsson17-Dec-06 1:35 
AnswerRe: Send enter key? Pin
Daniel Kanev17-Dec-06 2:48
Daniel Kanev17-Dec-06 2:48 
QuestionDLL Coding Dilemma... Pin
Shy Agam16-Dec-06 22:52
Shy Agam16-Dec-06 22:52 
AnswerRe: DLL Coding Dilemma... Pin
peterchen17-Dec-06 0:04
peterchen17-Dec-06 0:04 
GeneralRe: DLL Coding Dilemma... Pin
Shy Agam17-Dec-06 0:18
Shy Agam17-Dec-06 0:18 
GeneralRe: DLL Coding Dilemma... Pin
peterchen17-Dec-06 0:46
peterchen17-Dec-06 0:46 
GeneralRe: DLL Coding Dilemma... Pin
Shy Agam17-Dec-06 1:56
Shy Agam17-Dec-06 1:56 
QuestionHow to save HBITMAP into *.png?? Pin
314159265316-Dec-06 18:05
314159265316-Dec-06 18:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.