|
hi,
i'm programming an opengl program using visual studio .net. my project uses standard windows library(no mfc or atl). when i try to set a break point on a variable or a function, i keep on getting the error message "intellisense couldn't not find the specific location". does anyone know how to set the break point properly?
also, what file do i need to include in my project in order to use the "TRACE" function? is there a way to redirect printf's output to visual stuio .net's "output" panel/window?
thanx in advance.
|
|
|
|
|
Hello,
I Created a dialog which allows a user to select directories. I now have to code the tree control in which the directories appear. Is there a simple way to do this or do I have to handcode it all?
thanks
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
|
Thanks, but thats not excactly what I meant. It's hard to find an example, but I'm looking for one...
I'll describe the tree control in detail:
It contains the directories like the left splitter of the explorer.
It has check boxes so you can select directories,...
If I can get my hand on a picture or something, I'll post it.
thanks in advance.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi,
I would like to know how to maximize the window of a SDI project upon the excution of it..
Ehsan Behboudi
|
|
|
|
|
Hello,
Add the WS_MAXIMIZE to the window style! If you are using MFC you should modify the CREATESTRUCT in the PreCreateWindow() function.
hope this helps
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
In your app's OnInitInstance() , call ShowWindow(SW_SHOWMAXIMIZED);
|
|
|
|
|
How can i disable to move a window??
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
[^]
|
|
|
|
|
Have you looked at the WM_GETMINMAXINFO message?
|
|
|
|
|
One solution is to add a handler for WM_SYSCOMMAND. Ignore SC_MOVE.
if (WM_SYSCOMMAND == message && SC_MOVE == (wParam & 0xFFF0))
return 0;
Kuphryn
|
|
|
|
|
thanks that worked pretty good
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
[^]
|
|
|
|
|
We have an MDI app where each MDI window has toolbars of its own (ie. there are multiple docking toolbars on the main frame wnd and at least one fixed position toolbar on the MDI child wnds). And all of the buttons, on all of the toolbars, have tooltips.
but...
When you start the program, the only tooltips that will show are those that belong to toolbars on the main frame wnd. The only way to make tooltips start working on the child wnds is to move the mouse over a separator on the child wnd toolbars first. After you do this, tooltips work fine for everything. Clicking buttons doesn't help, moving over enabled/disabled buttons doesn't help; the separator is the key. And, you don't have to hover over it, just a quick fly over on your way to a button will do it.
This is sub-optimal.
Any ideas?
CheeseWeasle
|
|
|
|
|
I am finding this returns -1 in all cases in my program on a Windows 2000 machine. However when I run exactly the same code on another computer with in Windows XP it works correctly and returns 0, 1, 2 etc...
I need this as I have to know which image is being dragged across from the ListCtrl to a TreeCtrl.
Sounds strange to a novice like me and anyone who has come across a solution please HELP!
Failing this if anyone has bright ideas on a better method nice to hear from ya.
Btw, the imagelist was inserted using the InsertItem(int, LPCTSTR) not that that should make a difference.
Thanks
Noel
|
|
|
|
|
Noel Mulvihill wrote:
I am finding this returns -1...
And "this" is???
|
|
|
|
|
Sry - 'this' refers to the function GetHotItem() called as part of OnLButtonDown() in my CListCtrl. When one clicks on an image list - I expect the index of the currently selected image (0,1,2.. etc) to be returned.
This happens when I run in XP, but not when I run in Win 2000 (I just get -1).
Ta,
N
|
|
|
|
|
I wonder if it could be a difference in the underlying common control?
|
|
|
|
|
I don't know. I sort of thought it might be linked in some way to messages given some problems with CListCtrl other people seem to have with - and it's mentioned in MS Knowledge Base in the following article "PRB: No ANSI Notifications from Control Created in OnCreate"(Article ID: Q148533).
I tried the solution in this article but it didn't seem to work and probably needs to be modified anyway - even if I am (somewhere!) on the right track.
|
|
|
|
|
Here is a simple one for those of you who did it before:
Let's say I know the exact path inside the registry to a certain key and I just need it's value, how do I read the registry ?
Thanks,
Shay
|
|
|
|
|
RegQueryValueEx() , or use CRegKey::QueryValue() .
|
|
|
|
|
First of all, thank you.
but can you be a bit more specific and give me a short example?
If I use RegEdit to look for the parameter I am interested in, it is located in: MyComputer\HKEY_LOCAL_MACHINE\System\
It's value is :HOME1
Type:REGSZ
How do I read it into a CString or a char *
Thanks again,
shay
|
|
|
|
|
Shay Harel wrote:
but can you be a bit more specific and give me a short example?
Did you read the MSDN documentation for the two functions I mentioned?
|
|
|
|
|
Yes but I have problems finding what is the lSize ?
|
|
|
|
|
|
<br />
CString strMainKey = "System\\controlset001\\Control\\session manager\\environment\\";<br />
CRegKey regKey;<br />
CString reg_read;<br />
long lRes;<br />
unsigned long lSize;<br />
<br />
if (m_str_log_name=="")<br />
{<br />
<br />
lRes = regKey.Open(HKEY_LOCAL_MACHINE, strMainKey,KEY_ALL_ACCESS);<br />
regKey.QueryValue(reg_read.GetBuffer(0), "SYMMHOME1", &lSize);<br />
regKey.Close();<br />
reg_read+="\\symmwin\diag6";<br />
<br />
}
I am almost there but the problem is that after I do:
reg_read+="\\symmwin\diag6";<br />
reg_read turns to be only "\\symmwin\diag6"........
any idea why ?
|
|
|
|
|
Per MSDN, the third parameter to QueryValue is:
"[in, out] The size of the string data. Its value is initially set to the size of the szValue buffer."
So, you need to initialize lSize to the size of reg_read . However, reg_read.GetBuffer(0) is pretty useless in this case. I would opt for another value besides 0. Something like 256 should be enough to hold the value.
lSize = 256;
lReturn = regKey.QueryValue(reg_read.GetBuffer(lSize), "SYMMHOME1", &lSize);
regKey.Close();
if (ERROR_SUCCESS != lReturn)
|
|
|
|