|
Hi,
Have a look @ this article
http://www.codeguru.com/Cpp/controls/treeview/misc-advanced/article.php/c691
Sujan
|
|
|
|
|
In OnDraw, I use font on the pDC, and it works fine, But when printing and print preview , it didn`t do the font. Where should I attach the font to the printing DC, and why, Thanks
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
You can attach HDI objects to a printer DC in OnPreparePrinting OR OnBeginPrinting Handlers. If you want to do it in OnDraw, you can check if DC is printing or not by using
if(pDC->IsPrinting())
After that, you can do what you want with DC.
goodmast3r wrote:
and why
well, you better see some printing tutorials for this. Too much already available on printing stuff.
<marquee> STUCK STUCK STUCK STUCK
Stuck to Programming through an unbreakable bond
My Articles | My Blog
|
|
|
|
|
Can anyone explain to me how to use this function.
Function:
CopyResourceToFile(char*, int);
It havent seen any kind of documentation of source files with this . A friend of mine brought it up and I got curious on what it is for and how to impliment it. Any chance of solving this question?
|
|
|
|
|
Hi,
Is it associated with VC++. I think it is related with java. Have a look @ the following link.
http://www.st.cs.uni-sb.de/eclipse/javadoc/de/uds/cs/st/dd/util/FileUtils.html
Sujan
|
|
|
|
|
Actually it's related to VC++.
|
|
|
|
|
where did you see this function
There is no spoon.
mail
|
|
|
|
|
Hi,
I don't think that this is a VC++ function. Nothing related 2 this is present in the newsgroup.
No idea.
From the following link
http://www.st.cs.uni-sb.de/eclipse/javadoc/de/uds/cs/st/dd/util/FileUtils.html
i think that it is related 2 java
Sujan
|
|
|
|
|
I saw this function in one of my friends small programs. It seemed to export a file from that same program. Which was kind of cool and weird at the same time. Of course he isnt sharing the source. So I tryed to see if I replicate this function. It compiles fine. The only thing is it doesnt work and I dont know how or what it is exactly for. All I know is it looked like this
CopyResourceFromFil("File.exe", 232);
My guess now is that it "232" might be the name of a resource being exported in Bin? and that "File" is named of the exported file? Still confused about this. I know its a VC++ function because it compiles without error.
|
|
|
|
|
About DirectDraw................
I want to create a surface to receive the data from a videoport,but the overlay surface is unsupported.
Well,What kinds of surface should I create?
Please give me some suggestion
free like a bird
|
|
|
|
|
Hi,
Firstly, I am new to MFC so any help appreciated. I am building a single document MFC application without Doc/View Architecture support. In my application I want to be able to show different CView subclasses such as CListView, CFormView instead of the CChildView. I need to change to different views by click of a button Tool bar. So how can I achieve this? I have looked on the forums and articles on this site and have found nothing on the subject.
I appreciate any kind of help you can offer.
Robert Buldoc
|
|
|
|
|
Hi,
i do think that you must have to write a mdi application. Only mdi application can handle different types of view automatically.
have a look @
Multiple Document Types, Views, and Frame Windows
@ msdn
Sujan
|
|
|
|
|
Thanks for the reply,
I am thinking of getting the CWnd rect and using it as a place holder for other forms.
|
|
|
|
|
Is there a real simple way to disable a toolbar item programmically. I am trying CCmdUI however it doesn't seem to be working. The one difference here is that the toolbar I am working with in trying to enable and disable items is on a separate toolbar, not the mainframe or document toolbar.
Thanks!
|
|
|
|
|
Try this:
m_wndToolBar.GetToolBarCtrl().SetState(IDC_TOOLBARBUTTON1,~(TBSTATE_ENABLED))
here m_wndToolBar is the variable for that Toolbar and IDC_TOOLBARBUTTON1 is Button's ID.
<marquee> STUCK STUCK STUCK STUCK
Stuck to Programming through an unbreakable bond
My Articles | My Blog
|
|
|
|
|
thanks! Actually did figure out my issues. The resource ID's did not match any of the event ID if you know what I mean so they were all greyed out. This information you give here, though, I still may need. Thanks for the tip!
|
|
|
|
|
hi everyone..
i'm having this stupid problem that i don't know how to solve:
DWORD Size = GetFileSize(..);
int Arr[Size];
the problem is that Arr doesn't accept Size to be the number of elements!!!
|
|
|
|
|
I don't think arrays like to be dymically allocated. I think you have to give it a constant number.
Try using CStringArray instead.
Hope this helps.
|
|
|
|
|
int *pArr = new int[Size];
|
|
|
|
|
|
Not sure in C++ (yet anyways) but in VB there is a keyword to resize the array and to save the info in the array.
Killer coding ninja monkeys do exsist !
There is no spoon? How the frell do I eat my frosted mini-wheats
|
|
|
|
|
thanx very much..i used the allocating in the heap way since i'm not intending to use MFC (CMap)..
|
|
|
|
|
Hello, I hope someone can help me here. I've been working on a project that allows me to inject data into the stream of keyboard and mouse devices. So far I have, I believe, succesfully called DefineDosDevice and CreateFile to open HANDLE's to the mouse and keyboard.
However, I am now stuck because I cannot find any documentation or information on how to use DeviceIoControl in the way I want to. MSDN only documents the use of disk geometry stuff, which isn't what I want.
As I understand it, now that I have the handle for the mouse, I should be able to call DeviceIoControl. I am not sure on the arguments, so here's what I know:
DeviceIoControl(m_hMouse,
CTL_CODE(
FILE_DEVICE_MOUSE,
0x802,
METHOD_BUFFERED, FILE_ANY_ACCESS),
NULL, 0,
NULL, 0,
NULL, NULL)
So, based on this, can anyone explain to me, at the very least, what arguments to send DeviceIoControl to control mouse clicks and movement?
Thanks, much appreciated.
|
|
|
|
|
Not to divert you form your endeavors, but you should also examine the function "keybd_event" and the "Raw Input" section of MSDN. They might help you out too.
|
|
|
|
|
Thank you, but they were unsuccessful.
As it turns out, I figured out what I needed to do. I rewrote new mouclass.sys and kbdclass.sys drivers. The need to access low level input was required, keybd_event and SendInput were insufficient, and they communicate on too high of a level, with windows messages.
Anyway, my new drivers work great, DeviceIoControl can control the mouse as it if were physically being moved. Wasn't a fun ride, but it works.
Thanks for your reply anyway.
|
|
|
|