|
Hi,
I can override WM_ERASEBKGND and fill the control but it is valid only when the control has not the focus. If it gains focus, the text is drawn with a background system color (COLOR_WINDOW), WM_CTLCOLOR is not called.
Any idea ?
Nicolas
|
|
|
|
|
|
I dont know where to post this. My MFC app has a HElp Menu item> i want to launch the tripane help window from this button. My HTMLHELP workshop book tells me how to make a help project so I am assuming that I have the .chm file. Now I need to know how to launch this using the HTMLHelp API.....
|
|
|
|
|
You can use the ShellExecute function:
HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);
As operation you specify "open", as file your .chm file.
-Dominik
|
|
|
|
|
|
try using the remove(), replace(), insert() members of CString
---------------------------------------------
Be good! But if you can't be good, at least be good at it and try not to get any on ya!
-mjf
|
|
|
|
|
How do i use them on a char array?
|
|
|
|
|
You can't directly (not that I'm aware of anyways. However, one way would be to declare a CString and set it to your char array (CString str = charArray;) and them use the CString members mentioned earlier, are you could use the <string.h> functions such as strcat(), strcpy(), etc... Personally I prefer working with the CString as that wrapper class seems more flexible to me (or maybe its just cause I'm used to it). Either way would work fine and of course, you could also just use pointers and remove/replace in your char array as you like.
---------------------------------------------
Be good! But if you can't be good, at least be good at it and try not to get any on ya!
-mjf
|
|
|
|
|
hello!
i have a splash screen (greeting screen) in my mfc-programm. how can i change the time?(i would like to see the picture longer.)
thanks
MFC
|
|
|
|
|
search in your code for SetTimer
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
hello
i use static linking when i build my app but i had a tester tell me that on an old w95 machine the app couldnt load cos it was missing ws2_32.dll ... now i thought first off that static linking would put that in there but apparently not
can i distribute the ws2_32.dll as part of the installer without stuffing up old machines like that one?
thanks
"even if my world is weird it's my world" biz stuff about me
|
|
|
|
|
MS Redistribution package for W95[^]. (not needed on W98).
How low can you go ? (MS rant)
|
|
|
|
|
|
Hi,
My dialog based application don't run on another machine. In my dialog i have used the ActiveX component "Microsoft Forms 2.0 Textbox". I think that that is the problem. How can i code something to automaticly install this ActiveX comp. on a computer?
Please help me or give me a URL..
Thanks
|
|
|
|
|
This component is part of <winsysdir>\FM20.dll. Check out MSDN for further info about redistributing this stuff.
How low can you go ? (MS rant)
|
|
|
|
|
I have created a combo box control in a command bar control with the following code:
::CommandBar_InsertComboBox(hBar, hInst, 120 , CBS_DROPDOWNLIST , ID_ROOMS_COMBO, sizeof(g_arCmdbarRoomsButtons) / sizeof(TBBUTTON) );
To get a message when the user change the selected item of the combo box control I added the following message handler to my CMainFrame class:
...
ON_CBN_EDITCHANGE(ID_ROOMS_COMBO, OnEditChangeRoomsCombo)
...
void CMainFrame::OnEditChangeRoomsCombo()
{
...
}
...
So, the problem is that when the user change the selected item of the combo box control, this message handler will never called by the system!
(I work with eMbedded VC++ 3.0 and WinCE 3.0, but I think it is a simple MFC problem - a problem that I implemented something wrong).
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
MFC framework does not send ON_CBN_EDITCHANGE message if the combobox contains the CBS_DROPDOWNLIST style.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_MFC_CComboBox.asp
Kuphryn
|
|
|
|
|
Thanks! It works!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I read some simple char s (1 byte wide) from a file and want to build a string, based on this simple char s.
Sample:
Read 'B'
Read 'ü'
Read 'r'
Read 'o'
--> string: "Büro"
I use the following code:
while (TRUE)
{
char c = 0;
DWORD dwReadBytes;
if (!ReadFile(m_hFile, &c, sizeof(char), &dwReadBytes, NULL) ||
dwReadBytes != (DWORD) sizeof(char))
{
ErrorMessage(_T("Unerwartetes Dateiende (EOF) in Zeile %d."), m_nCurrentLine);
return FALSE;
}
if (c == '\n')
{
break;
}
str += CString((TCHAR) c);
}
The problem is the line str += CString((TCHAR) c); .
My system (PocketPC) works with UNICODE and so I have to convert the readed char to a UNICODE char .
I have used TCHAR that I can use the source code on both systems (UNICODE & non UNICODE).
So, the problem is now that when I read some chars like ö. ä, ü, ... the conersion result is a "?" .
So, when I should read the string "Büro" the result is "B?ro" . It look like, that the conversion failed!
How can I fix that?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
check out the USES_CONVERSION; macro in msdn and W2A() and A2W()
"even if my world is weird it's my world" biz stuff about me
|
|
|
|
|
lauren wrote:
check out the USES_CONVERSION; macro in msdn and W2A() and A2W()
...but how to use with a single TCHAR ? This macros uses strings (more than a single char) and no single chars.
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Fortunately, you don't speak Spanish. You wouldn't use Buro like that..
How low can you go ? (MS rant)
|
|
|
|
|
The applicatio is for german user...
"Büro" is the german word for "Office"...
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Because casting does not convert between character sets. What I'd do is read the data into a buffer (keeping it as MBCS), zero-terminate it, then put it in a CString which will convert it for you properly.
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|