|
hi...
I am using IOCP technology for my project. in some of the sites i have seen, that in windows 98, this wont be work...,If its so,
then which are technology is available for supporting(chat) in win 98
also....
Is any one knows in GOOGLE TALK and YAHOO messanger which technolgy they are using for communication........?
-- modified at 9:32 Monday 11th June, 2007
|
|
|
|
|
If you're referring to IO Completion ports then I can confirm they're only available as part of the Operating System on NT based Windows, NT, 2000, XP, Vista.
This doesn't stop you implementing something similar yourself with a thread pool and synchronisation objects, It won't be as fast or efficient but lets face it, neither is Win98
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
How does one convert SYSTEMTIME to char *
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: How does one convert SYSTEMTIME to char *
Use <code>COleDateTime .
SYSTEMTIME sysTime = { 0 };
GetLocalTime( &sysTime );
COleDateTime odtDtTime( sysTime );
CString csTime = odtDtTime.<code>Format</code>(_T("%A, %B %d, %Y"));
|
|
|
|
|
|
Programm3r wrote: How does one convert SYSTEMTIME to char *
Outside of MFC, sprintf() will work just fine.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
|
Programm3r wrote: if (CompareFileTime((FILETIME*)dateCreated, &ftCreate)==0)
The first argument should be a pointer to a FILETIME structure. You have a char that has been cast to such.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This will work:
wsprintf(lpszString, "%02d/%02d/%d %02d:%02d:%02d",stCreate.wYear, stCreate.wMonth,
stCreate.wDay,stCreate.wHour, stCreate.wMinute, stCreate.wSecond);
if (strcmp(dateCreated, lpszString)==0)
{
...
}
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
If you are simply wanting to know if two SYSTEMTIME structures are equal, why not just use memcmp() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: why not just use memcmp()?
Don't know ... haven't though of that, but the strcmp is working fine, unless you for see a problem?
Thanks David
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: ...unless you for see a problem?
No problem, other than an unnecessary call to wsprintf() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
GetTimeFormat() and GetDateFormat()
|
|
|
|
|
Programm3r wrote: How does one convert SYSTEMTIME to char *
memcpy i.e.
char *charMem = new char[sizeof(SYSTEMTIME)];
memcpy(charMem,sysTime,sizeof(SYSTEMTIME));
"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
Support CRY- Child Relief and You
|
|
|
|
|
Hello All,
In my dialog box, I want to use an image on a button, so I made it as Owner Draw, I use CBitmapButton class and it is working fine. But when ever the dialog comes up, the initial focus is on the user defined button only. Here is the code for bitmap button
CBitmap bmp;<br />
BITMAP bm;<br />
bmp.LoadBitmap (IDB_ENABLE_BMP);<br />
bmp.GetBitmap (&bm);<br />
m_oMyBtn.SetWindowPos (NULL, 0, 0, bm.bmWidth, bm.bmHeight, SWP_NOMOVE | SWP_NOOWNERZORDER);<br />
m_oMyBtn.LoadBitmaps (IDB_ENABLE_BMP, IDB_SEL_BMP, IDB_FOCUS_BMP, IDB_DISABLE_BMP);
I found when ever I use "SetWindowPos" the initial focus is always on the owner draw button. If I remove "SetWindowPos" function then the focus is as per my tab order settings.
My idea is to resize the button as per the image size. If any other way to do that let me know.
Thanks for your time
BlrBoy
|
|
|
|
|
Hi BlrBoy,
Try using SWP_NOZORDER in your SetWindowPos function. This retains the Z-order of the control.
Hope that helps.
Kiran.
|
|
|
|
|
I am working on a project in C++/MFC that requires me to add custom buttons to Word 2007. I have been able to find tons of information using VB and C#, but nothing in C++ and only for creating a project from scratch. Anyone have any suggestions?
|
|
|
|
|
Hello,
I have creating a window with my menu which done in the following code
CreateMenu();
AppendMenu(MF_STRING, id_Data, "Data");
AppendMenu(MF_STRING, id_Edit, "Edit");
AppendMenu(MF_STRING, id_Entity, "Entity");
The above code works fine.
Now I want to add a popup menu to Data menu
How should I do That ?
Thanks
Pritha
|
|
|
|
|
Hi Paritha,
Here is a sample code:
<br />
CMenu menu;<br />
menu.CreatePopupMenu();<br />
<br />
menu.AppendMenu(MF_STRING, 10, "item 1");<br />
<br />
CPoint pt;<br />
GetCursorPos(&pt);<br />
<br />
CMenu menu1;<br />
menu1.CreatePopupMenu();<br />
menu1.AppendMenu(MF_STRING, 11, "Item 1 in submenu1");<br />
<br />
menu.AppendMenu(MF_POPUP, (UINT_PTR)menu1.m_hMenu, "Submenu1");<br />
menu.TrackPopupMenu(TPM_RETURNCMD, pt.x, pt.y, this);<br />
Hope that helps.
Kiran.
|
|
|
|
|
prithaa wrote: AppendMenu(MF_STRING, id_Data, "Data");
AppendMenu(MF_STRING, id_Edit, "Edit");
perform same on hadle return after call of AppendMenu
"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
Support CRY- Child Relief and You
|
|
|
|
|
Hello,
Thanks for your replies
And the code given by kiran did not work for me because I already have a menu with 3 menu options and now I want one of the menu options to have a popup menu attached to it which earlier was MF_STRING.
CMenu M;
M.CreateMenu
M.AppendMenu(MF_STRING, id_DAta, "Data");
M.AppendMenu(MF_STRING, id_Edit, "Edit");
M.AppendMenu(MF_STRING, id_Model, "Model");
Now the above works.
How should I have popup menu like the following attached to Data. I do not want to add to the 3 menu options above
CMenu M1;
M1.CreatePopupMenu
M1.AppendMenu(MF_STRING, id_Data1, "Data1");
M1.AppendMenu(MF_STRING, id_Data2, "Data2");
M1.AppendMenu(MF_STRING, id_Data3, "Data3");
Thanks
Prithaa
|
|
|
|
|
how to set the highest priority to socket program.
|
|
|
|
|
sakssp wrote: how to set the highest priority to socket program.
Why do you think you want to boost the priority?
Chances are that the error you're trying to "correct" by tweaking the priorities is a design flaw.
Tweaking the priorities of threads and processes is almost always wrong, or at least the wrong tool for the job. Don't mistake Windows for a real-time OS.
When you write it like that, I read it like "how can I disguise my error to make it even harder to track down".
What seems to be the most common mistakes when developing socket applications are...
- CSocket is used without the developer knowing that CSocket is a blocking implementation. Converting to CAsyncSocket is usually the medicine for this.
- CSocket and/or CAsyncSocket is used in a multithreaded application and worker threads are used instead of UI-threads. The threads that the sockets reside in have to pump messages and thus must be UI-threads.
See here[^] to get some more ideas.
If you neither find this post nor the link above helpful, post again and describe what you're trying to accomplish and what you've done so far. Especially if you still think you need to tweak the priorities of your process and its threads.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|