|
Create 2 dummy SDI projects. One with and one without HTML help enabled. You then need to look for the differences between the two any apply these changes to your existing project.
Thats probably the best route to follow.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Hi!
I am trying to create a database application using the Win32 API and by using ado.
pSet is my recordset pointer.
If I do this:
<br />
pSet->MoveNext();<br />
it works. And if I do this:
<br />
pSet->MoveFirst();<br />
It also works. But when I do:
<br />
MovePrevious();<br />
or
<br />
MoveLast();<br />
It doesnt work and it gives an "Abnormal termination" error!??!
Can someone help me?
Thank you very much for your future answers!
Well... I am a beginner ...
|
|
|
|
|
I am not an expert in this but if i am not wrong there are two types of recordset dynaset and something else. The feature you are looking for is availabe in one of them and not both.Just try to get more information about it.
The World is getting smaller and so are the people.
|
|
|
|
|
MAYBE your database service provider/driver does not support theese operations (backward seeking).
Every database engine supports another set of functions, I'm not sure whether all databases supports this type of seeking
rrrado
|
|
|
|
|
Hi
How i cant to output text in win application by horizontal, and whether exist way for this???
Thanks
|
|
|
|
|
Your question is not very clear.
Do you mean:
1. Difference between portrait and ladscape printing?
+----+ or +------+ for page layout
| | | |
| | | |
| | +------+
| |
+----+
2. Text orieintation (horizontal and vertical):
Text
e
x
t
3. Or something else?
Roger Allen - Sonork 100.10016
<small>If your dead and reading this, then you have no life!</small>
|
|
|
|
|
Ref the Disp() funs in the msdn... This fns should call thro an view class..
|
|
|
|
|
Hello,
Does anybody know if it is programmaticaly possible to change the default codepage of the system. Or even better if the default codepage an application uses can be altered. So that during the run of the program conversions can happen through usage of codepage x, where x can take several values during the lifetime of the program...
I need that to make sure that assignment of multibyte characters to CString objects are converted correctly and swprintf statements also convert parameters that are multibyte strings, to the correct equivalent in unicode..
If anybody knows a way, please let me know....
Greetings,
Davy..
|
|
|
|
|
Use MultiByteToWideChar directly. You shouldn't be changing the user's locale settings without their permission. As I recall, changing the system default locale requires a reboot anyway.
|
|
|
|
|
Thanks for the reply
However, in my situation it is so that the program is allready written, and suddenly 'they' came up with the tremendous idea that it should have that ability . So, I do not want to find every instance where I convert multibyte strings to unicode or vice versa using CString assignments, CString constructors, CString Format calls, sprintf wsprintf mbstowcs wcstombs and what other conversion calls there might exist (program written by multiple programmers so everybody has his/her favorite conversion-method).
About changing the locale of the user without his\her permission is luckily not an issue here, because this app is supposed to run within the company on only some specific PC`s which will only run this app, so I guess the app has the right to do it.
Reboot is also not a problem because if that^s all that^s needed for the data to be displayed correct it is a small price, the codepage will not need to be changed every 5 minutes or so, more about every 5 days...
Anyway, a process-wide default-codepage would offcourse be the best solution, but I don^t think that^s how it works.
So if anybody knows a way to achieve my goal without having to search for every place where a char string was converted to wchar string or other way around. Please let me know...
Greetings,
Davy
|
|
|
|
|
Aha!
SetThreadLocale looks like it does what you want.
|
|
|
|
|
hi
i have developed a server socket program which keeps on sending message. i have created a seperate thread using afxbeginthread(SendMsg,this) (this points to the CSocket derived class). im using carchive. the problem is when the thread tries to send messaage i get a debug assertion error.
i dont know what is the cause of the problem.
UINT SendMS(LPVOID lp)
{
CServerSock* pSock=(CServerSock*)lp;
do
{
pSock->SendStatus();// here i get error
Sleep(1000);
}while(pSock->m_pDlg->m_sta);
return 1;
}
void CServerSock::SendStatus()
{
m_pDlg->Serialize(*m_pArOut);
m_pArOut->Flush();
}
when i press retry i goes to base class
void CAsyncSocket::AssertValid() const
{
CObject::AssertValid();
ASSERT(m_hSocket == INVALID_SOCKET || CAsyncSocket::FromHandle(m_hSocket) != NULL);
}
outside the thread im able to send the message. i would be happy if u can help me with this problem
regards
aswin
|
|
|
|
|
I am just trying of the problem if i got i convey to u.
|
|
|
|
|
Dear u can not use CSocket in the worker thread .If u want to use CSockets with threads then use User interface threads.
But there are so many problems when u even use it in User Inteface threads.
What u should do Accept the sockets in the context of one thread(may be primary thread) , then Detach the socket handle from the CSocket Object Then start the Thread in suspneded mode ,Save it to Class level object of your CWinThread derived class.
Then resume thread .And attatch the Socket handle to Class level object of CWinThread derived class. may be in the Ininstance .
Now your socket object will be valid in the context of new thread.
Note:
You should also called AfxSocketInit Initinstance of your CWiThred Derived class.
if u dont follow these steps , may be your program work fine in debug mode , but it will get crashed in release mode.
No Worries!
|
|
|
|
|
Hi there
How can i create a CRgn from String?
Thanks for reading
|
|
|
|
|
One way I can think of is:
0) CDC::SelectObject (your font, perhaps)
1) CDC::BeginPath ()
2) CDC::TextOut (your string here)
3) CDC::EndPath ()
4) ::PathToRegion ()
Tada!
Don't forget to tidy up your CDC by removing any selected fonts, etc.
Iain.
|
|
|
|
|
|
Hi
I have a image in memory dc.How i can rotated this image on 90 degrees.I know how i can to rotate it on 180 with BitBlt fun but i not guess how on 90.
Thank
|
|
|
|
|
|
You will needed to create a DIB section and routines to read and write the pixels directly. The book "Programming Windows" contains code for doing this (no trig. required). Alternatly, on windows 2000 and above you can use world transforms (a bit tricky).
INTP
|
|
|
|
|
1) How to set the sound channel volumes and (un)mute those channels using the Windows API?
2) I saw SpyXX.exe Loading a library remotely (loading spyhook55.dll under winamp.exe, for instance). How can I do that?
|
|
|
|
|
Hello,
This site doesn't only contain a usefull forum, it also contains some usefull articles Spying[^]
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I've worked with Microsoft Office development , now I have next problem .
I 've created new Word XP document - E-mail message and try to set programmicaly value of suc fields as Subject,Recepient also add File Attachment . But I can't get access for this fields . I've found that this fields are included in the command bar Envelope that has type msoControlPane . How can I know that class from Microsoft Word Type library 10.0 correspond for this Pane control (_CommandBarButton,_CommandBarActiveX,... or something else) and how can I get access for fields that included in this Pane . Also how can I add extended fields as File Attachment or something else .
|
|
|
|
|
Hi folks!
I want to program a tool that only stays as a tray-icon.
My problem is how to design it in MFC.
The application is a CWinApp, but without a Window in m_pMainWnd it closes immediately.
How do I build an application that runs without a window?
Do I need a valid hwnd for Shell_NotifyIcon()? (I tryed with NULL as hwnd and it seemed to work..)
One solution may be to create a window but never show it. But perhaps there is a better way out there...
Thanks!
constantin
|
|
|
|
|
You could actually search this site...
One of the very first articles here was a Tray icon application by Chris Maunder.
Just search for tray icon etc.
Iain.
|
|
|
|