|
I won't answer what WIN32 means.
As far as I guess, wsbrk is a supposedly cross-platform macro which, when applied on WIN32 with UNICODE switch, becomes wcspbrk(). Whose signature is :
wchar_t *wcspbrk(
const wchar_t *string,
const wchar_t *strCharSet
);
Well in fact this macro could expand to anything other than wcspbrk but the name resembles it!
And I swallow a small raisin.
|
|
|
|
|
Thanks, StephaneRodriguez pal!
Do you mean wsbrk is used for character searching?
In my mind, it is used for memory management.
I have used man in Linux and MSDN in Windows to seek help, I find that sbrk is used for memory management in Linux. So, I think wsbrk is used for windows platform. The letter "w" here means windows. But I am not sure about it. And I also have little knowledge about memory management in low OS level. What is your opinion?
Cheers,
George
|
|
|
|
|
From Unix reference, obviously sbrk does a sort of malloc. So yes wsbrk might well expand to malloc or equivalent when it is on a WIN32 system.
There is no sbrk or wsbrk method available directly on WIN32, at least no result from MSDN search.
And I swallow a small raisin.
|
|
|
|
|
Thanks, StephaneRodriguez pal!
I think the same with you.
Cheers,
George
|
|
|
|
|
I want to install a USB device driver in my program!
A friend of mine tell me use the function "SetupCopyOEMInf",
but I know that this function can't be used on Windows98!
I want my program running on both WindowsNT and Windows98!
Who can give me an example or some advice!
Thanks in advance!
|
|
|
|
|
Hi, everyone!
I have searched the help page for "size_t" but failed
to find the help page and information about "size_t".
Where can I find the help page or information about
"size_t"? Can you paste detailed information about
"size_t".
Thanks.
Cheers,
George
|
|
|
|
|
|
Thanks, Lasse pal!
Your reply helps a great deal!
Have a nice weekend,
George
|
|
|
|
|
size_t isn't Microsoft-specific, it's part of ANSI/ISO standard C. It's defined in <stddef.h> and it's the type returned by the sizeof operator.
|
|
|
|
|
|
|
How about unsigned int?!?
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Thank, BlackSmith!
I got it!
Cheers,
George
|
|
|
|
|
I'm trying to access XML Web Service using C++ and I've got two
problems.
First, when I try to invoke web service's method from another thread
(not UI thread) I get SOAPCLIENT_INITIALIZE_ERROR error.
Second, when I pass to web service BLOB data which length is greater
than approximately 800KB I get
ERROR_IO_PENDING error (returned by GetLastError).
Is there any way to invoke web service's methods in worker threads and
to pass in BLOBs that are larger
than 800KB (C# client can send about 3MB)?
|
|
|
|
|
I have Overriden PreTRanslateMessage in my View class and I want to get which key has been pressed in it.How can I do it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
if (pMsg->message == WM_KEYDOWN)
{
then wParam is the keycode
}
IMO, OnKeyDown or OnChar is a nicer way to handle most keystroke actions.
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Chris Losinger wrote:
OnKeyDown or OnChar is a nicer way to handle most keystroke actions.
I want to do it in FormView and OnKeyDown and OnChar didn't work there so I have to ovverriden Pretranslatemessae.
Anyway,thank you.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Hi,
I got a Listview control which is ownerdata driven. I want to sort it but the LVM_SORTITEMS function just fails... I am not sure if it's relevant, but the GetLastError() return that the params are invalid. I checked it 20 times, the compare function is all right (CALLBACK, right params, return... all). I tried passing both NULL and some dummy to as the LPARAM (though it shouldn't ake any difference cause I don't do anything with them later). The HWND is valid and is used before and after this piece of code. The only thing that comes on my mind is that sorting isn't supported with ownderdata, but I haven't found a single line regarding this...
Thanks!
|
|
|
|
|
CaesarCZ wrote:
The only thing that comes on my mind is that sorting isn't supported with ownderdata, but I haven't found a single line regarding this...
It is supported with CListBox.
With CListBox an owner-drawn list box created w/ style LBS_SORT and items are added to it w/ AddString, then CListBox::CompareItem must be overridden with a version that compares two arbitrary items packaged in COMPAREITEMSTRUCT structures.
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
I am a little usure of how to do this. I want a function to run after the user slides to a new position. It would be nice if it ran at every instant of the slider movement. This function ses the brightness and it would be nice to see it brightening smoothly as you slide. How to I tie my slider which is in the toolbar, to this function? It has a varaible m_slider of type control.
Thanks,
ns
|
|
|
|
|
|
Well,(my slider is in the toolbar. I added it by Create -ing a CSliderCTRl in mainframe class)
I tried this:
void CMainFrame::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your message handler code here and/or call default
CSliderCtrl* pSliderCtrl;
pSliderCtrl= (CSliderCtrl*)pScrollBar;
int x = pSliderCtrl->GetPos();
CString s;
s.Format("%d",x);
AfxMessageBox(s);
CMDIFrameWnd::OnHScroll(nSBCode, nPos, pScrollBar);
}
I only have one slider m_slider, which I didnt know how to put into the above code.
When I slid, the execution didnt go into the function above. My slider is in the toolbar. Actually, though I added the slider in the toolbar via the mainframe class, I really want it to execute a function that belongs to my view class, when I slide it.SO
1. What am I doing wrong (need to involve m_slider somehow? )
How to get the view function to run if I slide?
Thanks,
ns
|
|
|
|
|
If I put a slider on the view form, then this works:
void CSliderctrlView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
CFormView::OnHScroll(nSBCode, nPos, pScrollBar);
int nPos1 = m_sl1.GetPos();
CString temp ;
temp.Format(" the position is %d ",nPos1);
AfxMessageBox(temp);
}
But
1. My slider is a mainframe variable, and exists in the toolbar.
It doesnt respond to WM_HSCROLL trapped by the mainframe class. When I did the Add windows handler, the filter (right hand bottom) was set to "TopMost frame".
When I added the handler to the view class, the filter was "window"
Looks like I need to do something special to trap hscroll in the toolbar....but what? ??
thanks,
ns
|
|
|
|
|
Your slider will send it's messages to the toolbar, so you have to relay it from the toolbar to your view.
void CMyToolbar::OnHScroll(UINT code, UINT pos, CScrollbar *pBar)
{
CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = pFrame->MDIGetActive();
CView *pView = pChild->GetActiveView();
pView->SendMessage(WM_HSCROLL, MAKEWPARAM(code, pos), (LPARAM)pBar->GetSafeHwnd());
}
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
New to sendmessage. I see youre sending WM_HScroll to the view. That clear. Now shall I put a handler for this in the view class? And within it call my function? What if some other scrolling operation happens, like when I scroll the mainframe or the view? I dont want the custom function to run then, which it will since I'm trapping all HScroll stuff.....How do I restrict the WM_HSCROLL handler of the view class to run only when I slide the slider?
Thanks,
ns
|
|
|
|