|
try Validating the rect after completing drawing operation i.e. call ValidateRect after calling FillRect .
|
|
|
|
|
Ovidiu answered my question in previous question which I unfortunately didn't see until after posting this message. His answer is:
As long as you have not handled WM_PAINT in the static control, but you draw text in it from another place, for sure you'll have troubles after another window will overlap; just test it and see if I'm right.
Ovidiu
He is ABSOLUTELY right and now I have to figure out how I can handle just the WM_PAINT for that static control. I see a WM_PAINT for the DialogBar but I can't find a separate one for just the static control.
BTW, in answer to my response, it makes no difference if I do the validateRect before or after the FillRect. I'm sure Ovidiu is on the right track, but I just have to figure out how to do it.
|
|
|
|
|
quite right.
I think you need to override CStatic class to use in you app.
|
|
|
|
|
I would like to know how to write a hidden program (it will not display in the task bar).
Please help!
|
|
|
|
|
Try using the WS_EX_TOOLWINDOW extended style when you create your window.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Is it possible to use MFC to do this?
|
|
|
|
|
Yes. But you'll need to use CWnd::CreateEx instead.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
But what type of application I should chosen to create?
Could you give me more detail steps?
Please help!
|
|
|
|
|
I programm it with vc+++ and mfc,atl.
does this has anything to do with the difference of the operating system? if dose, how to fix it? if not, what could have been the cause?
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
can you be more specific? Is that dll links with any dll supported on XP?
use depends.exe in visual studio to see dependency.
|
|
|
|
|
I detected four files my dll depends on with a software named Setup Factory. all of them are located in the system folder of window, which I think will be the reason and I have not had a chance to test it.
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
Run depends.exe, on both OS, if its shows some missing dll. Try to ship it with your dll, and test.
|
|
|
|
|
Hello,
I have matther with how to detect the memory infromation in windows platform. I want to get the some memory information, just as memory total size, memory type, memory manufacture, memory frequency, and so on. just the memory information in windows platform. Can you help me? How to do that? I hope your reply, thanks.
Hanson David
|
|
|
|
|
|
|
Dear WhiteSky,
Thanks for your kindly help, I have review the WMI correlative knowledge, but I don't how to implement it. Can you give me some example using the WMI method to get system information, thanks.Hope to get your help...
|
|
|
|
|
well i see your reply now.did you see this link is your problem solve?
|
|
|
|
|
HansonDavid wrote: I want to get the some memory information, just as memory total size, memory type, memory manufacture, memory frequency, and so on. just the memory information in windows platform.
This will get some of what you're looking for:
<br />
void some_function(void)<br />
{<br />
LPMEMORYSTATUS buffer;<br />
<br />
::GlobalMemoryStatus(&buffer);<br />
}<br />
The MEMORYSTATUS buffer looks like this:
<br />
typedef struct _MEMORYSTATUS {<br />
DWORD dwLength;<br />
DWORD dwMemoryLoad;<br />
DWORD dwTotalPhys;<br />
DWORD dwAvailPhys;<br />
DWORD dwTotalPageFile;<br />
DWORD dwAvailPageFile;<br />
DWORD dwTotalVirtual;<br />
DWORD dwAvailVirtual;<br />
} MEMORYSTATUS, *LPMEMORYSTATUS;<br />
GlobalMemoryStatus() is inside winbase.h, and I think MFC includes this by default, so you probably don't need any extra headers.
-Greg Dolley
|
|
|
|
|
Greg Dolley,
Thanks for your help, but I expected to get more information, not only the memory size. Bascially, I want to know the all dimm socket memory information, including the memory size, memory type, memory manufacture, and so on. Mabye the Win32_PhysicalMemory class of WMI will helpful to me, but I don't how to use it, can you help me? thanks.
|
|
|
|
|
Hi, here's the project:
A windows program written in C++ which will interact with a web application in Ruby on Rails. I don't even have a clue where to start. Is there sample code on this? Can someone point me to a good location to start my research? Thanks.
|
|
|
|
|
Hi,
I am trying to support Japanies character format throught windows 2000(Deafult English Language) and UNICODE application. I am using code page 932(Shift-JIS) though I am not able to convert the text to unicode. Event though I am entering text IME still it converts to Garbage characters. Same case with txt file stored in Shift-JIS format.
Similar case with code page 50221.
regards,
Nilesh
|
|
|
|
|
I have had a few similar problems with Chinese recently. In order for me to help you I need to know exactly what your code is doing and how. I'm guessing you are reading a MBCS file and trying to convert it to Unicode. How are you converting the characters? You say garbage characters, but did you check the hex value of each character to make certain they are really unicode? how are you displaying the characters, cout, messagebox, control window or some other means?
It would be best if you could show some code to tell me exactly how you are handling the characters and conversion.
|
|
|
|
|
Hi am Accepting one string from user in one edit box and display it in another edit box after conversion. For conversion I am using code page 50222.
The code is as follow.
OnXyzBtnClick()
{
CHAR *multibyte_buff= NULL;
CString str = _T("");
TCHAR *unicode_string = NULL;
int unicode_size = 0;
int multibyte_size = 0;
DWORD error_code = 0;
GetDlgItem(IDC_EDIT_SHIFTJIS)->GetWindowText(str);
_bstr_t bstr = str;
multibyte_buff = bstr;
multibyte_size = MultiByteToWideChar(50222,NULL,multibyte_buff,-1,unicode_string,0);
error_code = GetLastError();
unicode_string = new TCHAR [multibyte_size];
MultiByteToWideChar(50222,NULL,multibyte_buffmultibyte_size,unicode_string,multibyte_size);
error_code = GetLastError();
str = unicode_string;
GetDlgItem(IDC_EDIT_UNICODE)->SetWindowText(str);
}
|
|
|
|
|
I have a small question
How can I use the returned array (UintArray) to populate the combobox ??
I am trying but as the Addstring function takes String as argument , its not working ..
when I try to explicity cast it with CString it works, but the values returned are just garbage ...
can any one help me achieving this please !!!
thanks
|
|
|
|
|
CUIntArray arUint;
arUint.Add(123);
UINT n_element = arUint.GetAt(0);
char szElement[32];
itoa(n_element,szElement,10);
m_comb.AddString(szElement);
|
|
|
|