|
Hi
We have a large app that we are converting to WinXP from Win2000. We would like our toolbars and dialogs (check boxex, radio buttons, push buttons etc) to have the WinXP look and feel (called a theme maybe?).
How can this be achived ? I have added a call to InitCommonControlsEx() at the start of our GUI thread, but the buttons still look the old way.
Any ideas on an easy way to get the WinXP look and feel ?
Thanks
Tim Cox
|
|
|
|
|
mckavity wrote:
Any ideas on an easy way to get the WinXP look and feel ?
In the normal course of events, an application will automatically look like XP when run on that platform. Changing the code is not required. To verify this, create a small application using AppWizard and run it on both the Windows 2000 and Windows XP machines. They should both look correct.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
The apps do look exactly the same on both Win2K and WinXP. That is my problem. I would like them to look different. In other words, I would like the app when running on WinXP to have the WinXP look and feel. Like buttons showing emphasis when the mouse hovers over the etc. How does one get buttons that show this type of emphasis ? (ie the border changes color to indicate that the mouse is over the button and that the button can be clicked?
Tim
|
|
|
|
|
It seems you may be using VC6 instead of VS200x. If so, you can get the XP look by adding a manifest to your app enable visual styles. See this[^] article, specifically the section "To create a manifest and enable your application to use visual styles.".
Here's[^] a screenshot of an app I created using VC6, running on an XP box.
Hope this helps!
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I'm using VS2003 (7.1.3088), so that's not my problem.
What I would like is that the buttons in my app to show a colored emphasis when the mouse moves over them, like all the apps do on WinXP. Right now, they show nothing, just like they did in Win2000.
Other apps do this. Example is IE. On Win2k, the buttons are regular, but on WinXP, the buttons show a yellow/orange emphasis when I move my mouse over them. This is what I want for my app too.
Am I making any sence ?
|
|
|
|
|
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
|
|
|
|
|