|
Thank you very much!
Mustafa Demirhan
|
|
|
|
|
WhenI declare variables for my Edit box and for my spin :
CSpinButtonCtrl m_Spin;
CEdit m_Edit1;
My program work ok, but when I quit the program I always get a message like:
>>
MYPROGRAM a causé une défaillance de page dans
le module KERNEL32.DLL à 0167:bff76840.
Registres :
EAX=005501d0 CS=0167 EIP=bff76840 EFLGS=00010246
EBX=005501d0 SS=016f ESP=00550000 EBP=00550014
ECX=00550098 DS=016f ESI=8196c340 FS=5eef
EDX=bff76855 ES=016f EDI=005500c0 GS=0000
Octets à CS : EIP :
ff 75 0c ff 75 08 ff 55 18 83 c4 10 64 8f 05 00
>>
How can use a Edit box with a spin without having that error????
|
|
|
|
|
Does anybody know how to easily convert a string from one charset to another.
Thanks in advance. Bill
|
|
|
|
|
Hi Bill,
MultiByteToWideChar converts character set to Unicode.
WideCharToMultiByte converts Unicode to arbitrarily character sets.
Hope this helps
Juergen
|
|
|
|
|
How fast you want to do it?
|
|
|
|
|
Does anyone have an example how to run JavaScript (or other ActiveScript as VBScript, etc.) from VC++? There is a lot of things that should be worked out to do this (the general problem is passing parameters). I need it ASAP and that's why I'm trying to find already working sample.
Any help will be appreciated.
Thanks!
|
|
|
|
|
Have a look to the MSSCRIPT.OCX ActiveX control. There're some sparse example in the MSDN Library.
I hope this control can help you.
-------------------------
Benoit Devigne
http://www.bdevigne.com
contact@bdevigne.com
|
|
|
|
|
I've been searching everywhere for a list of valid arguments to pass into a template class, and I can't find anything. I know that you can use "class" and any basic type, such as int, char, bool, etc., but I don't know how to pass in a string, for example.
I would like my template to be defined something like:
template<class t,="" string="" s=""> MyTemplate...
I've tried using "char *", "VARIANT", and "BSTR", but the compiler won't accept any of them.
Any help is greatly appreciated!
Thanks,
Jason
|
|
|
|
|
Hello,
I make my propertypages with the resource editor Visual Studio V6.
I create the propertysheet on the stack and I add the property pages.
The font from the property pages Arial 8 pt is however different than the one I have put with the resource editor Courier New 10 Pt. I tried the SetFont(&MyFont) function but my system make assertion failure.
My question is how can I change the font in my property sheets and -pages ? Any hel will be appreciated.
|
|
|
|
|
Is there a way for a syntactical equivalent for the (Java-) finally statement?
What is the most elegant way to simulate it without a subroutine?
Regards,
Juergen
|
|
|
|
|
Hi
there is
__finally
(2 underlines) but it is Microsoft specific - but as we are in the Visual C++ forum
Kurt
|
|
|
|
|
Hi
there is
__finally
(2 underlines) but it is Microsoft specific - but as we are in the Visual C++ forum
Kurt
|
|
|
|
|
Hi Kurt,
thanks for the reply.
But I want to be portable and can't use SEH.
I'm searching for some elegant solution without
subroutines.
What is the reason for no finally in standard C++?
Is there some better/exacter substitute than:
void finally() {
removecode;
}
try {
code;
} catch (Exception e) {
finally();
throw e; //if e shoudn't be chatched here
}
finally();
Juergen
|
|
|
|
|
Hello.
I'm making an ISAPI DLL - server extension.
I want to access an Access database (.mdb) throw ODBC in my code. When i call a DLL function from a browser code i want this function to make an ODBC calls.
When there is no any ODBC calls in the function code, the DLL works OK: returns HTML code and so on.
When i put only this 3 rows in the function code:
CMyRecordset rs;
rs.Open();
rs.Close();
and i browse (i call the function throw the browser) IIS gives me an error in installation or something...
I put my database .mdb file in a directori which is seen by IIS. ODBC is correctly set up and above code works when it is called from an ordinary application i tested it.
So i can not understand where is the problem. One told me that there is a special settings which must be made for an ODBC driver. I don't know yet...
Can anyone help me....
|
|
|
|
|
put try catch and see where is error.
Good luck,
Dror
|
|
|
|
|
What is the best way to read the sytemroot\system32, for different target pc's. example: winnt40\system32....winnt\system32...windows\system
This is in VC5.
Gerry.
|
|
|
|
|
take a look at the GetSystemDirectory() function
|
|
|
|
|
Thanks, this worked great...
Gerry.
|
|
|
|
|
hi,
I have written a MDI application that inherits CEditView for the view class. I wonder how can I load a text file without using the "Open File" dialogue box into the view. I have tried to insert the text line by line but it did not work because the application keeps printing at the same line in the view. It seems that there is a problem in generating new lines in the view. Any idea on how to solve the problem?
I appreciate your help.
Thanks.
leonwoo
|
|
|
|
|
CreateFile()
ReadFile()
CloseHandle()
make sure you put cr\lf at the end of each line not just lf
m_edit.SetWindowText(pData);
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
My band is a html document, when i change the html file in the band, using html links and then the close band (the x on the side, or the menu item )
i 'm getting the new page html (the link) that i pressed before closing the band. and i want to get the old document, ( my default document that is in the code.)
and the other problem .. and this is really somthing funny i have a text box (html text box) in the band and when i press the backspace button it doesn't delete the last letter .. in other words i can't delete the text box ... using the backspace or the delete button.
|
|
|
|
|
K. Your first problem I read as follows. You show the band with an initial page. click a few links and a different page is showing in the band. you close the band. Then show the band again and the page you see is the last page that you clicked to, not the initial page. This is because once you create a band object in IE it lives for the life of that IE instance. If you want it to always start at the initial page when the band is displayed then in the STDMETHODIMP <myband>::ShowDW(BOOL fShow) have your m_wnd object reset to the initial page using the res:// protocol.
Your second problem. This is due to the fact that the band is not implementing IInputObject. If it did you would then set focus to your HTML page and the backspace key should work. MSDN documents this http://msdn.microsoft.com/library/psdk/shellcc/shell/Bands.htm. Scroll to the bottom of the page and look for the heading "The IInputObject Interface" under "Optional Interface Implementations"
Cheers,
-Erik
|
|
|
|
|
I need help.
I need to change CDateTimeCtrl's background color (CEdit like part, not MonthCalendar).
Can any body helps me?
Eugene Karpov
|
|
|
|
|
I am about to write a dll that allows users to define keys (e. g. for a game), but I cannot distinguish between the right and left ctrl-key.
In the second parameter the WM_KEYDOWN-Message gives me this information in a DWORD-value (LPARAM), but I am not able to decode the information.
How can I get this done?
Thank you.
|
|
|
|
|
the right key (extended key) is pressed if bit 24 of lParam is set. so use the bitwise AND operator (&) to check that bit.
if (lParam & 0x01000000)
{
}
|
|
|
|