|
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.
|
|
|
|
|
This is what microsoft had to say about your problem:
BSCMAKE Error BK1506
cannot open file 'filename' [: reason]
BSCMAKE could not open the given file. This message may be followed by a message from the operating system, giving additional information.
One of the following may have occurred:
The file was locked by another process. If reason was Permission denied, the browser in the development environment might be using the file. Close the Browse window and repeat the build.
The disk was full.
A hardware error occurred.
The specified output file had the same name as an existing subdirectory.
It is impossible to reason someone out of a belief if they were never reasoned into it.
|
|
|
|
|
Hi Folk,
I would like to know where it's possible to know some example of application that uses the IMAPI method.
I'd like to integrate the possibility to burn data on CD in my application.
Each suggest or internet link is welcome.
Thanks in advance.
Andrea;P
|
|
|
|
|
Hello,
I need a MFC component to select multiple folders using a CFileDialog-like dialog. I found tons of wrappers but none of them allow me to select multiple folders. I wonder if such a component exist or do I have to develop it by myself ?
Maybe there's a good MFC components library out there that supports such a great feature. My ideal component is like the Kazaa one, you select folders from a Explorer tree view, each folder name is prefixed by a check box. This way you can select folders from all around your network disks and local hds. Thing you can't do with CFileDialog. However such a component sound very hard to develop as I can't figure out to use the default ShellBrowser component. I would only have to hook its treeview and set its checkbox attribute to true... So easy
Last but not least, as I don't think such a "free" component exists (not found on codeproject nor codeguru), would you be interested by such a component ?
Kind regards,
JM
Web: http://goa.ifrance.com
|
|
|
|
|
created an SDI application, made a Dialog , Connected to the Database using ADO, retrieved the data in CString, but they are not shown in Dialog (Edit Box), I tried UpdateData(), nothing
How to do this?
|
|
|
|
|
Exceter wrote:
retrieved the data in CString
I suppose this is the CString from the edit box ?
Exceter wrote:
I tried UpdateData(),
Did you try UpdateData(TRUE) or UpdateData(FALSE) ?
~RaGE();
|
|
|
|