|
You are dreaming. You have never seen anyone do anything like that since it's illegal code.
Maybe you have seen some one do it with "ticks" (') added round the "back-tick" or in a web-page that for some reason f***ed it up, or for a WM_CHAR with ESC (ASCII 27, which obviously can't be displayed)?
But again, you have _never_ seen C or C++ code that worked look like what you displayed.
|
|
|
|
|
|
A typo or some problem with formating the code in HTML editor.
Pavel
Sonork 100.15206
|
|
|
|
|
When i get to a certain point in my code:
acmDriverOpen(&hacm, hadid, 0);
I get a "User breakpoint called from code at 0x000XXXX" message and in the Output windows it says:
HEAP[MP3.exe]: Invalid Address specified to RtlFreeHeap( 01560000, 01564260 )
Unhandled exception at 0x77f767cd in MP3.exe: User breakpoint.
I would really appreciate it if someone told me what this means and possibly how i can fix it.
Thankyou
-Rune
|
|
|
|
|
Other than repeated trial and error, how can I figure out the location of my control in code? I am putting two buttons on a CDialog that I want to line up under a couple of CListCtrls. I dont know how to size these since I dont know what areas I am working with. Does one somehow get the number of pixels manually from the IDE? Like if I knew the form is 600 pixels high, I would put my button at 500 pixels if its height is 50. I'm using stuff like:
m_startsearch.MoveWindow(580,30,70,30);
m_cancelsearch.MoveWindow(580,65,70,30);
I dont know if getclientrect is helpful in this case since I want to position these buttons relative to two other controls on the form, which by trial and error I've positioned the way I want. So if I knew the actual number of pixels in my form I could do the adjustments I suppose. Any ideas on how to make this process more scientific?
Thanks,
ns
|
|
|
|
|
You can use CWnd::GetWindowRect to get the location of the controls you wish to align to.
|
|
|
|
|
|
Hi All,
Just wondering if anyone knows a simple way to reuse an existing form view as a dialog, without having to create a new CDialog derived class from scratch to do it.
Thanks,
Aaron
|
|
|
|
|
It's not possible to reuse CFormView as a dialog. What should be possible is to embed a dialog (modeless) in a CView derived class (not CFormView) and alternatively using as a modal one.
Pavel
Sonork 100.15206
|
|
|
|
|
Hi guys.
Do you know a simple way to identify uniquely a computer independently of the OS? What can I use in MFC to do this?
Best Regards
|
|
|
|
|
think that exists some key on registry (i dont know where)
if you have all your windows licensed you have no problem , use the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductId
if this is not the case then i think you can use:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate
it will be very dificult (almost impossible) to find two pc with the same installdate on a local network (anless you have used norton ghost or somenthing like that)
Casa.Sapo.pt
|
|
|
|
|
its better to consider the Disk Volume label/processor ID
there s various API s to query the details..
WUSIWUG
|
|
|
|
|
I would recommend using the same mechanism that is in use for networking... the MAC address of the machine's NIC. Every NIC ever manufactured has a unique MAC address, no matter what hardware it goes into or what operating system runs it. These have to be unique, otherwise networking protocols would not work.
Take a look at the GetAdaptersInfo() function in the Windows Platform SDK. It's probably the easiest way. Note that this is a Win32-specific mechanism. Unfortunately, there are no universal C/C++ standards for working with network protocols. It's an OS-specific thing and every platform has its own method for doing so.
Ty
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." -Albert Einstein
|
|
|
|
|
Hi,
I have multiple Dialog and I need a Timer to trigger a timing event (it should work at any time & any where)
For now I do the following, and have big problem:
1) In Main dialog I have a ListControl box, I SetTimer(1, 5000, NULL) for 5 seconds trigger in OnInit()
2) I use WM_TIMER to create OnTimer(...), in here I display a ListCtrl items (after changing their values), and "only display" if I am sure I am "at the Main Dialog"
3) Before display the listctrl, I did use DeleteAllItems() to clear the listview!
*) If I do not switch the Main Dialog to others, it works perfectly! But even I switch once & coming back rightaway ... my listctrl is not response as before (never refresh) ... even it did get in the OnTimer() ... some thing weird happens very fast & un-controllable!
I hope that someone know the real problem ... or tell me how I use another SetTimer method!
I am really appreciate any help & suggectons here, I stuck to this issue for more than 3 days!
Many thanks,
|
|
|
|
|
can u give the code which u try there...
i think thats bcz of expiring the scope of the object...how u call the dialogs..?? be specific..and give the code if u can..
WUSIWUG
|
|
|
|
|
Hi renjith,
Please see more Update detail in my new post, it will explain where is the real problem. Here is some parts of my codes:
a) In OnInit() of Main.cpp:
{
f_Main = true;
CWnd::KillTimer(TimerNumb);
TimerNumb = CWnd::SetTimer (1,5000, NULL);
}
b) In OnTimer() of Main.cpp:
{
cnt++;
// Toggle every Timer trigger
if(!f_toggle)
{
f_toggle = true;
ListControl(f_toggle);
}
else
{
f_toggle = false;
ListControl(f_toggle);
}
}
c) In ListControl(bool flag):
{
LVITEM listItem;
listItem.mask = LVIF_TEXT;
listItem.iSubItem = 0;
// Only Refresh Screen when in the Main GUI
if(f_Main)
{
m_cnt = cnt;
m_list.DeleteAllItems();
if(ON)
{
m_toggle.SetCheck(true);
int row = 0;
UpdateData(false);
while(row < 10)
{
listItem.iItem = row;
listItem.pszText = "dummy";
m_list.InsertItem (&listItem);
m_list.SetItemText (row, 0, "Hello");
m_list.SetItemText (row, 1, "Hello");
m_list.SetItemText (row, 2, "Hello");
row++;
}
}
else
{
m_toggle.SetCheck(false);
UpdateData(false);
}
}
UpdateData(false);
}
|
|
|
|
|
Please mail me your workspace..
My ID is rrenjith@m2comsys.com
WUSIWUG
|
|
|
|
|
Hi,
I have more detail about the problem:
1) It still work, but when the Main Dialog going back "once" the Timer event still 5 seconds ... but happen "twice" (even)! Because of that, if it the list ON next time it still ON (not toggle)
2) If the GUI coming back the "second time" the Timer still 5 seconds but happen tripple (odd), now the listctrl is toggled!
*) That means the more switching Dialog, when the Main dialog coming back: the more event happen in the same 5 seconds interval!
I did try to kill the Timer, before trigger again, but failled! Here what I did in OnInit() of Main Dialog
CWnd::KillTimer(TimerNumb); // kill previous Timer
TimerNumb = CWnd::SetTimer (1,5000, NULL); // re-trigger
**) I did monitor the TimerNumb, and it equals 1 at any time!
***) If I set a flag & not re-trigger SetTimer(), it will not work any more (after switching to other dialog & coming back) ... I do not know why the Timer is gone, even I do not kill it any where???
if(!f_reset) TimerNumb = CWnd::SetTimer (1,5000, NULL);
f_reset = true;
With these situation, might be someone can help me how to do the task in the first place?
Many thanks,
|
|
|
|
|
I hope this isn't too hard - but how can I get the source of a HTML page given the IHTMLDocument2 pointer to it? I know I can get the body which supports the innerHTML property but that only gives me the source of the body - the head section is not there.
Anyone?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Nevermind - found it out myself:
<br />
IHTMLDocument2Ptr piDoc = ...;<br />
IPersistStreamInitPtr piPersistStreamInit;<br />
IStreamPtr piStream;<br />
HGLOBAL hGlobal = NULL;<br />
<br />
::CreateStreamOnHGlobal( NULL, TRUE, &piStream );<br />
piDoc->QueryInterface( IID_IPersistStreamInit, (void**)&piPersistStream );<br />
piPersistStream->Save( piStream, FALSE );<br />
<br />
::GetHGlobalOnStream( &hGlobal, piStream );<br />
<br />
size_t nNumBytes = ::GlobalSize( hGlobal );<br />
if ( nNumBytes > 0 )<br />
{<br />
BYTE* pBytes = reinterpret_cast< BYTE* >( ::GlobalLock( hGlobal ) );<br />
if ( pBytes[0] == 0xFF && pBytes[1] == 0xFE )<br />
{<br />
LPCWSTR pszwHTML = reinterpret_cast< LPCWSTR >( pBytes + 2 );<br />
}<br />
else<br />
{<br />
LPCSTR pszHTML = reinterpret_cast< LPCSTR >( pBytes );<br />
}<br />
::GlobalUnlock( hGlobal );<br />
}<br />
<br />
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I am writing an application right now in VB 6.0. I was just wondering if someone could help with this. Upon the FormLoad() function, I need the program to call a notepad file (main.ini) and read the third line and replace a variable inside of my program. Can somebody please please help me????
Thanks again,
Bob
|
|
|
|
|
Bad forum . Warning: VBers hated here .
Pavel
Sonork 100.15206
|
|
|
|
|
BHBAD2002 wrote:
Can somebody please please help me????
Yeah! I can tell ya to not cross-post and ask in the appropriate forum. Like say, it's a VB question, so maybe your luck will change in the, gee I don't know, the Visual Basic / VB.NET forum maybe.
Jeremy Falcon
Imputek
<nobr>"In fact it is quite simple, men and women both only want one thing - what they can't have!" - phykell
|
|
|
|
|
I think it will need ADOX, but are there any links/samples that show how to merge database1 and database2 to create a final database. The number of fields in each db is different, and some of them are distinct, though some overlap.
Thanks,
ns
|
|
|
|
|
Do you mean merging seperate databases or seperate tables? Can you provide more information about your database format etc.
Michael
Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
|
|
|
|