|
Hi,
I ve read into an article (Q186120) of microsoft knowledge base, which explain how to fill a range with an array. But when i test it , it doesn't work really well. In fact, i don't realy understand how works the function called in the sample GetResize(), because when i test my application (which is based on the application described in the article, but which can't fill cells with string element)which simply have to fill some excel's range with the figure "1", and when i run my application it just fill the cell "A1"!
Why?
Thanks in advance for your answer
gerald
|
|
|
|
|
The sample detailed in Q186120 works perfectly well. I have just tested it with Excel 97.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Hi,
... I have my ATL ActiveX control, when I want to edit the properties of that ActiveX in Ms Word, I have to go to properties, and then press "custom" to have my properties dialog.
... But... What I have seen is that a control like "Calendar Control", adds properties to the Ms Word properties grid... how did they do that ???, how can I do that ?...
Thanks in advance, greetings
Braulio
|
|
|
|
|
hi
how can i fetch the harddisk serial number not harddisk volume serial number using MFC, WIN32API,C,C++ program. And where it is stored in the system. any professionals know please help me
thank you
from
venu
|
|
|
|
|
I have this:
CString csRoot( "C:\\" );
DWORD max = _MAX_PATH;
DWORD maxLen = 0;
DWORD fileFlags;
DWORD serialNo;
char szName[ _MAX_PATH ];
char szSerialNo[ _MAX_PATH ];
char szFileSystem[ _MAX_PATH ];
::GetVolumeInformation( 0, // root directory
szName, // volume name buffer
_MAX_PATH, // length of name buffer
&serialNo, // volume serial number
&maxLen, // maximum file name length
&fileFlags, // file system options
szFileSystem, // file system name buffer
max // length of file system name buffer
);
|
|
|
|
|
Probably you should try exploring Windows Management Instrumentation.
I've seen lot of stuff related to hardware over there...
Cheers
Kannan
|
|
|
|
|
|
warning C4312: 'reinterpret_cast' : conversion from 'DWORD' to 'CMyClass *' of greater size
CMyClass* pMyClass = reinterpret_cast<CMyClass*>(arg);
arg is a DWORD
A DWORD is 32 bits. A pointer is 32 bits. So what the heck is the compiler telling me???
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Didnt you recognize that you have now a 64bit machine on your table? So the pointers are now 64bit instead of 32bit.
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
|
Hi everybody,
I would like to export data from a safearray to range in excel. So, ii've read the articles Q186120 which gives an explantion and an example to do it. I've tried to test it in my application, first i ve done simply in trying to put in a specific set of range the figure "1". But when i test it it doesn't work the only first cell ("A1") is filled by "1", WHY??? So, you could find the code i've wrote, so, if someone could help me!
Thanks in advance
.
.
.
.
_Application FracApp;
_Workbook FracBook;
_Worksheet FracSheet;
Workbooks FracBooks;
Worksheets FracSheets;
Range FracRange;
LPDISPATCH lpDisp;
COleVariant Optional((long)DISP_E_PARAMNOTFOUND,VT_ERROR);
COleSafeArray FracArray;
DWORD NumOfElements[2];
int NumberOfRows,NumberOfCols; //pour le "SAFEARRAY"
long FracIndex[2];
long lRow,lCol;
double Temporary;
if(!FracApp.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Pb avec CreateDispatch sur Excel");
return;
}
lpDisp=FracApp.GetWorkbooks();
ASSERT(lpDisp);
FracBooks.AttachDispatch(lpDisp);
lpDisp=FracBooks.Open("D:\\FractaLab\\Fractal_v1_0\\Test.xls",Optional,Optional,Optional,Optional,Optional,Optional,Optional,Optional,Optional,Optional,Optional,Optional);
ASSERT(lpDisp);
FracBook.AttachDispatch(lpDisp);
lpDisp=FracBook.GetWorksheets();
ASSERT(lpDisp);
FracSheets.AttachDispatch(lpDisp);
lpDisp=FracSheets.GetItem(COleVariant((short)1));
ASSERT(lpDisp);
FracSheet.AttachDispatch(lpDisp);
lpDisp=FracSheet.GetRange(COleVariant("A1"),COleVariant("A1"));
ASSERT(lpDisp);
FracRange.AttachDispatch(lpDisp);
NumberOfRows=m_dlgNumHisto+1-m_dlgNumSample;
NumberOfCols=256;
FracRange.GetResize(COleVariant((short)(NumberOfRows)),COleVariant((short)(NumberOfCols)));
FracApp.SetVisible(TRUE);
FracRange.Clear();
//Création du tab de type SAFEARRAY.
NumOfElements[0]=NumberOfRows; NumOfElements[1]=NumberOfCols;
FracArray.Create(VT_R8,2,NumOfElements);
//Remplissage du SAFEARRAY
for(lCol=0;lCol
|
|
|
|
|
I think your only settings the first value. Maybe the approch with the array is not the easiest way. If done this (where is the code???) with writing to a cell and the changing the position, it worked well.
Tip: if you write in a csv (comma separated file) with ";" as delimiter excel can open it easily. If you need you can also deploy a excel macro to some strange things.
If also read in CP an article about writing to Excel via ODBC Functions, it is working.
|
|
|
|
|
HI:
When I droped files from one folder to another folder, or I selected "Paste" menuitem of ContextMenu in a folder, I want to get handle before actual Copying operation, is that possible within Explorer?
Regards
Vic
|
|
|
|
|
Probably ICopyHook Interface might help you.
Cheers,
Kannan
|
|
|
|
|
but the interface ICopyHook can only handle folder and printer object, not involve file object.
best regards
|
|
|
|
|
Ooops...sorry I didn't notice that.
How about using API's like SHChangeNotify or probably write a namespace extension (I know this may be too much .. but can't think of any API as such which you can use)
I guess the best option could be try to get your hands on FileMon from sysinternals (they have the source for that ) the solution in implemented as a vxd.
http://www.sysinternals.com/filemon.htm[^]
Cheers
Kannan
|
|
|
|
|
How can i change contents of RAW HTML being sent. I get memory leaks all the time. how to manage it.
I want to prefix or append some exta HTML. How can i do tht.
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
Hi all,
I have a GUI win32 application.
When one instance is running I cann't run another instance because the application is communicationg with external hardware.
Before to run another instance of this application I have to close the running application manually.
Now I want to run this application a number of times with different arguments using a batch file.
Now I wonder how I can give command in my batch so that it can close the running application before next instance of appliction starts.
Batch file may look like:
1. Test.exe arguments
kill Test.exe (1)
2. Test.exe arguments
kill Test.exe (2)
and
so on
Hope I have explain my problem.
Any help in this regard
will be appreciated
regards
/rsasalm
|
|
|
|
|
write a lil app (kill.exe) that accepts command line args of the name of the app to kill
in the kill.exe get the process id of the app to kill
send a wm_close message to it
make sure the app to kill will process those messages
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" biz stuff about me
|
|
|
|
|
Hi Lauren,
Thanks for reply.
I would appreciate if you or someelse can give me a code example of killing another application B from one application A.
As least how to get the process id of an applicatin and then kill that.
Further, I guess the kill.exe you mentioned should be a Win32 application so that it can take wm_close message.
thanks again for your help
regards
/rsasalm
|
|
|
|
|
|
hi could not you suggest how to manage the following:
I have written a program which gets data from database (Access, SQL Server)
the data are shown in static.
I need these all to be send to print/print preview or to MS Word.
one more thing: how to make some statics bigger in size and some small?
thank you
if you can help send please to bek79@mail.ru
|
|
|
|
|
Take a look in the printing section here. There is an example of how to print a long CString across multiple pages in a view. You just need to get he text from the static into the string used, and the rest should work automaticlly. This assumes that the test in your static control is multi-line.
|
|
|
|
|
Hi , i'm trying to send an image from a Hebrew OS to other computer , and i always get a mirrored image.
I tried to use NOMIRRORBITMAP in the BitBlt method , but it doesn't seems to work.
Thanks.
|
|
|
|
|
i want to open a ODBC connection in my dialog based application can anybody tell me what is a simplest way to open database connection through dialogbased application
bye
chanda.com
|
|
|
|