|
mckavity wrote:
I'm using VS2003 (7.1.3088), so that's not my problem.
You're right.
Contrary to what I said in my earlier post, I believe my suggestion applies to both VC6 and VC7.x generated apps. It worked for me and generated an app that displays XP-like controls on XP and non-XP-like controls on W2K.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
mckavity wrote:
The apps do look exactly the same on both Win2K and WinXP. That is my problem. I would like them to look different.
I did not say they should look the same. I said they should look correct, meaning that it should look like Win2K on that machine (e.g., dialogs have four square corners, X button is gray), and it should look like WinXP on that machine (e.g., top corners of dialogs are round, X button is red, caption is taller).
Other than that, I'm not familiar with code that would cause their appearance to change (or stay the same).
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
hello. i am having a small problem. from code project only i have down loaded a code. that uses an object of CDatabase, the n calls its oopen function with microsoft excel driver. after thatn writing in to a excel file using .executesql(" insert into demo4 vales(.....)) function. like that. the result excel file is coming but at the beginning of each cell one ' is getting added to the data content( eg if adams is the data, 'adams is coming in excel , it is appearing as adams only but if u double click on the cell it is giving contents as 'adam. why is that so . is there any way to make it not come in the resultant excel files ? please tell me.
-- modified at 9:54 Monday 26th September, 2005
|
|
|
|
|
Show the code snippet that adds the values to the cells.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
sSql.Format("DRIVER={%s};DSN='';FIRSTROWHASNAMES=1;READONLY=FALSE;CREATE_DB=\"%s\";DBQ=%s", sDriver,gsExcelFileName,gsExcelFileName);
if( database.OpenEx(sSql,CDatabase::noOdbcDialog) )
{
//Create table structure
sSql = "Create Table MIDs ( ECMName TEXT,MID_Hex TEXT,MID_Dec TEXT,GroupBroadcast TEXT,ME_Number TEXT,AlarmLevel TEXT,SpecialWarning TEXT,AbuseType TEXT,ParameterName TEXT,Status TEXT,Instruction TEXT,MID TEXT,CID TEXT,DeleteCIDs TEXT,Display TEXT,Log TEXT,ServiceLamp TEXT,Telemetry TEXT,EventRecorder TEXT,ESET TEXT,Start TEXT,Actuate TEXT,Deactuate TEXT,Acknowledge TEXT,ServiceLight TEXT )";
//HistogramID number, HIstogramFormula TEXT)";
database.ExecuteSQL(sSql);
.
.
.
.
.
// The below is all sqlstatement how it is constructed. ValuesString.Format("'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s'",ControlValueArray[44][1],MIDHexValue,ControlValueArray[43][1],ControlValueArray[2][1],ControlValueArray[3][1],AlaramLevel,ControlValueArray[38][1],ControlValueArray[39][1],ControlValueArray[44][1],ControlValueArray[41][1],ControlValueArray[42][1],ControlValueArray[43][1],ControlValueArray[4][1],DeleteCIDs,ControlValueArray[32][1],ControlValueArray[31][1],ControlValueArray[30][1],ControlValueArray[29][1],ControlValueArray[33][1],ControlValueArray[28][1],"N/A",ControlValueArray[15][1],ControlValueArray[16][1],ControlValueArray[17][1],ControlValueArray[18][1] );
sSql = "INSERT INTO MIDs(ECMName ,MID_Hex ,MID_Dec ,GroupBroadcast ,ME_Number ,AlarmLevel ,SpecialWarning ,AbuseType ,ParameterName ,Status ,Instruction ,MID ,CID ,DeleteCIDs ,Display ,Log ,ServiceLamp ,Telemetry ,EventRecorder ,ESET ,Start ,Actuate ,Deactuate ,Acknowledge ,ServiceLight ) VALUES ("+ ValuesString+ ")";
database.ExecuteSQL(sSql);
database.Close();
Like this it is adding to excel.
|
|
|
|
|
Did you look at how ValuesString is being constructed? The cause of your ' problem is right there?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
i did not get whatu are telling. actually all those values in the values string are text values. so them i have written as 'content' .
because in the sql sltatement they should be given as
insert into tablename values('text1','text2',number e.t.c);
so have used format('%s', variablevalue) for forming ValuesString .
just now have seen while trying to print into number fields it is giving normally but while printing text values , the value of the cell is shown as normally only but preceded by a ' symbol when double clicking on the cell.
after dblclk on cell the value is like '1234 for text,
copy cell contents and paste it elsewhere in note pad they appearing like:
ECMName MID_Hex
peninsula 5678
|
|
|
|
|
tejaswi_teja wrote:
i did not get whatu are telling. actually all those values in the values string are text values. so them i have written as 'content' .
because in the sql sltatement they should be given as
insert into tablename values('text1','text2',number e.t.c);
so have used format('%s', variablevalue) for forming ValuesString .
I understand now.
tejaswi_teja wrote:
just now have seen while trying to print into number fields it is giving normally but while printing text values , the value of the cell is shown as normally only but preceded by a ' symbol when double clicking on the cell.
after dblclk on cell the value is like '1234 for text,
copy cell contents and paste it elsewhere in note pad they appearing like:
ECMName MID_Hex
peninsula 5678
Since the single quote marks in each cell are for display purposes only (they tell Excel to treat the text exactly as you have entered it), and does not affect printing or pasting to other applications, is there any harm in leaving them there?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
nothing harm just. just i was afraid if sbdy access the contents of that file along its original contents these quotes may also come and disturb. thats why. no other problems.
|
|
|
|
|
Hello
I want to estimate distance between 2 distributions.
Which distance function more efficent?
If know any distance function, tell me that distance function name, pls?
Thank you so much
|
|
|
|
|
bulgaa wrote:
I want to estimate distance between 2 distributions.
Do you mean a Linux distribution? If not, please explain what a distribution is.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
If not, please explain what a distribution is.
and so, what "distance" is !
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
Are there any functions in C++ to get an ASCII-decimal-value of
an character?
for example: IN = 'A' -> OUT = 65
|
|
|
|
|
Sure.
char c = 'A';
int val = c;
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
atoi(char*) may work,if it does not, try to convert charvariable to char*. sprintf may be right function.
dlfkgj lsdfkglfkgjlfgl jldfk fldkk jk
|
|
|
|
|
In my SDI Application the following problem appeared all of a sudden: In the InitInstance function of the application class the following line
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
causes the error:
Error creating empty document ! (Translation from german, so the english errortext may be slightly different)
Tracing into the MFC code the error happens in the function CWinApp::ProcessShellCommand at the following statement:
if (!AfxGetApp()->OnCmdMsg(ID_FILE_NEW, 0, NULL, NULL))
Does anybody else have had this problem and found a solution ???
MS
|
|
|
|
|
This happens due to failure of creating frame window.
check your CMainFrame::PreCreateWindow function.
It may returning FALSE.
Narrow down the problem by commenting whole code in this function and un comment one by one.
You will definitely get problem.
else
carry the same check on OnCreate() function.
-- modified at 9:00 Monday 26th September, 2005
|
|
|
|
|
Oh such a sh*t. I had some old code in the views PreCreateWindow function which fails at the current version of the project. And so the creation of the view fails.
MS
|
|
|
|
|
Hi
I want to terminate one application which is running but for that I m not able to get the caption, classname or anything by GetWindowText or FindWindow().
Is there any way so that I can have HANDLE of that running exe and i can terminate that ?
Regards
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote:
...I m not able to get the caption, classname or anything by GetWindowText or FindWindow().
Why not?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
EnumWindows() will cycle through every single window on the machine. Your program should be in there somewhere. You need to provide EnumWindows with a function to call for each window handle. Then try using GetWindowText() or GetClassName(). Most times you can figure out which Window Text or Class Name you are looking for if you use Spy++ (comes with Visual Studio).
Hope this helps!
Danny
|
|
|
|
|
Amarelia wrote:
I m not able to get the caption, classname or anything by GetWindowText or FindWindow().
After redaing your messages, one of best idea is to save your current handle of window in some INI or registry at starting .. so that other application read it from that common location and perform teh required.. though it not good solution... but it's worth trying it
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
In Debug Mode, can we remove our application with codes..
Iam opening the winword with my application, without closing the word i closed my appliaction, for the next time while iam running the appliacion an error is showing coz of my applaction still exits in the task manager.. is there any solution for closing my applaiction from the code?
|
|
|
|
|