|
since it is a custom combobox control, I am not getting the notification message in the wndproc.
|
|
|
|
|
As always, you need to know what's going. To find out wait for the app to hang, break into it with a debugger and get you some stack traces. Do the UI thread first.
Steve
|
|
|
|
|
I have a window with 3 pane.
In the third pane i want to put tab control. Currently i wrote like this:
m_wndSplitterHor.CreateStatic(this, 2, 1)
m_wndSplitterHor.CreateView(0, 0, RUNTIME_CLASS(CSampleCollectList), CSize(280,300), pContext)
m_wndSplitterHor.SetColumnInfo(0, 200, 0);
m_wndSplitterVer.CreateStatic(&m_wndSplitterHor, 1, 2, WS_CHILD | WS_VISIBLE, m_wndSplitterHor.IdFromRowCol(1, 0))
m_wndSplitterVer.CreateView(0, 0, RUNTIME_CLASS(CSampleTree), CSize(250,0), pContext)
m_wndSplitterVer.CreateView(0, 1, RUNTIME_CLASS(), CSize(250,0), pContext)
So, im stuck with this tab control. I dont know how to add it in the third pane.
|
|
|
|
|
Why not in the same manner ?
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
Might [this] article help?
|
|
|
|
|
Hi,
I have a C++ MFC program which I am doing communicating with C dos console program
while doing a return from various methods in a CDialog derived class I get a
CInvalidArg execption in crtexe.c at the following location
fdef WPRFLAG
mainret = wWinMain(
#else /* WPRFLAG */
mainret = WinMain(
#endif /* WPRFLAG */
(HINSTANCE)&__ImageBase,
NULL,
lpszCommandLine,
StartupInfo.dwFlags & STARTF_USESHOWWINDOW
? StartupInfo.wShowWindow
: SW_SHOWDEFAULT
);
#else /* _WINMAIN_ */
My program is a MFC program I have a derived CWinApp that does the initlization
the CDialog header has both a
DECLARE_DYNAMIC(CprogDebug)
and
DECLARE_MESSAGE_MAP()
the code has implement_dynamic and message map entries
IMPLEMENT_DYNAMIC(CprogDebug, CDialog)
BEGIN_MESSAGE_MAP(CprogDebug, CDialog)
ON_MESSAGE(WM_RECEIVE_SOCK_MESS,receive_tcpip)
ON_NOTIFY(EN_REQUESTRESIZE,IDC_RICHEDIT22,OnRequestResize)
END_MESSAGE_MAP()
this execption was also the subject of a previous post
when I got the exception at this location by Doing a SendMessage to the CDialog window
from a worker thread
any insights would be appreciated
|
|
|
|
|
From the above it's impossible to guess, but you need to look at all the parameters being passed to the WinMain() function to see if they are valid. Given the frequency of this occurring in your programs you may like to check that you are not breaking the framework rules somewhere in your program setup.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Why are you using SendMessage ?
You should PostMessage to the main window and let the GUI thread make all the needed changes to the GUI itself.
Veni, vidi, vici.
|
|
|
|
|
When I hsd this problem in my worker thread exception at crtexe I changed
the Send to a Post and still got the exeception at crtexe
I subsqently removed all messaging to got that part of my code to work
but now that problem comes up again I begining to think its the way I have my .h and .cpp set up
I checked all the MFC macro pairs e.g. DECLARE_DYNAMIC .h IMPLEMENT_DYNAMIC .cpp
DECLARE MESSAGE_MAP / BEGIN MESSAGE_MAP etc
|
|
|
|
|
Changing the function call is not enough. The Newcomer's rule "Don't touch the UI" holds here (see "Worker Threads"[^]). You have to notify (with, for instance, a custom message) to the main window that something changed (the UI needs an update), and let the main window (that is the GUI) thread make the actual update.
Veni, vidi, vici.
|
|
|
|
|
I did a PostMessage to the Main Window CMainFrame and same exception at WinMain
I got to beleieve it something along the lines of what Richard MacCutchan
Said that it must be something with my setup
|
|
|
|
|
Yes it might be. Anyway what kind of PostMessage are you doing? That is, are you posting a custom message?
Veni, vidi, vici.
|
|
|
|
|
Yes I am must be something in My CWinApp statup code
|
|
|
|
|
Hello,
I am doing a school project and I need to create a MFC application.
One of the buttons my application has is to restart the computer in Safe Mode with Netwokring.
I also need the computer to start normally after any kind of restart, without the user having to do anything special for this.
I already searched for solutions, but I have not found anything. Is this possible and if so, can anyone help me with the code?
Cheers!
|
|
|
|
|
I found this article How To Enter Safe Mode Using the System Configuration Utility[^] which tells you how to boot into Safe Mode with networking.
You could do this yourself by editing the boot.ini file and adding /safeboot:network and then restart the machine. You would off course needs the rights to edit the boot.ini file.
Have a try and see if you can get this to work.
0100000101101110011001000111001011101001
|
|
|
|
|
Thank you for taking the time to look into this. The method you suggest has no reason not to work.
The problem is that if I edit the boot.ini, it remains edited and keeps the user from starting their computer normally (i think).
Of course I can add the reverse button in my application, but it requires more action from the user.
I need Windows to start normally after it first restarts in Safe Mode with Networking.
I think a solution is to tell my app to start with Windows, only once, so I can revert that command automatically once it starts.
Now only if I can find out how to do that
|
|
|
|
|
There are several registry keys (http://support.microsoft.com/kb/314866[^]) where you can place your program to start after a reboot.
The article mentions that you can use the Run Once key to even start a program in Safe Mode by adding * in front.
0100000101101110011001000111001011101001
|
|
|
|
|
Thank you! I will try to do what you suggested and come back with the result
Cheers!
|
|
|
|
|
Just out of curiosity, what does MFC have to do with the underlying problem of restarting Windows (in a particular mode)?
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I am trying to learn C++ and particularly MFC. This is what the project is about more than anything.
This is why my question is not specifically how to start windows in SMwN, but if there is a way to do this in C++/MFC via a button, so that it does what I want it to do.
I am a total newbie but with a big appetite for learning.
|
|
|
|
|
Fair enough.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hello,
I'm using Windows SDK for building an applications without Visual Studio
I've tried to build boost lib using "bootstrap.bat" from installation folder but got an error:
"program can't start because mspdb100.dll is missing..."
I see that dll is from VS installation.
do you how I can build boost without VS but using WinSDK free commandline compiler tools only?
|
|
|
|
|
As a note there is a boost forum at the boost site.
But possible solutions
1. You do have the library. So find it and then set the lib path.
2. You do not have the library but there is a MS source for it. Find it, download it, set the lib path.
3. It only exists in Visual Studio.
a. So buy Visual Studio
b. Find the code that uses that library, and use a macro to remove it. Remove the lib dependency.
|
|
|
|
|
Additionally to jschell's 3a point: you can try with Visual Studio Express[^], it is free but has limitations (like no MFC).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|