|
One solution is a vector.
typedef std::vector<> vec?0;
typedef std::vector<<vec?0>> vec?1;
vec?1 data;
...
Kuphryn
|
|
|
|
|
|
I haven't done a multi-dimenstional array yet. So Its been only a CArray. Can I do a CArray of CArrays? How would I define that?
|
|
|
|
|
template< class TYPE, class ARG_TYPE >
CArray < CArray , CArray& > m_Arrays ;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
How would I do this if I wanted to use a structure with some variables and a CArray embedded in it?
I have something like this:
struct STest
{
int IndexNumber;
CArray <double,double> Data;
};
And I want to make a CArray of this struct. How do I do this? I'm getting an error when I try
CArray <stest,stest&> FinalArray;
|
|
|
|
|
I am having trouble in getting the bitmap of a font using GetGlyphOutline(). It returns -1 when I try to get the size of the buffer that is required to store the bitmap. I guess it's some problem with device contexts and stuff like that, so someone please tell me in detail how to use it and the DCs i need to create. I am a beginner, so I don't know much about DCs and sing them for the above mentioned stuff.
|
|
|
|
|
Hello,
I have a problem :
I want to create a listbox (syslistview32) with different items background color ....
o line to be blue, and other to be red (background)
it's possible, and if "yes" please can you tell me how ?
the code I want to be NON-MFC something with win32 api
thank you
|
|
|
|
|
te-au lamurit!
|
|
|
|
|
Are there any hard and fast rules or rigor regarding exception processing and propagation from server to client? Are there any handy techniques? Does SetErrorInfo() raise an exception, which if unhandled, will raise on the client side or must the client always check the HRESULT? If the client always has to make that check then it seems to me we have advanced too far w/r to exception handling and propagation.
It would be good to wrap all server side errors into a common class, but isn't that what _com_error is? _com_issue_errorx() is not documented, at least the source. I don't want to have to recreate the wheel as I am on a timeline here. Any help would be appreciated (and, if you know what I mean) it's hard to ask for.
Duncan Wells
|
|
|
|
|
exception should never cross the server boundary. SetErrorInfo() does not throw any exceptions, it just sets up error info data which can be accessed using GetErrorInfo(). COM methods always return HRESULT so the client should check for that, but some smart pointer wrappers (e.g. _com_ptr_t provided by VC++ compiler) wrap these HRESULTS into exceptions and throw those exceptions if HRESULT is not S_OK.
just use smart pointer classes generated by #import directive. if error occurs inside the COM method call, _com_error exception will be raised
hope this helps
|
|
|
|
|
Hi there, I´ve looked through the Shell API doc´s and searched through the MSDN, but cannot find any doc´s about programmatically using/starting the "open with" dialog box. (i.e. right click on a file and choose open with, when double-clicking on a file that has no association, the open with dialog box appears)
Here´s my problem...
Using ::ShellExecuteEx(...) I´m opening a file (with the path, filename etc.),
I get notification from ::ShellExecuteEx if the associated program was successfully started, or an error if no application is asscoiated with the particular file. On recieving this error, I woukd like to show the "Open with" dialog. Anyone got any ideas?
Thanks in advance
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
Call
ShellExecute(NULL, "open", "rundll32.exe", "shell32.dll, OpenAs_RunDLL <the_file>", NULL, SW_SHOW);
where <the_file> is the file you need to open.
If you know how to do it without calling rundll32.exe please let me know. All my attempts have ended in nasty failures
rechi
|
|
|
|
|
Thanks, I´ll try it out over the weekend.
I suspect that using one of the shell32.dll exported functions that are not documented
will do the job... but which one ????
Thanks again, I´ll let you know if I find another way
Have a nice one
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
Phil.B wrote:
but which one ????
That's easy: OpenAs_RunDLL . The problem was to find out the function's prototype. Check this code:
typedef void (CALLBACK *PRUNDLLOPENAS)(HWND, HINSTANCE, LPCWSTR, int);
HMODULE h= LoadLibrary("shell32.dll");
PRUNDLLOPENAS pOpenAs_RunDLL = (PRUNDLLOPENAS)GetProcAddress(h, "OpenAs_RunDLL");
pOpenAs_RunDLL(hWnd, NULL, "<the_file>", SW_SHOWNORMAL);
FreeLibrary(h);
The best solution.
rechi
|
|
|
|
|
Thanks once again... another question, how did you manage to get the
signature for the dll call, I had a look a the dll, and found all the documented calls, but the others were all with cardinal numbers.
I used the depandancy walker, not exactly high-tech I know.
Anyway, thanks once again
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
This article[^] in MSDN explains it all.
There's no way to tell the signature of the function using only the dll's binary. Actually, it could be possible but you have to disassembly the code and hack it a bit. The function prototype is, in fact, a convention regarding the arguments and the order they have to respect while filling the stack at call-time.
rechi
|
|
|
|
|
Hey, I have a IE toolbar that is supposed to bring up another program. Right now it maximizes the program but the problem is that it is still hidden behind Internet Explorer. What message can I use to set this window to get the focus when it maximizes?
|
|
|
|
|
use SetFocus() to change the window with focus, but it seems that you don't need to change the focus, you have to change the z-order:
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
|
|
|
|
I replaced "hwnd" with the handle of the window I want to bring to the top but it gives me a compiler error:
error C2661: 'SetWindowPos' : no overloaded function takes 7 parameters
|
|
|
|
|
|
if you use CWnd/CWindow member function SetWindowPos, it receives six parameters, without hwnd, since it is implied, so you must ommit it.
Version with seven parameters is an API function so you must prefix it with global scope operator:
::SetWindowPos(hwnd, ...)
|
|
|
|
|
how to insert a toolbar into windows taskbar like Windows Media Player 9 does?
when you minimize it a mini player toolbar is shown in the taskbar.
|
|
|
|
|
What you want is a "DeskBand". Google for it or search CodeProject, there are enough examples here
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Respected sir,
i am getting an error: "BK1506: can not open debug\stdafx.sbr"
"error executin c1.exe"
i am getting this type of error in each and every vc++ program whenever i try to compile any program.
I can not find the solution,please help me.
please give me some useful suggestions.
It is urgent.
Thank you.
|
|
|
|