|
ModifyStyle(0, WS_TABSTOP, 0);
it is this easy
|
|
|
|
|
Hi all
do you know a macro to understand during compiling if I'm using the Visual C++6.0 compiler or the latest Visual Studio.Net compilers instead of another compiler like TASKING or BORLAND CPP?
I need to make difference for them to use in some of my #ifdef #endif definitions.
Reagards
MAnu
|
|
|
|
|
Yes, you can use the _MSC_VER macro. Search it on this page[^] for more details.
|
|
|
|
|
Hi Cèdric
Many Thanks and have a nice day!
Manu
|
|
|
|
|
#if _MSC_VER <= 1200 // Visual C++ 6 or less
|
|
|
|
|
There is a message box window and I need to find it among the other Win windows, should bi FindWindow to search for its specfic "title" and then it has 2 buttons in it "Cancel" and "Ok" I need to send a message button_click to one of them.
How to find that message box window by its title, find the handles of the "Ok" and "Cancel" buttons and send a message to one of them? I dont remember all the windows API for this
9ine
|
|
|
|
|
HWND hwndParent = FindWindow(NULL, "title");
HWND hwndOK = FindWindowEx(hwndParent , NULL, NULL, "OK");
SendMessage(hwndOK, BM_CLICK , 0,0);
|
|
|
|
|
Or post/send message to hwndParent, WM_COMMAND, IDOK, or IDCANCEL.
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
I have created a function display a dialog. When I try to show a previously selected window, it causes error. :(What seems to be the problem? Here’s my code:
void CProjectView::SetSelectedDialog(CDialog* dialog)
{
if(m_pSelectedDialog)
{ //Hide previously selected window
m_pSelectedDialog->ShowWindow(SW_HIDE);
}
if(dialog)
{ // show Selected Window
CRect rect;
GetClientRect( &rect );
m_pSelectedDialog = dialog;
m_pSelectedDialog->MoveWindow(rect, TRUE);
m_pSelectedDialog->ShowWindow(SW_SHOW);
}
}
|
|
|
|
|
romuzu wrote: it causes error
What error ? Be more specific.
|
|
|
|
|
|
|
That depends on how receive collour 7x . Also library in mapped dynamically or equivalent may play part...
Now if you would make your question a bit more comprehensible, the answer you receive might be more comprehensible too...
|
|
|
|
|
Hi all,
How can i set the tabstop property of a control to FALSE from the code ?
Thanx in advance,
Desmo16.
|
|
|
|
|
ModifyStyle(WS_TABSTOP,0,0);
|
|
|
|
|
That's what i needed, thanx but...
How can i re-enable the tabstop ?
|
|
|
|
|
ModifyStyle(0, WS_TABSTOP, 0);
it is this easy
|
|
|
|
|
Hope I understood your question
Did you see TabStop on property window of control
|
|
|
|
|
Hi,
in a loop i refresh items in a grid. Each line will update the screen...
How can i freeze the window before the loop and release it after the loop ?
Thanks
-- modified at 6:21 Tuesday 24th October, 2006
anyone an idea ?
|
|
|
|
|
Did u try SetRedraw() function?
nave
|
|
|
|
|
Works perfectly
Big thanks !
|
|
|
|
|
Hi all,
How can i set the order of navigation among controls when i press TAB ?
Thanx in advance,
Desmo16.
|
|
|
|
|
if you want to set at project creation time then,
(in VS 2003 IDE)
Display the dialog for which controls to set the tab order
then go to menu Format then press TabOrder
after this press the controls in the order you want the taborder set
|
|
|
|
|
You can also open the rc file in a text editor.
Where the dialog is declared, with all its buttons and so on, the order they are in in that text file is the tab order. So just change the order to what you want.
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
Hello,
I implemented design pattern class Singleton using VC++. But my destructor is not call automatically. What's wrong?
Thanks an advance,
Andrew
Listing:
class Singleton
{
static Singleton* _instance;
protected:
Singleton(){printf("\nClass Singleton has created\n");};
public:
virtual ~Singleton(){
printf("Class Singleton has destoying.. ");
delete _instance;
}
static Singleton* Init()
{
if (_instance!=NULL)
{
printf("\nError:Class Singleton already exist\n");
return NULL;
}
else
{
_instance=new Singleton();
return _instance;
};
}
void Proof(){printf(" Hello");
}
};
Singleton* Singleton::_instance=NULL;
void main()
{
Singleton* s1=Singleton::Init();
s1->Proof();
}
|
|
|
|