|
hii..,
Can anyone please help me in printing a particular page using win32.Like where are we supposed to give input like which page is suppposed to be printed.Pleaseeeee
|
|
|
|
|
Hi,
Hi, I am using this snippet from msdn to upload a file to a web server. But I need to POST some variables at the same time along with their values. But I have no idea how to do it with HttpSendRequestEx
Please help me.
Thanks.
Dhiraj
|
|
|
|
|
Dhiraj kumar Saini wrote: But I need to POST some variables at the same time along with their values
Do you know how to POST variables without the additional file upload requirement? If not you might want to start there.
Then once you understand the basics of HTTP POST this should provide you with the rest[^]
led mike
|
|
|
|
|
Hi All,
How do I convert integer or long to VARIANT* type in C++? Please give me some example..Thanks.
|
|
|
|
|
Why do you would convert a integer to a pointer to VARIANT ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am trying to automate powerpoint in my project.Powerpoint exposes this fn LPDISPATCH Item(VARIANT* Index). Code I am trying to write as below.
CString str;
long count = addIns.GetCount(); //powerpoint addins
for(int i=0;i<count;i++)>
{
//Here I have to use Item(..) as mentioned above.
}
|
|
|
|
|
What object exposes what method?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
powerpoint application object exposes fn Item(VARIANT*)
|
|
|
|
|
Perhaps something this will do...
CString str;
long count = addIns.GetCount();
for(int i=0;i<count;i++)>
{
VARIANT var;
var.vt = VT_I4;
var.lVal = i;
LPDISPATCH lpDisp = TheInterface->Item( &var );
}
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
SRKSHOME wrote: How do I convert integer or long to VARIANT* type in C++?
Directly? You don't.
But if you need to call a function that wants a pointer to a variant (holding a long), then it's straightfoward.
CComVariant varTemp (lMyLongVariable);
HRESULT hr = SomeFunction (&varTemp, other, parameters, here);
Iain.
|
|
|
|
|
It's easier to just use the COleVariant class.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello !!
I have an byte array of this type
BYTE abyTemp [6] = {0x0D, 0x0A, 0x06, 0x00, 0x81, 0x1B}
I need to convert them to string
CString strTemp;
strTemp = "0D0A0600811B"
I tried in this manner
chat ch;
CString str;
for (i=0; i < 6; i ++)
{
ch = byTemp [i];
str += ch;
}
but here i get some special symbols..
|
|
|
|
|
You are adding them as the bytes into your string - which as you see will cause confusion.
Try:
CString MakeHexText (BYTE *byIn, UINT nCount)
{
CString strReturn, strByte;
for (UINT n = 0; n < nCount; n++)
{
strByte.Format (_T("%02x"), byIn [n]);
strReturn += strByte;
}
return strReturn;
}
Iain.
|
|
|
|
|
Thanks its working !!
|
|
|
|
|
Hello.I have a problem with Shell integration. I have created DLL wich add a new menu item into explore popup menu.
When i work with simple menu, i have no problem.But i need insert into explore menu with submenu.I deed it.
An that is the question.How i can process event, when user push my submenu?I use IContextMenu interface, and process
Initialize, GetCommandString, QueryContextMenu and InvokeCommand events.When i add submenu, InvokeCommand event no working on it.
Wait for answer. Thanks for help.
|
|
|
|
|
There's the wonderful Dunn's article series [^] here at CP.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes, thanks, this is realy wonderful article, i based on it.
All works fine with simple(one level menus).
When use
InsertMenu ( hmenu, uMenuIndex, MF_STRING | MF_BYPOSITION, uCmdID++,
_T("My menu") );
there is no problem. InvokeCommand work fine.
But i did next
HMENU SubMenu = CreatePopupMenu();
InsertMenu ( SubMenu, uMenuIndex, MF_BYPOSITION,1, _T("My Sub Menu"));
InsertMenu( hmenu, uMenuIndex, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT_PTR )SubMenu,
_T("My Menu"));
SetMenuItemBitmaps ( hmenu, MenuIndex, MF_BYPOSITION, MenuBMP, NULL );
Menu and submenu is visible, but when i press on my sub menu - program not paused on my breakpoint on InvokeCommand event, but ole error is appeared. What do You think about this?
modified on Wednesday, October 22, 2008 8:17 AM
|
|
|
|
|
I am getting following error with CRecordSet::Update( );
I opened record set with dynaset open, then called AddNew , then calling Update.
|
|
|
|
|
Does the record set contain more than one table? Have you opened either the record set or the database in read-only mode? If you are using a DSN, is it read-only?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
Hello all,
I'm encountering an error 1917 "The RPC call completed before all pipes were processed." while trying to restore an encrypted file by WriteEncryptedFileRaw(), backed up using ReadEncryptedFileRaw(). The error is *not* encountered when trying to restore on an NTFS volume but encountered *every time* trying to restore on a FAT32 volume. I assumed that RAW API will handle the case of "Volume not NTFS so EFS not supported" and decrypt the file and write to the volume as a normal behavior. I couldn't find anything specific to this on MSDN pages.
|
|
|
|
|
How to check programmatically whether password complexity requirement is enabled in local security policy ?
modified on Wednesday, October 22, 2008 7:32 AM
|
|
|
|
|
In my main application, I need to add a new function where people can add lines, circles, and all sorts of doodles to the main view. Imagine the drawing tools in word - similar sort of thing.
I've literally rolled my sleeves up and started coding (on a test copy of the project - not insane!), but I'm sure this is something I can stealreuse the code of from somewhere.
Do you have any pointers to articles, or sites elsewhere I could look? Even a nice toolbar with graphic tool buttons would be a start.
I'm sure a skinny dialog box with line,circle,text buttons, line style, colour picker etc is already done...
Iain.
{edited to change title bar}
modified on Wednesday, October 22, 2008 6:59 AM
|
|
|
|
|
I have a CListCtrl member in my dialog.
During runtime, I fill the control's columns and rows with data
using 'InsertColumn' and 'SetItemText' functions.
Note : This List Control contains 5 rows and 3 columns full of data.
Now, I want a copy of the data of the whole list control in
another ClistCtrl object which I create during runtime using CListCtrl's Create function.
How can I do this since I don't have a 'Copy' function as for data structures
like CStringArray.
|
|
|
|
|
There is no LB_CLONE_FROM_OTHER list control message, so you're going to have to roll your sleeves up and do it yourself.
If you already have code to fill up the first control, can you move that into a function, and call it with either CListCtrl * or a dlg ID?
Or if this will change over time, write a cloning function? Get the number of columns / rows of the first control, set the second one to the same. Call GetItem a lot on the first control, and SetItem a lot on the second?
You'll have to be careful. One thing I can think of is an items lParam - if it is a casted pointer, can you use the same pointer? Or make a new object to point to? Etc. That sort of thing is application specific though.
Iain.
|
|
|
|