|
i'm so foolish, who can help me?
i got one message identification, for example, it's 0x10b3, how can i get the described information about it?
as above is just one instance, if many message identification arise, i'll jump into whirlpool
|
|
|
|
|
|
sunen wrote: ...how can i get the described information about it?
Given that you've simply shown a base-16 number, how are we to know?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
A fool is someone who fails to learn.
So, asking this question once is not foolish. Asking the same question again, will be.
So, to your actual question. Read the following blog article. I'll wait.
The Old New Thing: Which message numbers belong to whom?[^]
.
.
.
.
Back already? Wow!
So, 0x10b3 lies solidly in the class defined message category. So, without knowing what kind of window you have (or more importantly: what kind of window other code thinks you have), it's impossible at answer your question.
Without knowing a lot more, we can't help, sorry.
I wish you luck, and cleverness,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
you're a good man, thank you very much
|
|
|
|
|
Hi,
I tried to use "GlobalLock" to get HBITMAP data. But it returns NULL.
void myfunc(HBITMAP hMen)
{
....
lpVoid = (UCHAR *)GlobalLock(hMem);
....
}
lpVoid is NULL
What else function I can use to get Bitmap data from HBITMAP?
Thanks,
|
|
|
|
|
transoft wrote: Why GlobalLock failed?
I found this little detail in the documentation[^] page:
If the function fails, the return value is NULL. To get extended error information, call GetLastError()[^].
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
transoft wrote: What else function I can use to get Bitmap data from HBITMAP?
GetDIBits
an HBITMAP is not an HGLOBAL.
|
|
|
|
|
Hello,
when i came with the debugger to a function like this my
debugger will step into an little part of assembler.
i think it is the constructor.
how can i deactivate this sh*t!
i use MFC 2003 Version 7.1
void test(CString compress)
{
}
test("HALLO");
Thanks
|
|
|
|
|
Hwewet wrote: how can i deactivate this sh*t!
This type of language should be reserved for the back room.
However if you do not want to see the assembler then use "Step Over" rather than "Step Into".
|
|
|
|
|
I'm not sure that I understand your query right, but you're probably pressing F11 instead of F10?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
What i mean is when the CString is part of an function call.
When i try to step into the function first all of the Cstring constructors
comes with assembler code.
void function(CString xy,CString xy,CString xy)
{
}
F11
first CString assembler, sec. CString assembler,..., enter function...
|
|
|
|
|
you could press ctrl + tab and it'll restore the nature view
|
|
|
|
|
Hi,
This is not the proper forum for my question.But i dont know where to post it.sorry.
Iam planning to use WPF controls in my MFC application.Either directly or by creating DLL in C#.
But i dont know anything about that.Is there any book to buy about WPF and VC++.
Pls provide me any information on that.
Just i want is..the look of WPF like buttons,colored Listbox,colored Dialog.But functionality of all buttons should come in MFC applcaition only.
Anu
|
|
|
|
|
|
Hi,
After some struggle, and some good help from this forum, I find that I am now more or less managing to be able to manage my owner draw list box, except for 1 issue.
The strings I want to use contain tabs.
When I set my CreateStruct up in my PreCreateWindow, I have to disable LBS_MULTICOLUMN or my custom DrawItem function does not get called.
The downside of disabling the LBS_MULTICOLUMN is that the tabs in the string are discarded and my formatting goes to pot, even when configuring LBS_USETABSTOPS.
Any Suggestions?
TIA
Tony
|
|
|
|
|
maycockt wrote: ...even when configuring LBS_USETABSTOPS.
Did you send the control a LB_SETTABSTOPS message?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I hadn't sent a LB_SETTABSTOPS message, but I had used SetTabStops funtion, which had no effect.
In my OnInitDialog I have tried the following......
<per>
m_plbMyControl = new CCustomListBox();
if(NULL != m_plbMyControl )
{
CRect rList(10, 10, 580, 285);
DWORD dwStyle = LBS_NOTIFY | LBS_OWNERDRAWVARIABLE | LBS_NOINTEGRALHEIGHT | LBS_HASSTRINGS | LBS_USETABSTOPS | WS_BORDER | WS_HSCROLL;
if(TRUE == m_plbMyControl->Create(dwStyle, rList, this, IDC_LIST_CONTROL))
{
//m_plbMyControl->SetTabStops(16);
::SendMessage(m_plbMyControl->m_hWnd, LB_SETTABSTOPS, (WPARAM)1, (LPARAM)16);
}
}
Whereas the SetTabStops call had no effect, the ::SendMessage just gets an unhandled exception.
I am sure the SetTabStops or LB_SETTABSTOPS is the right way to go, I just cant seem to work out how to use it properly!!!
Any further help would be much appreciated.
TIA
Tony
|
|
|
|
|
maycockt wrote: //m_plbMyControl->SetTabStops(16);
::SendMessage(m_plbMyControl->m_hWnd, LB_SETTABSTOPS, (WPARAM)1, (LPARAM)16);
Just to see if the tabstops are even being used, have you played around with other values besides 16? Four character units does not seem large enough to separate anything but very small (1-2 characters) words.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I've tried 0, 1, 4, 8, 16........
Each time using ::SendMessage it crashes with an Unhandled Exception.
TIA
Tony
modified on Thursday, December 3, 2009 10:06 AM
|
|
|
|
|
maycockt wrote: I've tried 0, 1, 4, 8, 16........
(I think) You need to use larger values, not smaller.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
A value of 16 should give 4 display units I believe, so bigger than that would cause larger gaps in my spacing?
I don't understand why the ::SendMessage is failing though, each time it falls over in the first ::CallWidnowProc of DefWindowProc, i.e. m_pfnSuper is valid.
I can use a WPARAM of 0, and a LPARAM of NULL and it doesnt fail, but the ListBox still ignores TabStops.....
I'm beginning to think a redesign using a list control and hidden HeaderCtrl might be the way to go........
Tony
modified on Thursday, December 3, 2009 10:45 AM
|
|
|
|
|
maycockt wrote: A value of 16 should give 4 display units I believe, so bigger than that would cause larger gaps in my spacing?
Yes, of course. The intent was to see if the tabstops were even working. At this point, you don't know if the tabstops are just not large enough, or if the LBS_USETABSTOPS style is being ignored, or if the LB_SETTABSTOPS message is wrong.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi David,
That probably was more blunt than I intended. I was more sort of querying that my understanding was correct of the dimensions.
The LBS_USERTABSTOPS I would guess is being ignored, probably because of one of the other settings.
Incidentally, would SetTabStops(16) have the same effect as the SendMessage()?
I would have thought it should.
Thanks for your help so far
Tony
|
|
|
|
|
maycockt wrote: The LBS_USERTABSTOPS I would guess is being ignored, probably because of one of the other settings.
That's easy enough to test. Create a non-ownerdraw listbox, and call AddString() to add the strings to it. If that works, then the problem likely has to do with the LBS_OWNERDRAWVARIABLE style.
maycockt wrote: Incidentally, would SetTabStops(16) have the same effect as the SendMessage()?
Yes. The former is just a convenient wrapper around the latter.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|