|
good morning
Here are the value for excel 12 ?
well the values retrieved from Microsoft.Office.Interop.Excel.dll
runtime version v1.1.4322
version 12.0.0.0
public enum XlChartType
{
xlXYScatter = -4169,
xlRadar = -4151,
xlDoughnut = -4120,
xl3DPie = -4102,
xl3DLine = -4101,
xl3DColumn = -4100,
xl3DArea = -4098,
xlArea = 1,
xlLine = 4,
xlPie = 5,
xlBubble = 15,
xlColumnClustered = 51,
xlColumnStacked = 52,
xlColumnStacked100 = 53,
xl3DColumnClustered = 54,
xl3DColumnStacked = 55,
xl3DColumnStacked100 = 56,
xlBarClustered = 57,
xlBarStacked = 58,
xlBarStacked100 = 59,
xl3DBarClustered = 60,
xl3DBarStacked = 61,
xl3DBarStacked100 = 62,
xlLineStacked = 63,
xlLineStacked100 = 64,
xlLineMarkers = 65,
xlLineMarkersStacked = 66,
xlLineMarkersStacked100 = 67,
xlPieOfPie = 68,
xlPieExploded = 69,
xl3DPieExploded = 70,
xlBarOfPie = 71,
xlXYScatterSmooth = 72,
xlXYScatterSmoothNoMarkers = 73,
xlXYScatterLines = 74,
xlXYScatterLinesNoMarkers = 75,
xlAreaStacked = 76,
xlAreaStacked100 = 77,
xl3DAreaStacked = 78,
xl3DAreaStacked100 = 79,
xlDoughnutExploded = 80,
xlRadarMarkers = 81,
xlRadarFilled = 82,
xlSurface = 83,
xlSurfaceWireframe = 84,
xlSurfaceTopView = 85,
xlSurfaceTopViewWireframe = 86,
xlBubble3DEffect = 87,
xlStockHLC = 88,
xlStockOHLC = 89,
xlStockVHLC = 90,
xlStockVOHLC = 91,
xlCylinderColClustered = 92,
xlCylinderColStacked = 93,
xlCylinderColStacked100 = 94,
xlCylinderBarClustered = 95,
xlCylinderBarStacked = 96,
xlCylinderBarStacked100 = 97,
xlCylinderCol = 98,
xlConeColClustered = 99,
xlConeColStacked = 100,
xlConeColStacked100 = 101,
xlConeBarClustered = 102,
xlConeBarStacked = 103,
xlConeBarStacked100 = 104,
xlConeCol = 105,
xlPyramidColClustered = 106,
xlPyramidColStacked = 107,
xlPyramidColStacked100 = 108,
xlPyramidBarClustered = 109,
xlPyramidBarStacked = 110,
xlPyramidBarStacked100 = 111,
xlPyramidCol = 112,
}
Regards
Franck
|
|
|
|
|
Hello,
I have used the above chart types and to draw stock volume option
xlStockVOHLC = 91 . The data is arranged properly in excel sheet but how to select data for the chart in columns
i m using the following for data range
_Chart newChart;
Range oRang;
oRang = newSheet.GetUsedRange()
newChart.SetSourceData(oRang,COleVariant((short)1));
pritha
|
|
|
|
|
Hi,
I am trying to automate the opening file in framemaker and then try to convert it into xml file. While opening the file in framemaker i get some dialogs with OK and Cancel button.
For some file these dialogs come up but not for others.
How do i handle these dialogs in my code.
Thanks in advance for any help
|
|
|
|
|
I know that we can launch the Playback tab of the Sound control panel with the command:
rundll32 shell32.dll,Control_RunDLL mmsys.cpl,,0
But if I need to launch the Speaker Properties dialog box programmatically, how can we do that? Do we need to post some Windows message to some process?
Note: Speaker Properties can be found by mouse-clicks via right-clicking the "Speakers" entry on the list control on the "Playback" tab of Sound panel.
Maxwell Chen
|
|
|
|
|
This article[^] seems to be a nice solution to me. Let me try ...
Maxwell Chen
|
|
|
|
|
|
Hello
Does memory mapped file I/O has a real advantage over disk I/O. Because I am trying to read a file using ::ReadFile API (block by block) and compare it with memory mapped file I/O mechanism from http://www.codeproject.com/KB/files/mmfio.aspx I then tried to compare the time taken to read a file of 700MB using both the techniques. I found that the memory mapped file I/O took almost the same time as disk I/O or sometimes more time.
So, would like to know whether memory mapped file I/O does really provide an advantage over disk I/O and how do I achieve it.
Thanks
|
|
|
|
|
When reading the complete contents of a file, possibly not. However, with a big file, if you only want to read separate parts of the file, memory mapping gives you the convenience of memory-style accesses, and will only read the pages of the file you touch (whatever the page size of the VM system is). Consider if you wanted to read the first and last bytes of that file - you could map the whole file, read the first byte and the last byte and the disk IO system would have read two pages (2 x 4kB?). And you read those bytes through pointers.
Another advantage - memory mapped IO sections can be defined using pointers (pointer to start, pointer to end), which are random-access iterators as far as the STL is concerned. File iterators in STL are forward-only iterators.
I generally prefer to use memory-mapping when possible, as it's (IMO) easier to manage and use, mainly because of the STL related iterator thing.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,all
I have a windows service program with a service,and I can use "myservice/service" in cmd.exe,it sucess!
then,I can see the service in control pane,I also can start up this service;
But, this service can't run my code; why??
the whole code here
void yourfunction()
{
for (int a =0; a<10; a++)
::MessageBoxA(NULL, "ggg", "ghgh" ,MB_OK);
}
SERVICE_STATUS ServiceStatus =
{
SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS,
SERVICE_STOPPED,
SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_PAUSE_CONTINUE,
0,0,0,0
};
TCHAR szSvName[]=TEXT("Myservice1");
SERVICE_STATUS_HANDLE hStatus;
SC_HANDLE SCMger;
void WINAPI ControlHandler(DWORD request);
void ServiceMain(int argc, char* argv);
void CreateMyService()
{
SCMger=OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
CreateService(
SCMger,
szSvName,
szSvName,
SERVICE_START,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START,
SERVICE_ERROR_IGNORE,
TEXT("c:\\myservice1.exe"),
NULL,
NULL,
NULL,
NULL,
NULL);
}
int main()
{
SERVICE_TABLE_ENTRY ServiceTable[2];
ServiceTable[0].lpServiceName = szSvName;
ServiceTable[0].lpServiceProc=(LPSERVICE_MAIN_FUNCTION)ServiceMain;
ServiceTable[1].lpServiceName = NULL;
ServiceTable[1].lpServiceProc= NULL;
if(StartServiceCtrlDispatcher(ServiceTable)==0)CreateMyService();
}
//this fun also can't be debug,can't run
void ServiceMain(int argc, char* argv)
{
hStatus = RegisterServiceCtrlHandler(szSvName,ControlHandler);
ServiceStatus.dwCurrentState = SERVICE_START_PENDING;
ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_SHUTDOWN;
SetServiceStatus(hStatus,&ServiceStatus);
ServiceStatus.dwWin32ExitCode = NO_ERROR;
ServiceStatus.dwCheckPoint = 0;
serviceStatus.dwWaitHint = 0;
ServiceStatus.dwCurrentState = SERVICE_RUNNING;
SetServiceStatus(hStatus,&ServiceStatus);
yourfunction();
ServiceStatus.dwCurrentState = SERVICE_STOPPED;
SetServiceStatus(hStatus,&ServiceStatus);
}
//this fun can't be debug,can't run
void WINAPI ControlHandler(DWORD request)
{
switch(request)
{
case SERVICE_CONTROL_SHUTDOWN:
ServiceStatus.dwCurrentState = SERVICE_STOPPED;
SetServiceStatus(hStatus,&ServiceStatus);
break;
}
}
|
|
|
|
|
|
|
|
thank you Snakefoot, I finish it;
|
|
|
|
|
Hi, I am building an application using the OGRE 3D engine and Rebecca API for AIML. The problem is when creating a NetworkAimlFacade object. Its constructors need the "int argc, char* args[]" that are normally in the main method. But I'm not using any main method and I am building an independent class based on a sample console application:
Here is my class:
class ChatBot
{
private:
NetworkGraphBuilder* builder;
public:
ChatBot(){
NetworkAimlFacade aiml(argc, args);
NetworkGraphBuilder &builder = aiml.getNetworkGraphBuilder();
string botName = builder.getBotPredicate("name").c_str();
StringPimpl response = builder.getResponse("connect");
}
string askQuestionAndGetAnswer( string input )
{
StringPimpl strPimText;
builder->getResponse(strPimText);
string responseString = strPimText.c_str();
return (responseString);
}
};
Here is part of the console sample:
int main (int argc, char* args[])
{
NetworkAimlFacade aiml(argc, args);
Can anyone tell me if it is possible to initialize the "argc" and "args" variables with out the main method? (I've tried a couple of ways but they don't work
|
|
|
|
|
try another signatures in Constructor ..is it possible ??
|
|
|
|
|
argc and argv together define an array of strings. Typically they are used to pass arguments from command line to an application but it is not necessary that arguments should come from command line.
In the context of NetworkAimlFacade, just think of a class with constructor taking two arguments. First is the size of an array and second argument is the pointer to array. Read the NetworkAimlFacade documentation to see what parameters does it except. If it is the case that it can work with default settings, when no arguments are passes then you use NetworkAimlFacade aiml(0, 0);
-Saurabh
|
|
|
|
|
To get the entire command line for a process use the GetCommandLine[^] API.
To convert the command line to an array similar to argv, use the CommandLineToArgvW[^] API.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Largo65 wrote: But I'm not using any main method
So how do you run the program?
Largo65 wrote: ChatBot(){
NetworkAimlFacade aiml(argc, args); // Where can I get these vars?
The ChatBot() constructor takes no parameters, and yet within the constructor you have the statement NetworkAimlFacade aiml(argc, args); . You need to present these paramaeters to the constructor thus: ChatBot(int argc, char** args) .
|
|
|
|
|
Hi everyone,
Quick question about inline assembler with C++ code.
I was just wondering if, when using inline assembler in a class method, it is necessary to push all registers I am going to use onto the stack and then pop them off after I'm done. I thought this might be necessary because the C compiler might require their contents after the _asm{} code execution.
For example;
void MyClass::MyFunction(){
int a, b, c; // for example
// maybe have some C code here
_asm{
// *
// assembler code using a number of registers (eax, ebx, ecx, for example)
// **
}
// maybe have some more C code here
}
My question is: should I push (at //*) those registers I'm going to utilize, and then pop them (at //**) in the above code.
Help would be much appreciated.
Many thanks,
Paul
|
|
|
|
|
Generally for the AX/BX/CX/DX/SI/DI registers, no. All others (BP, segment registers, etc...) yes. Depends on the compiler really.
-- Ian
|
|
|
|
|
I disagree with the other answer. I think that, yes, you should push and pop any registers that you are going to touch. The compiler will take care of the rest automatically.
As an exercise, you should turn assembly code listings on for a small project and examine some of the code emitted by the compiler. In can be very educational for things like this.
-edit- if you have doubts then comment off the push and pops and see what happens. The phrase "unexpected results" comes to mind. However, if you change ECX without restoring it the results will be not unexpected - the app will most likely crash since the this pointer is different.
|
|
|
|
|
Hi All,
I have a problem with LoadImage method in my small Visual C++ project in Visual Studio 2008. No matter what I pass as filename, The GetLastError always returns "The System Cannot find the File Specified".
I've tried with Loading from the resource:
m_pBitmap->LoadBitmap(IDB_BITMAP1); //THIS WORKS PERFECTLY
But I've commented out this line and instead using the following code in OnInitialUpdate() method. But It fails. I've placed the bmp file in C: also in the Debug directory from where I run the executable. (While running from Debug the filename is simply "barcode.bmp" and I've placed the bmp file in the Debug directory.)
But I always get the error: The System Cannot find the File Specified. Definitely, I'm missing something but I'm unable to find out....
----------------------------------------------------------------------------------
void CMymfcBitmapView::OnInitialUpdate()
{
.
.
.
//m_hBitmap is a HBITMAP Member Variable in the my View Class
m_hBitmap = (HBITMAP)LoadImage(NULL, (LPCWSTR)"c:\\barcode.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
if(m_hBitmap == NULL)
{
//DWORD err = ::GetLastError();
LPVOID lpMsgBuf;
::FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |FORMAT_MESSAGE_FROM_SYSTEM |FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL);
::MessageBox( NULL, (LPCTSTR)lpMsgBuf, (LPCWSTR)"Error", MB_OK | MB_ICONINFORMATION );
// Free the buffer.
LocalFree( lpMsgBuf );
}
--------------------------------------------------
Thanking you all in Advance....
|
|
|
|
|
raich wrote: m_hBitmap = (HBITMAP)LoadImage(NULL, (LPCWSTR)"c:\\barcode.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
Is the LPCWSTR cast necessary?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Otherwise my compiler complains...
------------------------------------------
error C2664: 'LoadImageW' : cannot convert parameter 2 from 'char *' to 'LPCWSTR'
And It shows LoadImageW!!
------------------------------------------
Casting with (LPCWSTR) at least made my code compilation error free....
|
|
|
|
|
raich wrote: Casting with (LPCWSTR) at least made my code compilation error free....
But that does not always mean it's the right thing to do. Have you tried prefacing the string literal with an L ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|