|
Radio buttons and check boxes are different styles of the button control.
Read the documentation for the WM_CTLCOLORBTN message.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi I've impleted OnCtlColor Event. The Back Ground Color and text of the radio button and check box are cheanged in VS 6.0 veersion. But it is not working in VS8.0.
Mallikarjun.TG
|
|
|
|
|
Hello,
Can anyone tell me how to convert CString to char*[]?
Thanks!
|
|
|
|
|
Why ? In general, there's no reason to do that. You should instead "convert" it to a TCHAR*, and there the conversion is automatic.
Please, read this excellent article[^] and things will get much clearer for you afterwards.
|
|
|
|
|
There's no meaningful way.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Same old question.
Just try this by yourself. (Assuming your's is non-unicode)
CString cs="Do I need it?";
char temp[100];
strcpy(temp,cs);
If it complains and asks you to "convert" you something, come back here.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
An array of char pointers...why?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello!
I have a problem with Post Data queries.I want to send a Post Data to a server.
I dont know how to use VARIANT structure.
Can you help me with simple example?
The post data is "username=&password=%D0%E5%E3%E8%F1%F2%F0%E8%F0%E0%E9+%F1%E5"
I'm using that code:
CString csAddress("about:blank");
COleVariant vtEmpty;
m_Browser.Navigate(csAddress, &vtEmpty, &vtEmpty, &vtEmpty, &vtEmpty);
|
|
|
|
|
I use the following code to create a splitter window in a function than CFrameWnd::CreateClient:
CCreateContext P;<br />
CFramWnd::CreateClient(..., CCreateContext *pContext)<br />
{<br />
P=*pContext;<br />
...<br />
}<br />
<br />
void CFrameWnd::OnAbout(...)<br />
{<br />
m_SplitterWnd.Create(...);<br />
}
When I debug it, m_SplitterWnd.Create(...) returns TRUE; but I can't still see the splitter boxes. why?
Thank you masters!
|
|
|
|
|
My MFC dialog based application has a combo box for the selection of languages.I want to change a static text on the selection of particular language.I have made resource DLLL for each language.
Can anyone tell me that how to link resource DLL with my MFC dialog based application and how to load strings from Resource DLL on selection of language from combo box.
Is there any setting also for this?
Thanks.......................
|
|
|
|
|
I am creating an ATL/WTL application in which i need to create a window.I have created the window now i need to create button, label and list view on it dynamically and attach these controls to the main window.
Also how to set color and text color on the controls and how to show an image on these control...?
i have classes for button and labels....like CMyButton....etc
Please help..?
Thanks in advance.
|
|
|
|
|
I suppose you'll get more replies in the ATL/WTL forum[^].
|
|
|
|
|
I have posted a query there but had received no reply yet....?
|
|
|
|
|
I have opened multiple instances of an APPLICATION using createprocess.
No I need to close one particular window using WM_CLOSE.
I need to know how I do it?
|
|
|
|
|
punav wrote: No I need to close one particular window using WM_CLOSE.
From another application?
What all information do you have about that information of the application( process handle, process Id, window handle etc )?
|
|
|
|
|
CreateProcess has a PROCESS_INFORMATION structure as the last parameter.
You can use the dwThreadId member of this structure and the WM_QUIT message to close a window using the PostThreadMessage API.
::PostThreadMessage(pi.dwThreadId, WM_QUIT, 0, 0);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi all,
I am working on VC2008, suppose i am woking on a project i opened it in vc2008 enviorment by double cliking on my .sln file. Now suppose i search for any variable or functions, it will provide me a result in find window i click on it and start modifying it now when i run my application the changes are not reflected... Now i come back in my editor and click on .cpp file and two files with same name are opened i.e two copies of same file is being made but when i come to folder where my files is being stored only one file exsist..... I am not getting how to resolve this....
Can anybody please help me with solution for this....
Thanks in advance
|
|
|
|
|
My MFC dialog based application has a combo box for the selection of languages.I want to change a static text on the selection of particular language.I have made resource DLLL for each language.
Can anyone tell me that how to link resource DLL with my MFC dialog based application and how to load strings from Resource DLL on selection of language from combo box..
Thanks in advance...
|
|
|
|
|
Look at the function CString::LoadString .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Is there any setting also to load the Resource DLL in MFC dialog based application?
|
|
|
|
|
What I am trying to do is create a base class that provides a basic interface and several child classes that implement the interface and extend it a little bit. I would then like to create a child class (at run time using pointers to the base class) whose type is determined by data in a table. So far so good.
In the code which has the pointer I am trying to call some of the functions that extend the interface depending on the situation. Compiler chokes (rightly) telling me the virtual base class doesn't implement those functions.
I can get around this by making the virtual base class define all the possible functions in the child classes and put dummy implementations in some child classes but it seems in-elegant.
Is there a better way to do this?
|
|
|
|
|
Since you are using the base class pointer to call the functions, those functions must exist as virtual or pure virtual in the base class.
In the derived classes, you must override whatever virtual functions are needed. In the case of pure virtual functions, it is mandatory that you implement this in the derived classes.
So instead of having dummy implementations is several derived classes, have a dummy implementation in the base class and don't make it pure virtual.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I did it by adding the virtual functions to the base class. Just seems like a clunky solution.
Thx very much.
|
|
|
|
|
i ues string class in a Win32 Console Application(build by VC++ 6),here is the code and errors, how can i fix it?
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include "Psapi.h"
#include <iostream.h>
#include <string>
using namespace std;
void PrintProcessNameAndID( DWORD processID )
{
string szProcessName;
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
PROCESS_VM_READ,
FALSE, processID );
if (NULL != hProcess )
{
HMODULE hMod;
DWORD cbNeeded;
if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod),
&cbNeeded) )
{
int len = lstrlen(szProcessName);
GetModuleBaseName( hProcess, hMod, szProcessName,
len);
}
if(lstrcmp(szProcessName, "smss.exe"))
_tprintf( TEXT("%s (PID: %u)\n"), szProcessName, processID );
}
CloseHandle( hProcess );
}
int main(int argc, char* argv[])
{
...
return 0;
}
errors:
... : error C2664: 'lstrlenA' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
... : error C2664: 'GetModuleBaseNameA' : cannot convert parameter 3 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
... : error C2664: 'lstrcmpA' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
i 've tried ,then i have no regret
|
|
|
|
|
Trying using szProcessName.c_str() instead of only "szProcessName " in the functions 'lstrlenA' , 'GetModuleBaseNameA' and 'lstrcmpA' .
|
|
|
|