|
Work your way through the tutorials here and on MSDN. Oh and get some good books.
If that doesn't help, go on a Training Course.
If that doesn't help, maybe this isn't the career for you.
Anna
Homepage | My life in tears
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In
|
|
|
|
|
I am currently reading in B.C.S.Hons form Virtual Universty. But i not satisfied from that. I want to do gaem programming but here in Pakistan Multan no institue is offering for that, even in all Pakistan. Also i have visit the Libraries and Markets but I have got no book for it. If u think that books can take me up, then please send me a good prescription ,and if it possible send me the books also.
Khuda Hafiz (Bye)
Nazar Hussain
|
|
|
|
|
Hi,
I'm just converting from Visual Basic to Visual C++ so please forgive me if I come across as a dumb ass . At the moment I'm getting used to Dialogs using messages etc. My question is this - When you press the little button on the combo-box (causing CBN_DROPDOWN message), do you have to write the code that shows the available selections youreself? I'm used to having this done for me . If you don't, does somebody know why no available selections come up when I press the button on my app?
Thanks in advance.
Zak
|
|
|
|
|
You probably need to size the list. This is done by clicking on the drop-down rrow of the combobox in de resource editor. Then you can change the combobox it's height. Clicking the drop-down arrow again wil resume to normal sizing of the combobox control.
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Ok thats great thanks. I wouldn't have been able to see my strings. But no strings are still showing This is my code to add a string to the list -
char TestString[] = TEXT("Test");
SendDlgItemMessage(hWnd, IDC_ADAPTER, CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)&TestString);
There must be something wrong with this - any ideas.
Thanks again
Zak
|
|
|
|
|
Zak_ wrote:
char TestString[] = TEXT("Test");
SendDlgItemMessage(hWnd, IDC_ADAPTER, CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)&TestString);
There must be something wrong with this - any ideas.
Try it like this:
SendDlgItemMessage(hWnd, IDC_ADAPTER, CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)TestString);
Your code adds a pointer to a pointer to a 0-terminated string.
- Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hello,
I don't like wizards, so I decided to things on my own. I set up a project with a formview. I didn't do anything out of the ordinary, but the CWnd::Create() method just won't be called!
Can anyone please tell me where that method is called and what I have to do for that?
thanks
|
|
|
|
|
Give us the details, pal, and we'll be glad to help you. Why don't you post (part of) your code?
HINT: Check the return value of Create() and see if it returns 0 - if it does, something's terribly wrong.
Hope this helps (give the code, though) ,
Vikram.
-----------------------------
My site due for a massive update.
"Good lord you yanks are getting worse than a defensive VB developer at a C++ conference." - Paul Watson in the Lounge, 31 May 2003.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Hi,
I just don't know where to call Create(), I can't even find it in the wizards generated code!
regards,
|
|
|
|
|
iumentum wrote:
I just don't know where to call Create()
You should do it typically (but not always) from OnCreate() in the class that you derive from CWnd or CFrameWnd .
iumentum wrote:
I can't even find it in the wizards generated code
AFAIK, the wizard has no use for this. You'll have to enter it manually. Don't forget to check the return value.
TIP: Get MSDN, and a good book. I'd recommend "Programming Windows with MFC" by Jeff Prosise.
Vikram.
-----------------------------
My site due for a massive update.
"Good lord you yanks are getting worse than a defensive VB developer at a C++ conference." - Paul Watson in the Lounge, 31 May 2003.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
What is the necessary style the a list box must have to display characters such as this correctly: å, ä, ö, Å, Ä
Or is it just a matter of Windows regional settings?
|
|
|
|
|
I think the only requirement is that you set its font to one that's capable of displaying these chars. Arial seems like a good bet, but I suspect Tahoma (the now-standard Microsoft font) would also work.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I want a button to be drawn fully red, do i need to create my own button class ? Owner-draw button is the way to go ? If so, can you point me too any good article that talks about it ?
Thanks
|
|
|
|
|
One solution is ownerdraw via WM_CTLCOLOR.
Kuphryn
|
|
|
|
|
You can also take a look here in CP at the Button articles in order to find out some classes already done... CButton ST is a good class...
HTH...
|
|
|
|
|
Hi,
I have a VC++ application that launches another application in Run Time
<br />
char* pszFileName = "c:\\NewApplication.exe";<br />
spawnl( _P_NOWAIT, pszFileName, pszFileName,NULL);<br />
It works fine, but I could not find another command to terminate that application (NewApplication.exe) in Run Time
Anyone can help me?
Thanks
|
|
|
|
|
Use TerminateProcess(HANDLE hProcess,UINT uExitCode);
|
|
|
|
|
skaanji wrote:
Use TerminateProcess(HANDLE hProcess,UINT uExitCode);
No, No, No, No, No, unless you want the user to loose all the work they've done.
To quote the MS Docs:
The TerminateProcess function is used to unconditionally cause a process to exit. Use it only in extreme circumstances.
Please be very carefull about what you you suggest to people here.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hi,
I am trying & still find the way to do right!
Thanks
ATC
|
|
|
|
|
Hi,
I am working on it & still find the way to do right!
Thanks
ATC
|
|
|
|
|
|
Hi,
I am working on it & still find the way to do right!
Thanks
ATC
|
|
|
|
|
Obtain the handle of the window. Pass a message to it to shut down.
If it's an app that requires saving before closing then it should ask
Example:
HWND hWnd;<br />
LRESULT lpResult;<br />
<br />
hWnd = FindWindow(NULL, winName);<br />
if (hWnd == NULL)<br />
{<br />
return 0;<br />
}<br />
lpResult = DefWindowProc(hWnd, WM_SYSCOMMAND, SC_CLOSE, NULL);<br />
Hope this helps
|
|
|
|
|
Hi,
I did try your suggestion, but when I compiled I had two errors:
---> hWnd = FindWindow(NULL, winName);
---> lpResult = DefWindowProc(hWnd, WM_SYSCOMMAND, SC_CLOSE, NULL);
error C2440: '=' : cannot convert from 'class CWnd *' to 'struct HWND__ *'
error C2660: 'DefWindowProcA' : function does not take 4 parameters
Do you know why?
Thanks for help
ATC
|
|
|
|
|
In Java, they got rid of the use of pointers, and most Java
programmers will tell you because the creators want to get
rid of the pointers headache for programmers. I wonder if it
is true? Is pointers a headache for you? And is it useful? If
you don't use pointers, what alternatives do you have?
(off topic) By the way, do you happen to know if there is a
Java forum that is similar to this site?
Thanks.
|
|
|
|