|
Anonymous (that is bugDanny) wrote:
I did read all the postings before I made my post. My post was intended as a comment on the mildly annoying, albeit funny way that you posted your error in German originally, since you seem to be able to write English as well and this is a worldwide slight. I did not judge, or even all you stupid. (This is bugDanny writing, from a computer a don't usually use.) Neither did toxcct, I don't think.
Well, then I misunderstood you both and I'm sorry for that.
I didn't know that e.g. google translates of error messages are that good (I didn't want to translate the error message because I was afraid to give it a completly diferent signification...)!!!
My program works now. After I deinstalled VS and installed it again after a memory and hdd check... After a "new rebuild" of all my MFC-programs they worked again.
Sometimes computers drive me really crazy.
|
|
|
|
|
If your app was generated with the application wizard and you didn't change anything (at least, not intentionally), I'd suggest creating a new one in a separate directory and see if it produces the same error. If not, as I would expect, compare all the sources (*.cpp; *.h; *.rc) to see what's causing the problem.
Other than that, and according to the call stack you posted, the problem occurs while your dialog receives the WM_INITDIALOG message. From CWnd::OnWndMsg (the second item from the top of the stack), it's going to ATL::CRegParser::MAX_VALUE, which is weird and would indicate some corruption.
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
i derived my class XView from CListView. I set the mode to LVS_REPORT so that always the view is a table with Five columns with headers. Now i add values to the rows it works fine.
Now what i want is in one of the "client name" column there should be a facility to change the text on double click or so.
Thanks
|
|
|
|
|
catch the HDN_ITEMDBLCLICK notification from the header control embedded in the ListView control.
|
|
|
|
|
|
is it possible to make the radio button click automatically in dialog application after i make the data analysis?
from the books, i jst found that they teach how to make it function when we click the radio button. could anyone give me example of programming to make a button click automatically among a group of button wtht to click it manually?
|
|
|
|
|
I believe you want CheckRadioButton() or maybe just CheckDlgButton()
|
|
|
|
|
Now I had almost finished coding. I need to document my gui, so that in future if i read it or someone else read it they can regenerate the application.
I possible give me a proffesional documentation teamplate.
Thanks a lot.
|
|
|
|
|
|
Sure !! It's a great tool and it's not so tedious work I've you have taken it in consideration during developing time.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
i want to specify the caption of the owner draw button at design time.
|
|
|
|
|
Place your caption in the resource file (as with a classic button), then extract your text at runtime using GetWindowText. With an owner-drawn button, you will need to draw the text yourself.
Regards,
BB
http://spin.neostrada.pl
|
|
|
|
|
Hello,
I am developing an USB pen drive app,
the program works well with XP(or 2000) administrative privileges,
but it doesn't work without it,
because the way I get the drive handle is(suppose the usb pen drive is E:\):
HANDLE hDevHandle;
char szDrive[]= "\\\\.\\E:";
hDevHandle = CreateFile(szDrive,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);
CreateFile fail without administrative privileges,
following is the description of limitation from MSDN:
You can use the CreateFile function to open a physical disk drive or a
volume. The function returns a handle that can be used with the
DeviceIoControl function. This enables you to access the disk's partition
table. It is potentially dangerous to do so, since an incorrect write to a
disk could make its contents inaccessible. The following requirements must be
met for such a call to succeed:
1.The caller must have administrative privileges.
2.The dwCreationDisposition parameter must have the OPEN_EXISTING flag.
3.When opening a volume or floppy disk, the dwShareMode parameter must
have the FILE_SHARE_WRITE flag.
item 1 cause the fail,
How could I get drive handle without administrative privileges?
Thanks,
Chandler
|
|
|
|
|
|
can anyone tell me how to print in MFC
application
I have a public derived class whose
base class is CScrollView.
Have displayed some text on the view
want to just preview & print it on
the printer
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi
I have used CBannerStatic Class functions and running my text horizontally like Banner.
Now I have two to three sentence and I want to show one Bullete (may be one filled dot/circle) then how to show it ?
Thankx
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
What about using the bullet character if your font supports it. • Like so. It's alt + 0149 or U+2022. Else you'll have to draw one yourself using GDI.
|
|
|
|
|
I have one function with 3 parameters.
In that function I have one switch case statement which depends on first parameter of my function. Nearly the cases are 28 to 30. For each case there is another sub switch case which depends on the second parameter of my function with more cases. For different cases I am allocating different classes memory in one class object. At last the function returning that object. For this concept implementation is there any simple implementation or any other logic, any template. The cases are increasing because of new implementations. Expecting some better solution.
The sample code is:
CMyCls* CEmr:GetCls(DWORD dwDId, DWORD dwClsId,BOOL bFe)
{
CMyCls* pCls = NULL;
switch (m_byClsFamily)
{
case _FAMILY_1_:
switch (dwClsId)
{
case 0x8242:
if (bFe || (dwDId == DB_18C453))
pCls = new CMyCls1;
break;
case 0x8252:
if (bFe || (dwDId == DB_18C452))
pCls = new CMyCls2;
break;
...
...
}
break;
case _FAMILY_2_:
...
case _FAMILY_3_:
...
case _FAMILY_4_:
...
...
break;
}
return pCls;
}
Here All CMyCls1, CMyCls2, CMyCls3, CMyCls4,... all are derived from a class named "CMyCls".
Any help very thankful to them. It is urgent.
Nice talking to you.
|
|
|
|
|
IIRC, Andrei Alexandrescu's "Modern C++ Design ..." has a dedicated chapter to double/multiple dispatch using templates, you might want to have a look at it.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi
I have asked the same question but I didn't get any satisfactory answer, so I am again posting it here....
I have a dialog based MFC application in which I have used Microsoft Web Browser ActiveX control through which I allow user to navigate the sites.
Now if I want to hide cursor, I have used SetCursor(NULL) and also tried ShowCursor(FALSE) but the problem is : When I move my mouse with little bit of speed, it shows cursor and then again hides...what seems to be the problem, HOw to overcome it ?
Or is there a way to disable mouse ? So I don't have problem of hiding cursor.
Thankx in Advance
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Since your trying to take complete control over the system, you should act like it. You have to be firm. I'd say set up a system wide hook listening to WM_MOUSEMOVE messages, and just throw them all away. The cursor should no longer move. Look at SetWindowsHookEx(), remember your message pump must reside outside your application in a DLL if it's going to be global.
|
|
|
|
|
In my MFC application, I create a series of 4 dialog windows all idential (an array of dialogs).
Now I play a different video on each dialog on an Animate control.
For Dialog 1 (index 0) - see code below:-
CAnimateCtrl m_screen;<br />
HWND hMCI[4] = {NULL, NULL, NULL, NULL};<br />
<br />
hMCI[0] = MCIWndCreate(m_screen, AfxGetApp()->m_hInstance, MCIWNDF_SHOWALL | MCIWNDF_NOMENU | MCIWNDF_NOOPEN | MCIWNDF_NOPLAYBAR, "animation.mpg");
PlayVideo(0);<br />
<br />
<br />
<br />
if(hMCI[index])<br />
{<br />
MCIWndClose (hMCI[index]);<br />
m_MainText.ShowWindow (SW_SHOW); <br />
playVideo = true;<br />
displayed = false;<br />
m_screen.ShowWindow (SW_HIDE); <br />
}<br />
<br />
void CEmuDlg::PlayVideo(short index)<br />
{<br />
if(playVideo)<br />
{<br />
m_MainText.ShowWindow (SW_HIDE);<br />
m_screen.ShowWindow (SW_SHOW); <br />
::ShowWindow(hMCI[index],SW_MAXIMIZE);<br />
MCIWndPlay(hMCI[index]);<br />
<br />
MCIWndSetRepeat(hMCI[index],TRUE);
playVideo = false;<br />
}<br />
else<br />
{<br />
MCIWndPause(hMCI[index]);<br />
m_screen.ShowWindow (SW_HIDE); <br />
playVideo = true;<br />
if(!m_pClear.GetCheck ())<br />
m_MainText.ShowWindow (SW_SHOW);<br />
}<br />
}
Now the video only plays on a single dialog window. Do I need to do anything else to allow a different video play on dialog 3 say at the same time.
Can I only play on video per application?
|
|
|
|
|
Good day,
I have two dialogs. The MainDialog and WelcomeDialog.
WelcomeDialoghas a progress bar and MainDialog has
the initialization in which this initialization status is
shown in WelcomeDialog progressbar. I have a function in
WelcomeDialog IncreaseProgressBarStep(int step) which is
public so MainDialog can access it.
Here is what i wanted to do.
MainDialog::OnInitDialog()
{
WelcomeDialog childDlg;
childDlg.DoModal();
->InitializationStatement....
childDlg.IncreaseProgressBarStep(10);
InitializationStatement....
childDlg.IncreaseProgressBarStep(10);
............(until all initialization is done)
done initialization here....
}
The problem with this code is that the code with ->InitializationStatement will not be called
unless the childDlg is exited, thus childDlg.IncreaseProgressBarStep will be useless.
How can we communicate the two dialogs so that WelcomeDialog will stay on the screen while
whole initilization is not yet done.
Thanks and More Power!
|
|
|
|
|
Anonymous wrote:
The problem with this code is that the code with ->InitializationStatement will not be called
unless the childDlg is exited
Of course, this is logical. DoModal is a blocking call that will return the return code of closing the dialog. If you want to have childDlg 'not blocking' you will have to make it modeless. That is, maitaint a member variable in MainDialog and show the window. Take a look at this article[^]. It will help you to understand how it works.
|
|
|
|
|
Thanks. It does what I need.
More Power!
|
|
|
|