Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

DoomedOne

@DoomedOne
About
Posts
29
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • automatic stored procedure or trigger
    D DoomedOne

    The schedule runs in the database server, so the type of application does not matter. For example if you database is MS SQL Server 2000 on Windows Server you create the stored procedure in the database. Then go to Enterprise Manager->[You SQL Server Group]->[You Database]->Administration->SQL Server Agent->Jobs Right Click -> add New Job: Enter a name go to tab steps-> New: Enter a name Select -> Transact SQL Command (or something like) Fill in the sp call Go to the next tab Click New Schedule Click Change Select daily Set the desired time Accept all dialogs Hope it helps

    Habetis bona deum

    Database database announcement

  • automatic stored procedure or trigger
    D DoomedOne

    This is normally solved by a stored procedure that is executed from a scheduler daily at 00hs.

    Habetis bona deum

    Database database announcement

  • Hotkey for menu Item
    D DoomedOne

    Hi, hope this link helps for a start http://msdn2.microsoft.com/en-us/library/ms646337(VS.85).aspx[^] And here is a link to a thread whit a smal example on this http://cboard.cprogramming.com/showthread.php?t=20926[^]

    Habetis bona deum

    modified on Wednesday, December 19, 2007 11:11:41 AM

    C / C++ / MFC c++ tutorial

  • Creating an Index on a Foreign Key
    D DoomedOne

    Is always a good idea to create an index for each field (or group of fields) that forms a FK Only in few cases you could not create such an index, i.e. when it is the first field in an already existing index or is equal to de PK.

    Habetis bona deum

    Database question database

  • Error in Message editor
    D DoomedOne

    Hi, I'm experiencing problems whit the formating options in the message editor, i.e. selecting a text and clic in the "B" for bold text gives MessageBox: Are you sure you want to leave the page. You will lose any unsaved text. Is it Ok?. If clic Ok it sends the message as it is. The same hampens with all of them. I'm using Firefox 2.0.0.11 in Win XP sp2

    Habetis bona deum

    Site Bugs / Suggestions help question

  • GDI+ samples and malloc/free [modified]
    D DoomedOne

    Hi, I gess is using malloc and free to avoid a loop for alocation a "count" number of Rect objects, alocation all of them in one malloc look at malloc(count*sizeof(Rect) `parameter of malloc.`

    C / C++ / MFC graphics winforms tutorial question

  • Query + Variable problem
    D DoomedOne

    Use the dateadd function where t1.cancel_date <= dateadd("d", 30, sale_date) Hope it helps

    Habetis bona deum

    Database database help mysql sql-server sysadmin

  • VTBL
    D DoomedOne

    Are you initialising the m_b member in the constructor of class A?

    Habetis bona deum

    C / C++ / MFC question

  • Give me a gun pliz
    D DoomedOne

    Hi, I found this code in an old VB6 app that we need to "upgrade" (in fact replace with a new one be a much better approach, but...) cbo_Caminos is a ComboBox, o_rs is defined as ADODB.Recordset If CInt(Trim(Mid(cbo_Caminos.Text, 151, 6))) = CInt(o_Rs.Fields("NroCamino")) Then .... 'do something End If And yes o_Rs.Fields("NroCamino") is an integer Why not use ItemData of the combobox to store de integer value associated whit the content of the combobox text? :confused: More on the same form Private Sub .......() Dim o_rs As New ADODB.Recordset Dim s_Sql As String s_Sql = "" s_Sql = "Select * from ......" Set o_rs = New ADODB.Recordset Set o_rs = DBConnect.Execute(s_Sql) ..... ..... If mAutmoatico Then ' mAutmoatico is boolean defined as global var s_Sql = "" s_Sql = "Select ..... s_Sql = s_Sql & "From ...." s_Sql = "Where ...." set o_rs = DBConnect.Execute(s_Sql) .... End If For some miraculous reason mAutmoatico is always false when reach the above If Enjoy.

    Habetis bona deum

    The Weird and The Wonderful question

  • Sign ' is the same as \' ?
    D DoomedOne

    Hi. You use single ' inside a string delimited by " characters i.e. char* p2 = "Hello 'World'"; You use the \' when iusing it as a single character that need to be quoted within ' characters i.e. char p1 = '\'';

    Habetis bona deum

    C / C++ / MFC question

  • Anyone have a clue what this code does?
    D DoomedOne

    Apparently this code generates a list of reversed ordered blocks of indexes where the new_settings and acc_settings differ, separating the block in the items where the value in new_settings is > the next item in acc_settings. I guess...

    The Weird and The Wonderful question

  • How to avoid warning LNK4224: /COMMENT is no longer supported
    D DoomedOne

    Nelek wrote:

    C4308: changed to file->Seek (((UINT) -3) * sizeof (BYTE), CFile::current); is that correct? I want to go back in 3 bytes to reread the last block because it contains particular info that i need to start the next block

    Hi, in this case, the ((UINT)-3) will be converted to 3, advansing the position in the file instead of going back, the cast should be in the sizeof : file->Seek (-3 * (long)sizeof(BYTE), CFile::current);

    C / C++ / MFC tutorial

  • changing the cursor postion in a editable combobox???
    D DoomedOne

    The easy way set the sorted property of the ComboBox to true, if the sort order is defined by the text in the list. If not the easiest way is to add an “Order by” in the Query. Assuming the Data source supports it (i.e. Any ANSI SQL DB), and the ordering key is accessible in the query. If the order needed is not defined by the data returned or accessed in the query you need to sort it manually, i.e. loading it into a vector or array, ordering the array with any sorting method (bobble, fast sort, hash tables ...) Then insert the values from the ordered array.

    C / C++ / MFC database help question

  • changing the cursor postion in a editable combobox???
    D DoomedOne

    try this, it work for me. In a MFC dialog app , add a ComboBox, add a control variable m_Combo1 for it. in the CBN_EDITCHANGE message map the metod: OnCombo1EditChange In the body copy the folowing code void CMFC1Dlg::OnCombo1EditChange() { // Here you should do or call the process to look for text on the DB // and modify the ComboBox item list and text //for this examle //Here I get the text entered and compare it whit a fixed text "New" //If the user entered "New" and not exists the item "New Element" in //the combo list, I add de element //then select the "New Element" item as the current selected item // Set the cursor at the end of the element // // For a real use, I think, is better select the text since the // last entered character to the end of the text // CString UserText; TCHAR AddText[12] = _T("New Element"); CWnd * pEdit = m_Combo1.GetWindow( GW_CHILD ); ASSERT( pEdit ); pEdit->GetWindowText(UserText); if ( UserText.Compare(_T("New"))==0) { if (m_Combo1.FindString(-1,&AddText[0])==CB_ERR ) { m_Combo1.AddString(&AddText[0]); m_Combo1.SetCurSel(m_Combo1.FindString(-1,&AddText[0])); } int tLen = m_Combo1.GetLBTextLen(m_Combo1.GetCurSel()); m_Combo1.SetEditSel(tLen,tLen); } } //Note CMFC1Dlg is the class for the dialog Or take a look at: http://www.codeproject.com/combobox/combocompletion.asp

    C / C++ / MFC database help question

  • changing the cursor postion in a editable combobox???
    D DoomedOne

    Asuming m_Combo1 is the variable of class CComboBox try int tLen = m_Combo1.GetLBTextLen(m_Combo1.GetCurSel()); m_Combo1.SetEditSel(tLen,tLen); I hope it helps

    C / C++ / MFC database help question

  • need help with c programming data validation
    D DoomedOne

    try{} catch{} are C++ not C you shoud tyr __try __except ( ) instead Warning __try __except is Microsoft Specific so it don't work in other compilers

    C / C++ / MFC help question

  • Call to Graphics.DrawString thows invalid argument on call to System.Drawing.Graphics.CheckErrorStatus
    D DoomedOne

    Hi, I've solved the problem by moving the definition of offscreenBMP to the code block, recreating it on every render and assigning it to the pictureBox in the "Paginar" method, instead of coping it in the paint event. Thanks to every one.

    C# graphics csharp dotnet data-structures debugging

  • Call to Graphics.DrawString thows invalid argument on call to System.Drawing.Graphics.CheckErrorStatus
    D DoomedOne

    Hi, I’ve tired that too, disabling the timer as first sentence in the Timer_tick event and enabling it again at the end, after the frame has been rendered, and don't work. The problem do not looks like a collision between 2 running threads trying run the same paint code, is more like something is missing to clean up, or set, between calls to de "Paginar" code.

    C# graphics csharp dotnet data-structures debugging

  • How to send Date as a DateTime Object?.
    D DoomedOne

    Maybe this helps string dateformat; TimeZone localZone = TimeZone.CurrentTimeZone; dateformat = DateTime.Now.ToString("yyyy-MM-dd") + "T" DateTime.Now.TimeOfDay.ToString() + localZone.GetUtcOffset(DateTime.Now); dateformat gets somting like: "2007-05-21T18:26:24.8906250-03:00:00" you may need to cut the last ":00". Replace de DateTime.Now for the DateTime Object you need to send.

    C# question tutorial

  • Call to Graphics.DrawString thows invalid argument on call to System.Drawing.Graphics.CheckErrorStatus
    D DoomedOne

    I run it in debug mode, and the frame rendering finish long beefore the second timer event. Here is a resume of all the code, is quite large one to post completely. private class Principal:Form { //.... declarations , constructor, Othes Methods, etc. //waht is important for the case private Bitmap offScreenBmp; private Graphics offScreenDC; private Bitmap FondoLimpioBmp; private bool DrawingToBuffer; private viod BackImg() //this is been called once at form_load (for now). { DrawingToBuffer = true; FondoLimpioBmp = new Bitmap(BackIngPath); //BackIngPath is string containing path and file name of backgound image. FondoLimpioBmp = new Bitmap(BackIngPath); Graphics FondoLimpioDC = Graphics.FromImage(FondoLimpioBmp ); //Draw Some Gradients here to FondoLimpioDC, no problems here //PicBack is a PicuteBox in the form. offScreenBmp = new Bitmap(PicBack.Width, PicBack.Height); offScreenDC = Graphics.FromImage(offScreenBmp); offScreenDC.Clear(Color.Transparent); offScreenDC.DrawImage(this.BackgroundImage,new Point(0,0)); offScreenDC.SmoothingMode = SmoothingMode.AntiAlias; offScreenDC.DrawImage(FondoLimpioBmp , 0, 0); FondoLimpioDC.dispose(); offScreenDC.Dispose(); //Add this after yuor comment. DrawingToBuffer = false; } private void Paginar() /// this is called from Timer_Tick event { if (!DrawingToBuffer){ //flag para prevenir 2 instancias al mismo tiempo // Here gos code to read data from database.... DrawingToBuffer = true; offScreenDC = Graphics.FromImage(offScreenBmp); offScreenDC.Clear(Color.Transparent); offScreenDC.DrawImage(FondoLimpioBmp, 0, 0); offScreenDC.SmoothingMode = SmoothingMode.AntiAlias; StringFormat sf = new StringFormat(); Brush tBrush = Brushes.Black; sf.LineAlignment = StringAlignment.Center; Font tFont = new Font("Arial", 17F, FontStyle.Bold); string itemToShow; int Y1, Y2, Y3, Y4; RectangleF txtRect; for(int i = 0; i < 10; i++) { Y1 = (sepHeigth * i) + (rowHeigth * i); Y2 = (sepHeigth * (i + 1)) + (rowHeigth * i); Y3 = Y2; Y4 = (sepHeigth * (i + 1)) + (rowHeigth * (i + 1)); sf.Alignment = StringAlignment.Center; txtRect = new RectangleF(TitleSrv.Left, Y3, TitleSrv.Width, rowHeigth); itemToShow = LSRVLbl[i].Text; sf.FormatFlags = StringFormatFlags.NoClip; //*********************************************************

    C# graphics csharp dotnet data-structures debugging
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups