|
Happyjojo wrote: Is there an other solution than loading the images and extract the width and hight?
yes. you can learn how to parse each of the different file formats to find out how and where each format stores image size information.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
1. Does AcceptEx and ConnnectEx support IOCP?
2. Mswsock.h doesn't have a declare of ConnectEx, how can I use it?
3. If A sends a packet to B, then B receives it use in an IOCP method, but how does B know when to call WSAReceive? DO I have to use WSAAsyncSelect/WSAEventSelect at the same time?
|
|
|
|
|
Hi,
1. Yes, and yes.
2. U should be using winsock2.h
3. IOCP sockets that support 'receiving data', should be in a constant state of 'being ready to receive data. Due to the nature of IOCP, the worker threads are the ones handling the events, so you don't want to use WASAsyncSelect/WSAEventSelect stuff.
There are a couple of really good articles on CP for IOCP servers and sockets - you should have a look at them. Also, remember that if you have multiple buffers per socket (which you should have), you will not always be able to guarantee the sequence of partial packets received when you run on a multi-CPU box.
Hope this helps a bit
controlSHIFT
[WinShareSpy] [Glossary Manager] [AfterThought Backup Lite]
All good things were meant to be improved
|
|
|
|
|
Cedric
how u made "C" as red?
-Sarath
|
|
|
|
|
You can use html tags in your name:
<font color=#FF0000>C</font>
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hey Cedric it's really nice
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Why sigh: you responded to this boy?
|
|
|
|
|
|
ThatsAlok wrote: Now we will see color full board
It reminds me when you and tox were posting a lot at the same time
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: You can use html tags in your name:C
Humm ...!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Yes, sorry I shouldn't have told it . But, this was a question and I couldn't simply answer: "No, just go to hell"
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: No, just go to hell"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Why not just right-click his name, and select View Source from the context menu?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
I want to change the caption of the button in a property sheet. I have use the following code to get OK, Cancel and Help button,
MyPropSheet.m_psh.dwFlags |= PSH_NOAPPLYNOW | PSH_PROPTITLE ;
MyPropSheet.m_psh.pszCaption = "Simple";
Now I want the caption of the OK button to be "Submit" or "Go"... How to change the caption?
|
|
|
|
|
Use this code:
GetDlgItem(IDC_YOURBUTTONID)->SetWindowText("Text");
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
The problem I am facing is button is not created by me, so unable to get the ID. Its the default button of property sheet. (Just like the OK button in MessageBox).. I have tried the same code with a button ID IDOK but its not working.
|
|
|
|
|
Try out EnumChildWindows(Provided that the property sheet doesnt have many child controls) then check for the text if its the one you want to change then change the text of that control with your one.
Regards,
FarPointer
|
|
|
|
|
Aryan S wrote: I have tried the same code with a button ID IDOK but its not working.
What code are you using, and where?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi DavidCrow,
The same code means GetDlgItem(nId)->SetWindowText(szString);
But I am unable to change the caption of the default OK button.
|
|
|
|
|
What is the value of nId ? Where is this code called from?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
The value of nID is IDOK. The code is called in OnInitDialog(), I have tried the same code in OnSetActive() also. Should I call this code from some other function?
|
|
|
|
|
Aryan S wrote: The code is called in OnInitDialog()...
Of the sheet or a page?
Aryan S wrote: ...I have tried the same code in OnSetActive() also.
Which obviously won't work as the buttons belong to the sheet.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
This[^] article explains how to do it.
The ID is IDOK BTW - I noticed in another response you said you tried GetDlgItem(IDOK)->SetWindowText("Submit"); or something, and it didn't work - make sure you're calling GetDlgItem on the correct object, as that will work - I've just checked, as I've done it myself
- Dy
|
|
|
|
|
The problem here is I have not created any class which is derived from CPropertySheet. I am using the follwing code in OnOK function of the previous dialog,
CPropertySheet CPrinterProperties("Hello");
CPropPage stylePage;
CPrinterProperties.AddPage(&stylePage);
CPrinterProperties.m_psh.dwFlags |= PSH_NOAPPLYNOW;
And I have created the PropertyPage differently. Now how can I change the caption of the button.
|
|
|
|
|
Aryan S wrote: The problem here is I have not created any class which is derived from CPropertySheet.
You need to. You can use the following basic object to do what you're trying to do:
class CMyPropertySheet : public CPropertySheet
{
public:
CMyPropertySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
CMyPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
public:
virtual BOOL OnInitDialog();
};
CMyPropertySheet::CMyPropertySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
CMyPropertySheet::CMyPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}
BOOL CMyPropertySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
CWnd *wnd = GetDlgItem(IDOK);
ASSERT(wnd);
if (wnd)
wnd->SetWindowText("changed");
return bResult;
}
Now to use it, change the code you supplied to read:
CMyPropertySheet CPrinterProperties("Hello");
CPropPage stylePage;
CPrinterProperties.AddPage(&stylePage);
CPrinterProperties.m_psh.dwFlags |= PSH_NOAPPLYNOW;
CPrinterProperties.DoModal();
- Dy
|
|
|
|