|
Hi,
I'm currently migrating from Delphi to Visual C++. I already know C++, but I've got a problem with Visual
C++ itself. In Delphi, one can create an UI with so called forms. They resemble the dialog-based applications
which one can create in Visual C++. However, the dialog based applications lack for example a main menu.
I've also tried the SDI and MDI wizards, with the document/view architecture. It's possible the let
one of the views inherit from CFormView, but that's not exactly what I'm looking for, since I don't
need the document/view architecture.
Any help would be appreciated,
Ton.
|
|
|
|
|
You can assign a menu to a dialog in the dialog editor.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
You can try RadVC add-in (www.capitolsoft.com) too. It lets you work in a Delphi / VB - like RAD environment in Visual C++.
|
|
|
|
|
hi!
I use some keyboard function in a dialog box . ex. KEY_UP,KEY_DOWN.....
but ! why the function can't Work!
Could you teach me
|
|
|
|
|
Hi..
a little bit difficult to write you back.. cause the interesting thing would´ve been HOW you tried to do this.. one thing that may help you is overriding the PreTranslateMessage virtual - function. (i hope your using MFC)
There you can handle all the events you would like to.. and if you return false the message gets routed down to CMainFrame (if you´re using the Doc / View Stuff...)
BOOL CDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message == WM_KEYDOWN) //#256
if(pMsg->wParam == VK_ESCAPE) //#27
{
// do whatever you want to do if the user presses VK_ESCAPE
return true; //you´ve handled the message.. don´t route it any further
}
return CDialog::PreTranslateMessage(pMsg);
}
hope that i could help you with that...
|
|
|
|
|
Hi,
I have a project in VC++ that in release version works on some system without any problem but on some system it has bug on need to rebuild. ALL system are PentumIII
with WIN2000.
Please send me any advise you can.
maYSam
|
|
|
|
|
Hi everybody
I found answer of my question myself. It was because of optimize for maxspeed
in release version that cause crash only on few computers and I turned off
optimize of a function that was insecure with #pragma optimize("",off) and now I
havn't any problem.
maYSam
|
|
|
|
|
<<< In the name of GOD >>>
Hi,
I want to know, what is really CALLBACK ???
Is it function ?
What is performance ?
So, explain FULL about it ...
And if possible please write a example ...
Thanks.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
CALLBACK is a typedef referring to the
__stdcall "function calling convention".
You can read a FULL explanation about __cdecl, __stdcall and __fastcall calling conventions in MSDN.
--------------------------------------------------
If my messages appear curt, I apologize.
I try to be brief to save your time as well as mine.
--------------------------------------------------
|
|
|
|
|
in addition to what gbo said i think you might mean "what the hell is it?" and so it is simply a function pointer you provide to various api and mfc functions that allows the os to call into your app when an event happens that you want to be notified ... it kinda is a alternative to getting a message posted to your app queue for some situations (timers etc)
as far as i know that is
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
it's just a define to __stdcall, which is what windows uses (generally).
WINAPI, APIENTRY, CALLBACK,... etc, are #defined in windef.h, you can
look in there to further see what other calling conventions windows
has defined for you.
__stdcall says to push function arguments on the stack from right
to left, then call the function.
Mike
|
|
|
|
|
Is obj file written on fortran.
Is source this file.
May i have access to this file if..add it to vc rpoject..?
If yes how?
THX.
|
|
|
|
|
you can create lib and use as all other libs
(i never tried to add obj between lib files but from project settings\link\object-library modules naming has to be possible too)
t!
|
|
|
|
|
Is obj file written on fortran.
Is source this file.
May i have access to this file if..add it to vc rpoject..?
If yes how?
THX.
|
|
|
|
|
How can I use timer functions in Win32?
I'm doing an alarm clock so I want to learn!
CocaCola
|
|
|
|
|
Hello, the codegurus around the world.;)
I'm not familiar with Win32 like C style code so much,
but this is my guess.
1) Use ::SetTimer API function.
2) Pick up WM_TIMER message at WinProc function.
3) Maybe wParam or lParam includes Timer ID.
Or someone helps this?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hi,
I must introduce to you, KillTimer function for erase timer.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
You should use a threaded timer. The windows timer messages are the lowest priority messages and cannot be relied on. There is no guarantee that they'll be processed on a busy system. There is a threaded timer class on CodeProject that I use all the time.
|
|
|
|
|
How do you open a unicode file, using the C++ standard library? So far, I can't see that this is possible (no Win32 API, or no wfopen()-just using plain C++ iostreams, how do you
open a unicode filename, say for eg., a Korean filename?).
Your help is much appreciated.
|
|
|
|
|
With the old C library, use _wfopen() . With the C++ library, use wostream /wistream /wiostream . With the Win32 API, use CreateFile() , but for this last one your app needs to either be built as Unicode, or call CreateFileW() directly. CreateFileW() will not work on Win 9x.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Hi there, Mike
Seems like there's a misunderstanding-while I agree (and am aware of) with _wfopen (used in C) and CreateFileW (Win32) I am still not sure how you would OPEN a unicode file NAME using the C++ library.
You see, the open member of all the streams you mentioned (wostream/wistream/wiostream) all take a char* pointer, NOT a wchar_t* thereby not allowing me to pass a wchar_t string.
Please let me know if you come across anything informative. Thanks for your help!
Cheers,
Shanker
|
|
|
|
|
CreateFileW() takes an LPCTSTR for the filename
that converts to unicode
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Classic case of communication errors; let me make it clearer: how do I open a unicode file NAME using the C++ library? Like I said, I do NOT want to use the WIN32 or plain C functions. The question arises, because none of the functions that open a unicode file take a wchar_t pointer to the file name. They all take in a char*.
Hope this makes my question clear. Thanks for your efforts!
|
|
|
|
|
Ah, I understand now. Yeah, the basic_fstream and basic_filebuf classes don't accept wchar_t* filenames. A design flaw, I guess. If the STL code weren't such an impenetrable mess of garbage, I'd suggest deriving a class from basic_filebuf and basic_fstream that accepts wchar_t*.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
<<< In the name of GOD >>>
Hi all.
I used of CRichEditCtrl control in my program,
I want to change font in CRichEditCtrl without change all text font, for example:
Indicate by "Arial" font: Hadi is a good boy.
Indicate by "Comic Sans MS" font: He have many good friends.
How can i do it ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|