|
Well, use two custom buttons and an edit control in the middle. Of course your code will group them as if there is just one single control...
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]
|
|
|
|
|
See if this article points you in the right direction.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Maybe detect Mouse position with WM_MOUSEMOVE, set a bool Button1 = false if it's on the second part and true when on the first part.
And on WM_COMMAND use the if (Button1) do action1, else or if (Button1) do action2.
|
|
|
|
|
I need a quick example on how to use tr1::regex class from VS2008.
I have a string like
"something" "something" ...
and I want to get only what's between the first quotes.
In VC6 find/replace it would look
Find: "\([^"]\)"
Replace: \1
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Try Namespace: System::Text::RegularExpressions
#using <System.dll>
using namespace System;
using namespace System::Text::RegularExpressions;
int main()
{
Regex^ rx = gcnew Regex( "\\b(?<word>\\w+)\\s+(\\k<word>)\\b",static_cast<RegexOptions>(RegexOptions::Compiled | RegexOptions::IgnoreCase) );
String^ text = ""something" "something"";
MatchCollection^ matches = rx->Matches( text );
Console::WriteLine( "{0} matches found.", matches->Count );
for each (Match^ match in matches)
{
String^ word = match->Groups["word"]->Value;
int index = match->Index;
Console::WriteLine("{0} repeated at position {1}", word, index);
}
}
http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx[^]
|
|
|
|
|
I don't thing he's referring to managed code. See TR1[^] here.
Steve
|
|
|
|
|
TR1's regex is based on Boost[^]'s Regex[^] library. See the sample presented here[^], for example. You may have to alter the namespace and #include , but that should be about all.
Steve
|
|
|
|
|
Hi,
I have an MFC application written manually (no wizard) as below. I am able to add a menu to it. But I also need a form view (where i can add buttons and other controls) . I created the required form in the resource editor (Resources->Dialog->IDD_FORMVIEW).
But how can I attach this IDD_FORMVIEW to my CDemoFrame?
Thanks
JC
class CDemoFrame : public CFrameWnd
{
CDemoFrame();
}
CDemoFrame::CDemoFrame()
{
...
Create(NULL, _T("My Demo Application"),
WS_OVERLAPPEDWINDOW,
CRect(Left,Top,Right,Bottom),
NULL,
MAKEINTRESOURCE(IDR_DEMO_MENU));//Adding menu for demo application
...
}
BOOL CMyDemoApp::InitInstance()
{
...
m_pMainWnd = new CDemoFrame;
...
m_pMainWnd->ShowWindow(SW_NORMAL);
...
}
|
|
|
|
|
I have read your book that is named Programming Windows, 5th edition,and the author is charles petzold.However,when I reading your book that Programming Windows, 5th edition,I feel very confused with it,because I can't understand about the content,especially after the 100 pages.How can I read it effective and improve my ability of programming.I wan to everyone can give me some advices.
Note: If you wish to unsubscribe from the newsletter then uncheck the "Weekly Newsletter" option above.
More about You (optional)
This allows you provide a biography which is attached to any articles you post, as well as your homepage, interests and even your birthday!
|
|
|
|
|
hanyonglu wrote: I have read your book that is named Programming Windows, 5th edition,and the author is charles petzold.However,when I reading your book that Programming Windows, 5th edition,I feel very confused with it,because I can't understand about the content,especially after the 100 pages.
Try harder (if VB.NET is not an option).
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]
|
|
|
|
|
CPallini wrote: (if VB.NET is not an option).
VB is never an option.
The wonderful thing about the Darwin Awards is that everyone wins, especially the members of the audience.
|
|
|
|
|
Charles Petzold is excellent, although aimed at a (very) technical audience. C++ may also not be the language for you (as a beginner). C# or Vb.Net tutorials may be a starting point. Java is also an option.
|
|
|
|
|
Michel Godfroid wrote: C++ may also not be the language for you (as a beginner).
There's two schools of thought here; some people think it's better learning from the bottom up.
Steve
|
|
|
|
|
I'll flog him asm next time. Builds character and perseverance. There's no reason these youngsters should suffer any less than we did during the Great War.
|
|
|
|
|
Stephen Hewitt wrote: There's two schools of thought here; some people think it's better learning from the bottom up.
I do. The Graussian School is for the opposite.
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]
|
|
|
|
|
Sometimes hiring somebody to do the programming for you is a better option. You may be geared to leading other people (as a boss), not programming.
|
|
|
|
|
Well if you want C++, go Command Line if your a beginner.
If you want a GUI go with VB or Java if you want something worth of your time.
|
|
|
|
|
Hi
I was trying to register a type library on Windows 7 OS. I ran the command prompt as "Run as Administrator" and tried to register my bunch of type libraries in a batch but it fails with Error code 8002801C (Access denied) .
Later I replaced Regtlibv12.exe with Regtlib.exe in my batch file. All the type libraries registered successfully.
Can anyone tell me the diffrence. Thanks in Advance.
|
|
|
|
|
how to delete whole columns in list view /win32
|
|
|
|
|
|
after running ListView_deleteColoum in a loop ..
still its not deleting the first coloumn
|
|
|
|
|
From MSDN[^]:
Remarks
Column zero of the list-view control cannot be deleted. If you must delete column zero,
insert a zero length dummy column zero and delete column one and above.
|
|
|
|
|
Hi,
I have an Dialog based application. In which I created the Dialog and derived the class for that Dialog box. I write OnInitDialog() function inside derived class but it's not getting called when I call DoModal For that dialog.
I am calling DoModal from the Main dialog class which gets created when project creted. Systax for calling is below:
void CtestDialog2Dlg::OnBnClickedButton1()
{
CDialog testDlg(IDD_TEST_DIALOG10);
testDlg.DoModal();// Should call OnInitDialog()???
}
What I might be missing??
Mike
|
|
|
|
|
Did you try to debug the macros that are called before the OnInitDialog function call.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
See this line from your code:
mikert_2008 wrote: CDialog testDlg(IDD_TEST_DIALOG10);
You are creating the dialog as a standard CDialog !
mikert_2008 wrote: I created the Dialog and derived the class for that Dialog box.
Then use your class. For example, if your derived dialog is called
CMyDerivedDialog<br /> create your dialog like this:
void CtestDialog2Dlg::OnBnClickedButton1()
{
CMyDerivedDialog testDlg;
testDlg.DoModal();
}
and you should be able to catch the OnInitDialog() .
|
|
|
|