|
VK_ESCAPE
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks for the input. Your suggestion worked just fine. Best,
Ralf.
|
|
|
|
|
Is there anyway to Intergrate MSDN 2003 Library into Visual C++ 6, when i press F1, it says there is no Help System MSDN Availiable, when i goto Options -> Help System Tab, it says MSDN 2003 isnt installed.,
Is there anyway to get MSDN 2003, to be avaiable for Visual C++ 6
|
|
|
|
|
Im not sure about 'MSDN 2003' as such - I know there's a MSDN set that comes (or used to come) with VC++ 6, I havnt had any problems installing that - maybe you need this as a 'base set' before you can install more recent ones ..
'G'
|
|
|
|
|
The MSDN version that came with VS6 integrates with the product help system, and the updates through (I believe) October 2001 did also. Updates since then can be installed, but not integrated with the product help. You can still use them as a standalone resource, though.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
Check out Tools->options->helpsystem
how it helps.
God is Real, unless declared Integer.
|
|
|
|
|
Hello,
I have a dialog box that contains a static text field. The field is just empty and serves as a box that I want to write a number into later. When I use SetDlgItemText I can set the value of the static text field. If I try to call SetDlgItemText from a different thread then I can't seem to get it to work. Anyone ever encounter this problem?
The thread I'm trying to call SetDlgItemText from was created by the thread that the dialog box is part of, so I guess it would be a child thread trying to update a static text box in the parents thread. Here is what the code looks like:
sprintf(static_message,"%8.3f",measured_value_float);<br />
if (chan_num_int == 101)<br />
{<br />
strcpy(static_message_101,static_message);<br />
}<br />
if (chan_num_int == 106)<br />
{<br />
strcpy(static_message_106,static_message);<br />
}<br />
Right now I'm just moving the values into the variables that start with static_message_10N. The dialog then checks these global variables every second and calls SetDlgItemText itself. I would think that it would be much cleaner if I could just have the other thread do it.
Thanks,
Robert
|
|
|
|
|
I have some additional information. When running the code in debug I found that the value of hdlg in the code above was zero. That explains why the SetDlgItemText was not working. This presumably comes from my main dialog window code. The routine above has an
extern HWND hdlg;
so as to specify that the hdlg is declared in a different file. When looking through my dialog routine the interesting thing is that there does not appear to be anywhere that the variable hdlg gets set!
Here is the code that creates the dialog box in question that doesn't return until the dialog box goes away...
return DialogBox(hInstance,
MAKEINTRESOURCE(IDD_DIALOG1), <br />
NULL,<br />
(DLGPROC) DialogProc); <br />
When you look into DialogProc you see the following...
BOOL CALLBACK DialogProc(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
<br />
if (t_win_msgs < DBG_SIZE)<br />
{<br />
GetTimeStampStr(ats, char_ts, char_ts2);<br />
strcpy(win_msg_time[t_win_msgs],char_ts2);<br />
win_msg[t_win_msgs] = uMsg;<br />
strcpy(win_msg_text[t_win_msgs],"");<br />
if (uMsg == WM_COMMAND)<br />
strcpy(win_msg_text[t_win_msgs],"WM_COMMAND");<br />
if (uMsg == WM_TIMER)<br />
strcpy(win_msg_text[t_win_msgs],"WM_TIMER");<br />
if (uMsg == WM_AGILENT)<br />
strcpy(win_msg_text[t_win_msgs],"ser agi");<br />
win_hi_wp[t_win_msgs] = HIWORD(wParam);<br />
win_lo_wp[t_win_msgs] = LOWORD(wParam);<br />
t_win_msgs++;
}<br />
<br />
switch (uMsg)<br />
{<br />
<br />
case WM_AGILENT:<br />
return 1;<br />
<br />
case WM_INITDIALOG:
<br />
InitDialogProc(hdlg, uMsg, wParam, lParam);<br />
return 1;<br />
<br />
case WM_TIMER:<br />
<br />
SetDlgItemText(hdlg,IDC_STATIC_1,(LPCSTR)static_message_101);<br />
SetDlgItemText(hdlg,IDC_STATIC_2,(LPCSTR)static_message_106);<br />
return 1;<br />
The hwnd variable is the first parameter passed into DialogProc. It is then passed as the first parameter to InitDialogProc. It is used in there to do a bunch of stuff including naming the window title, etc...
But as I mentioned it does not appear to actually get set anywhere that I can see, unless it is somehow done automatically? If so, then why can't I see it in the other thread?
The description of the DialogProc routine seems to show that the first parameter (hdlg) is passed in. In my code, this is not getting set prior to the call to DialogBox that has DialogProc as the 4th parameter. When I set a break in DialogProc on the first line and then check hdlg, it has a non-zero value. When did that get set?
I should mention that the calls to SetDlgItemText under WM_TIMER are the ones that are working. I would just prefer to have the other thread set them directly instead of having to poll them in this manner form the main dialog box.
Robert
|
|
|
|
|
Well, I have it working now but I'm still not sure exactly what is going on. This much I can say. The variable "hwnd" within DialogProc only exists when in the DialogProc routine. So, I created another variable called global_hdlg which I set to hdlg every time DialogProc is called.
The other thread then declares global_hdlg as extern and passes it into SetDlgItemText.
There must be a cleaner way to do this?
Robert
|
|
|
|
|
Hi,
I am using ADO to connect with Database i.e _connectionptr. I want to know the table names.
But doesn't able to solve the problem.
I feel very thanksful if anyone helps me in this regard.
|
|
|
|
|
|
Hi,
Thanks for the solution, but the fact is that i have just at the stage of completion of Application and you know if i want to use ADOX i have to do lot of changes in code and that may create lots of problems for me.
So , if u know some other solution by using _connectionptr and _recordsetptr then please advice me.
|
|
|
|
|
ADO and ADOX go hand and hand. ADOX is an extension to ADO that gives you access to the things ADO left out. It has been a long time since I have worked with ADOX so I can not tell you any details.
John
|
|
|
|
|
Hi all;
I am buidling an SDI application which has a WebBrowser control in my view class (this project contains a single view). I could not use the webbrowser elsewhere as i could not access it. Someone suggested that i put the variables as "public" in the view class. This is ok. The problem is now, how can i access the variable anywhere in my application.
I have tried MyView::webbrowser.navigate("......);
but it does not work. Can somebody please help me,
Thank you
Krugger
Plan tomorrow todays cos' tomorrow will be too late..
|
|
|
|
|
Hi Krugger,
You must say to the compiler which view the WebBrowser belongs to, even if you know that's only one such view:
CFrameWnd* pMainWnd=(CFrameWnd*)AfxGetMainWnd();
MyView* pView=(MyView*)(pMainWnd->GetActiveView());
pView->webbroser.navigate(...); Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
I'm trying to set/unset the the CBS_SORT windows style dynamically in a dialog box. How can I do this using SetWindowLong or any other function in Windows SDK not MFC.
Thanks
|
|
|
|
|
DWORD dwStyle = GetWindowLong(hWnd, GWL_STYLE);
SetWindowLong(hWnd, GWL_STYLE, dwStyle | CBS_SORT);
Keep in mind, however, that some styles cannot be set at runtime. You might even have to subclass the combobox to get this to work.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'm generating a C++ DLL that we want to use within Visual Studio .NET C#. Everytime we pull the DLL into VS.net, the char* arguments have been converted to sbyte*. When we make calls from c#, and pass in the sbyte*, it only reads 1 character.
Why is my C++ DLL showing up as requiring sbyte* arguments ?
|
|
|
|
|
This is a multifaceted problem. Firstly, what is happening is that when you load a C++ DLL into a C# project/environment (such as .Net), it will attempt to convert all existing datatypes inside the DLL into CLR-compliant (.Net Framework compliant) types. The SBYTE structure represents a non-CLR-compliant 8-bit signed integer.
The reason, most obviously, for this is that your C++ DLL is created as ANSI-compilant, in which a char represents a signed 8-bit integer. However, in the C# environment, a char stands for an Unicode character.
Now, the solving might be attempted through the importing settings of the IDE. There should be, somewhere, an option to specify how non-CLR types are imported. I have never done this myself, so I am uncertain of where the actual option might be. Naturally, if you could specify HOW you are actually using the DLL (Importing it through a directive, linking with it, or by some other means), it might provide helpful.
Additionally, as char* types represent strings, and the concept of strings is wrapped into the 'String' type in C#, a viable approach into this problem would be to create a cross-platform DLL.
Did you know that you can use the Managed Extensions of C++ to write C++ code that takes advantage of the .Net framework ? In this approach, you can specify all special types, such as 'String' types, into your code, and they should be correctly imported by the C# project. The most magnificient thing is that if you use MC++ (Managed Extensions for C++), you can write code that runs on both a CLR-system (OS with .Net support) or a non-CLR one (Windows 95/98/old NT's). Special care should be taken, however, when developing this type of a solution.
One alternative would be to write your DLL as Unicode-compilant, in which you'd be required to change all your char types to TCHAR constants, that are mapped by the compiler based on what character set you've selected (This option is found under Project Settings). Additionally, you'd need to use the wide versions of all character manipulation routines. Consult MSDN with the keyword 'TCHAR' for further information about character mappings.
Lastly, you could try a different approach altogether: create your own class that encapsulates a string. Then pass these classes around when you need string variables. This is like re-inventing the wheel, but at least you don't need to use the MC++, if you feel uncomfortable with it.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I'm a newbie.
Could someone give me a code Sample How to place a CFormView inside a CTabCtrl?
|
|
|
|
|
look in this if anything could satisfy you... sorry but personnaly, i don't know.
TOXCCT >>> GEII power
|
|
|
|
|
Hi,
I work with the Visual Studio .net 2003,
and I write an application with Windows.Forms.
Now, I search a C++ solution which placed an image at the menuItem (left).
(This solution shouldn't use the MFC).
Can anybody help me?
Thanks
blue-marie
|
|
|
|
|
there are many good articles on CP not to ask this...
TOXCCT >>> GEII power
|
|
|
|
|
Have you got some links to this articles?
I have such found articles about C#, but I search a solution for C++.
thanks
blue-marie
|
|
|
|
|