|
I'm new to Visual C++ and am having problems getting your suggestion to compile. This is the routine that I call initially to paint the screen and then to subsequently update the screen.
int PaintScrn ()
{
pdash_Line = dash_Line;
memset(pdash_Line,'-',300);
//--------- Line 1 ----------------
TextOut(hdc,Col_1,Line_1,"Code Directory",strlen("Code Directory"));
TextOut(hdc,Col_2,Line_1,":",1);
if(strlen(code_dir) == 0)
{
TextOut(hdc,Col_3,Line_1,home_dir,strlen(home_dir));
}
else
{
TextOut(hdc,Col_3,Line_1,code_dir,strlen(code_dir));
}
//--------- Line 2 ----------------
TextOut(hdc,Col_1,Line_2,"OVL File :",12);
TextOut(hdc,Col_2,Line_2,":",1);
if(strlen(overlay1_name)>0)
{
TextOut(hdc,Col_3,Line_2,overlay1_name,strlen(overlay1_name));
}
//--------- Line 3 ----------------
if(strlen(overlay2_name)>0)
{
TextOut(hdc,Col_3,Line_3,overlay2_name,strlen(overlay2_name));
}
//--------- Line 4 ----------------
TextOut(hdc,Col_1,Line_4,"APP File :",9);
TextOut(hdc,Col_2,Line_4,":",1);
if(strlen(app_name)>0)
{
TextOut(hdc,Col_3,Line_4,app_name,strlen(app_name));
}
//--------- Line 5 ----------------
TextOut(hdc,Col_1,Line_5,"SFL File :",9);
TextOut(hdc,Col_2,Line_5,":",1);
if(strlen(sfl_name)>0)
{
TextOut(hdc,Col_3,Line_5,sfl_name,strlen(sfl_name));
}
//--------- Line 6 ----------------
TextOut(hdc,Col_1,Line_6,"CRT File :",9);
TextOut(hdc,Col_2,Line_6,":",1);
if(strlen(crt_name)>0)
{
TextOut(hdc,Col_3,Line_6,crt_name,strlen(crt_name));
}
//--------- Line 7 ----------------
TextOut(hdc,Col_1,Line_7,"TBL File :",9);
TextOut(hdc,Col_2,Line_7,":",1);
if(strlen(tbl_name)>0)
{
TextOut(hdc,Col_3,Line_7,tbl_name,strlen(tbl_name));
}
//--------- Line 8 ----------------
TextOut(hdc,Col_1,Line_8,pdash_Line,185);
//--------- Line 9 ----------------
TextOut(hdc,Col_4,Line_9,pdash_Line,26);
TextOut(hdc,Col_5,Line_9,"***** BLOCK SIZE *****",strlen("***** BLOCK SIZE *****"));
//--------- Line 10 ----------------
TextOut(hdc,Col_4,Line_10,"** FILE SIZE **",strlen("** FILE SIZE **"));
TextOut(hdc,Col_5,Line_10,"DEC",strlen("DEC"));
TextOut(hdc,Col_6,Line_10,"HEX",strlen("HEX"));
//--------- Line 11 ----------------
TextOut(hdc,Col_1,Line_11,pdash_Line,185);
//--------- Line 12 ----------------
TextOut(hdc,Col_1,Line_12,"Output Flash Filename",strlen("Output Flash Filename"));
TextOut(hdc,Col_2,Line_12,":",1);
if(strlen(flashFile)>0)
{
TextOut(hdc,Col_3,Line_12,flashFile,strlen(flashFile));
TextOut(hdc,Col_4,Line_12,flashFileSizeStr,strlen(flashFileSizeStr));
TextOut(hdc,Col_5,Line_12,flashDBlockSizeStr,strlen(flashDBlockSizeStr));
TextOut(hdc,Col_6,Line_12,flashHBlockSizeStr,strlen(flashHBlockSizeStr));
}
//--------- Line 13 ----------------
TextOut(hdc,Col_1,Line_13,"Output Cert Filename",strlen("Output Cert Filename"));
TextOut(hdc,Col_2,Line_13,":",1);
if(strlen(certFile)>0)
{
TextOut(hdc,Col_3,Line_13,certFile,strlen(certFile));
TextOut(hdc,Col_4,Line_13,certFileSizeStr,strlen(certFileSizeStr));
TextOut(hdc,Col_5,Line_13,certDBlockSizeStr,strlen(certDBlockSizeStr));
TextOut(hdc,Col_6,Line_13,certHBlockSizeStr,strlen(certHBlockSizeStr));
}
//--------- Line 14 ----------------
TextOut(hdc,Col_1,Line_14,"Output Script Filename",strlen("Output Script Filename"));
TextOut(hdc,Col_2,Line_14,":",1);
if(strlen(certFile)>0||strlen(scriptFile)>0)
{
TextOut(hdc,Col_3,Line_14,scriptFile,strlen(scriptFile));
//--------- Line 15 ----------------
TextOut(hdc,Col_3,Line_15,scriptFileTX,strlen(scriptFileTX));
}
return (0);
}
|
|
|
|