Type: Posts; User:
I am trying to replay a metafile that has been saved on the disk. It works except for one thing. I cannot figure out how to get a proper scaling. If I don't do anything, when drawing the bitmap on...
Sorry for the late answer as the week end got me going.
Thanks for the answers, that are correct and working.
I have put in bold what I believe are all the changes from the beginning. They do produce a usable bitmap file, but in bloack and white only.
This palette thing is a "left over" from the number of attempts I have made to get all this to work. But removing it does not solve the "colour" problem. I still be a black and with bitmap.
After so many attempts, I have finally solved my problem. I had tried already using memory DC without success, creating the bitmap object at the beginning or the end... The only thing I failed to do...
Tried it, but my bitmap is still black... :(
I am trying to create a bitmap. This works well as I can obtain the correct result on the screen. But when I am trying to save the bitmap to a file, it become just a black rectangle.
I have tried...
April 20th, 2010
test = re.findall("_(.+)_", "asdassda_folder_asdswdfd_file_asedswfds")
The + operator is greedy and will take as much as possible that fits the pattern. Adding the "?" at the end means it will take...
February 15th, 2010
December 8th, 2009
I have created a validation rule to validate that the value in a textbox is within a certain range.
class ValueValidationRule : ValidationRule
private int _min = 0;
private int _max = 0;...
September 1st, 2009
I have an application which has a hook on the mouse using WH_MOUSE_LL.
HMouseHook = SetWindowsHookEx(WH_MOUSE_LL,
As I said multiple times, m_NOFR is not a window, it is a string, so you should use the method Format and not SetWindowText. But as you also have to update the data after that, it would be even...
And that anyway, *** lindley pointed out, having such an exception means that the code is not correct... ;)
In my message with the typo, there was a first piece of code. It is the declaration of m_pDialog that you need to add to your class. Then it will know about it.
I think pretty much all the errors you got come from a typo from my side. You need to put a coma rather than a semicolon int the initialisation list, before "m_pDialog"
Give me the list of errors and we'll see what we can do...
What I told you is still correct. If you want the object of type "MySdk2Client" to which the method "SdkDataHasArrived" belong to update the dialog, this object need to know about the dialog.
First, using the "code" tags would make it easier to read your code. Any way:
class CConnectDlg : public CDialog
This shows that m_NOFR is a CString....
Probably, the thing you should focus on is that the basic for loop is:
for ( [some expression]; [some expression]; [some expression] ) [some expression]
You have to find out what is and is not...
Show us what you have, i.e. your not so robust algorithm. ;)
1. We can't see anywhere in the code sample you provide where m_NOFR is coming from. There is part of your code missing (definition of the dialog class from the .h file for a start).
Are you accessing this COM server from all your threads using the same pointer?
Then again, looking at these lines of code:
m_NOFR is not a window but a CString, at least in this context.
You may want to look...
CMainFrame* pFrame = static_cast<CMainFrame*>(AfxGetMainWnd());
An example for the end of line characters "\r\n"
If you don't use them, when you open the file with a text editor, everything will be on the same line. If that suits you, that's fine not to use...
Click Here to Expand Forum to Full Width